Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jon/post-install-survey #5091

Merged
merged 3 commits into from
Jun 19, 2024
Merged

Jon/post-install-survey #5091

merged 3 commits into from
Jun 19, 2024

Conversation

Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Jun 14, 2024

image

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

EdgeApp/edge-login-ui-rn#193

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

src/util/tracking.ts Outdated Show resolved Hide resolved
@@ -12,6 +12,8 @@ import { ModalUi4 } from '../ui4/ModalUi4'
export interface ButtonInfo {
label: string

disabled?: boolean
Copy link
Contributor

@swansontec swansontec Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buttons modal is for getting simple yes / no style questions. If you need more complicated interactions, you need to build your own modal. It's not complicated.

Jon, you of all people should understand this. You have been campaigning for re-usable components that are designed for a single purpose (ModalFilledTextInput comes to mind). You have also been fighting against cheap hacks, encouraging us to build the right thing instead of re-purposing some existing UI that happens to be "close enough".

Since this modal features more user interaction that simply pressing a button, you should not use the ButtonsModal for this job. That's not what it's for. Instead, we have reusable buttons components, reusable text components, and a reusable modal body specifically to make building custom modal quick & easy. Just use those.

@@ -40,6 +42,9 @@ export interface ButtonModalProps<Buttons> {
/** @deprecated. Does nothing. */
// eslint-disable-next-line react/no-unused-prop-types
closeArrow?: boolean

/** Called when modal is dismissed */
onCancel?: () => void | Promise<void>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also rejected.

@Jon-edge Jon-edge force-pushed the jon/post-install-survey branch 7 times, most recently from 151a9eb to 4fe6c5e Compare June 19, 2024 00:17
@Jon-edge
Copy link
Collaborator Author

Other changes:

  • Our shuffleArray function performs better so using that instead.
  • Move the header out of the scroll area
  • SmallText subtext to align with our backup modal style

@Jon-edge Jon-edge force-pushed the jon/post-install-survey branch 2 times, most recently from 48cbe93 to 4b169e2 Compare June 19, 2024 00:51
Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! I can actually understand the code now.

@Jon-edge Jon-edge enabled auto-merge June 19, 2024 23:45
@Jon-edge Jon-edge merged commit 560da8d into develop Jun 19, 2024
2 checks passed
@Jon-edge Jon-edge deleted the jon/post-install-survey branch June 19, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants