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

Mandatory exit survey for users going back to OldDot #34925

Merged
merged 97 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
8f4e247
Remove unnecessary directory
roryabraham Jan 22, 2024
d9d97ca
Set up pages and navigation
roryabraham Jan 22, 2024
835c2da
Build basic layout for reason page
roryabraham Jan 22, 2024
e77baf7
Add translations for copy
roryabraham Jan 22, 2024
a566335
Add constants for reasons
roryabraham Jan 22, 2024
d043c79
Use correct reasons from CONST in reasons page
roryabraham Jan 23, 2024
f5e2ded
Fix radio button styles
roryabraham Jan 23, 2024
1f1b22f
Implement validation in reason page
roryabraham Jan 23, 2024
6ccfdd8
Simplify routes
roryabraham Jan 23, 2024
344bd5e
Fix skeletons of response and confirm page
roryabraham Jan 23, 2024
138e14c
Localize page headers
roryabraham Jan 23, 2024
19991af
Translate title and subtitle on reason page
roryabraham Jan 23, 2024
d764869
Implement basic layout of ResponsePage
roryabraham Jan 23, 2024
8ccecea
Style response input better
roryabraham Jan 23, 2024
1063d50
Get multiline styles implemented correctly
roryabraham Jan 23, 2024
5f226ab
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 23, 2024
0f1fc68
Compute maxHeight for TextInput in component
roryabraham Jan 23, 2024
14351a7
Polish response input height
roryabraham Jan 23, 2024
142b59c
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 25, 2024
af1110f
Make response required
roryabraham Jan 25, 2024
21d0449
Add mushroom-top-hat illustration asset
roryabraham Jan 25, 2024
93c5a87
Implement confirm page
roryabraham Jan 25, 2024
3035ce0
Add Onyx types for forms
roryabraham Jan 25, 2024
b83bdef
Fix route type
roryabraham Jan 25, 2024
733dd6a
Add obligatory draft keys for forms
roryabraham Jan 25, 2024
ca73fcf
Make spanish copy informal
roryabraham Jan 26, 2024
899d16c
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 26, 2024
99b7809
Hook up with API
roryabraham Jan 27, 2024
fa6fa15
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Jan 27, 2024
fa47d7f
whoops, forgot to commit this file
roryabraham Jan 27, 2024
fb01ab5
Fix types for API params
roryabraham Jan 27, 2024
6f7026f
Fix regression: https://github.com/Expensify/App/pull/34787\#issuecom…
roryabraham Jan 27, 2024
bf336ce
Bump type-fest
roryabraham Jan 30, 2024
d85a2fe
Wrap RadioButtons with forwardRef
roryabraham Jan 30, 2024
e1e5283
Add ExitSurveyForm onyx types
roryabraham Jan 30, 2024
b5cfed1
Add Onyx type in Form.ts as well
roryabraham Jan 30, 2024
b66d8d3
Merge branch main into Rory-TransitionSurvey
roryabraham Jan 31, 2024
86bf87f
Fix typecheck
roryabraham Jan 31, 2024
688a49b
Remove TODOs
roryabraham Jan 31, 2024
2b2a148
Fix forwardRef
roryabraham Jan 31, 2024
8c909c1
Clear onyx form data after sending to API
roryabraham Jan 31, 2024
639afcd
Attempt to apply drafts - seeing cryptic type error
roryabraham Jan 31, 2024
1ee4118
Populate response TextInput with draft response
roryabraham Jan 31, 2024
41457dc
Use Onyx.set instead of Onyx.merge
roryabraham Jan 31, 2024
f738173
Remove errant console.log
roryabraham Jan 31, 2024
0faf0c5
Implement loading state in confirm page
roryabraham Feb 1, 2024
645c0d0
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 1, 2024
ef706f9
Fix linking config
roryabraham Feb 1, 2024
8fab4f9
Consolidate goToExpensifyClassic copy
roryabraham Feb 1, 2024
222cfb6
Upgrade react-native-onyx
roryabraham Feb 1, 2024
25d1268
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 1, 2024
33d614d
Hide reason page back button on wide layouts
roryabraham Feb 2, 2024
db6b991
Remove unnecessary ref
roryabraham Feb 2, 2024
3bff7db
Submit response form on CMD+Enter
roryabraham Feb 2, 2024
a7f4a2f
Fix form second submission
roryabraham Feb 2, 2024
a61b8d5
Make isOffline a true boolean
roryabraham Feb 2, 2024
566000b
Implement offline UI for reason page
roryabraham Feb 2, 2024
b3245a3
Implement offline UI for the other pages in the survey as well
roryabraham Feb 2, 2024
220a974
Disable button in confirm page when offline
roryabraham Feb 2, 2024
aed59f1
Move survey back to RHP
roryabraham Feb 2, 2024
4222758
Fix typo
roryabraham Feb 2, 2024
edbf8a4
Fix navigation to RHP
roryabraham Feb 2, 2024
7c5e331
Remove unnecessary offline navigation effect
roryabraham Feb 2, 2024
1893e7a
Add backTo param to response and confirm page, even though it doesn't…
roryabraham Feb 2, 2024
ecfc373
Add missing spanish translation
roryabraham Feb 2, 2024
fb01bd2
Fix backTo bug
roryabraham Feb 2, 2024
211f166
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 2, 2024
50d47e9
Move switch to Expensify Classic to top of account settings page
roryabraham Feb 2, 2024
3ee8832
Subtract keyboard height from maxHeight of form and input
roryabraham Feb 3, 2024
50db2a4
Merge branch main into Rory-TransitionSurvey
roryabraham Feb 9, 2024
dcd132f
Make textinput uncontrolled for better performance on android, remove…
roryabraham Feb 9, 2024
57fdf94
Fix offline icon on mobile
roryabraham Feb 9, 2024
13cd0e5
Add padding to offline view
roryabraham Feb 9, 2024
f0091e4
Fix offline and mushroomtophat styles
roryabraham Feb 9, 2024
3c64ea8
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 9, 2024
adbae00
Fix lockfiles after merge
roryabraham Feb 9, 2024
e3ac42d
Center align text on offline and confirm page
roryabraham Feb 9, 2024
5d7c22a
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 14, 2024
90a0b4a
Fix most types after merge
roryabraham Feb 14, 2024
349f6d8
Fix types in ExitSurveyResponsePage
roryabraham Feb 14, 2024
8e243fb
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 14, 2024
45882a4
Fix typo in english translation
roryabraham Feb 14, 2024
07a802d
Update MushroomTopHat illustration
roryabraham Feb 14, 2024
1c4111b
Prepopulate reason form with draft reason
roryabraham Feb 14, 2024
043601d
Remove outdated cleanup
roryabraham Feb 14, 2024
3dfac29
Fix comment in NumberUtils
roryabraham Feb 14, 2024
c7f2b57
fix draft on reason page
roryabraham Feb 14, 2024
22b6390
Setup RadioButtons to work as a controlled input
roryabraham Feb 14, 2024
7be4f46
Switch backTo for response and confirm page if you're offline
roryabraham Feb 14, 2024
b5f26ed
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 15, 2024
ed8ef0d
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 20, 2024
faf6741
Use stable reference for onPress
roryabraham Feb 20, 2024
a5fb310
Delete gremlin file
roryabraham Feb 20, 2024
411b281
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 24, 2024
6040f50
Fix package-lock.json after conflict resolution
roryabraham Feb 24, 2024
c98c48f
Fix TS errors
roryabraham Feb 24, 2024
bd00fc3
Merge branch 'main' into Rory-TransitionSurvey
roryabraham Feb 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions assets/images/product-illustrations/mushroom-top-hat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 28 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
"react-native-onyx": "2.0.2",
"react-native-onyx": "2.0.4",
"react-native-pager-view": "6.2.2",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
Expand Down Expand Up @@ -284,7 +284,7 @@
"style-loader": "^2.0.0",
"time-analytics-webpack-plugin": "^0.1.17",
"ts-node": "^10.9.2",
"type-fest": "^3.12.0",
"type-fest": "^4.10.2",
"typescript": "^5.3.2",
"wait-port": "^0.2.9",
"webpack": "^5.76.0",
Expand Down
8 changes: 8 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,14 @@ const CONST = {
ADDRESS: 3,
},
},

EXIT_SURVEY: {
REASONS: {
FEATURE_NOT_AVAILABLE: 'featureNotAvailable',
DONT_UNDERSTAND: 'dontUnderstand',
PREFER_CLASSIC: 'preferClassic',
},
},
} as const;

type Country = keyof typeof CONST.ALL_COUNTRIES;
Expand Down
10 changes: 10 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ const ONYXKEYS = {
/** Is report data loading? */
IS_LOADING_APP: 'isLoadingApp',

/** Is the user in the process of switching to OldDot? */
IS_SWITCHING_TO_OLD_DOT: 'isSwitchingToOldDot',

/** Is the test tools modal open? */
IS_TEST_TOOLS_MODAL_OPEN: 'isTestToolsModalOpen',

Expand Down Expand Up @@ -383,6 +386,10 @@ const ONYXKEYS = {
REIMBURSEMENT_ACCOUNT_FORM_DRAFT: 'reimbursementAccountDraft',
PERSONAL_BANK_ACCOUNT: 'personalBankAccountForm',
PERSONAL_BANK_ACCOUNT_DRAFT: 'personalBankAccountFormDraft',
EXIT_SURVEY_REASON_FORM: 'exitSurveyReasonForm',
EXIT_SURVEY_REASON_FORM_DRAFT: 'exitSurveyReasonFormDraft',
EXIT_SURVEY_RESPONSE_FORM: 'exitSurveyResponseForm',
EXIT_SURVEY_RESPONSE_FORM_DRAFT: 'exitSurveyResponseFormDraft',
},
} as const;

Expand All @@ -406,6 +413,8 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.ROOM_SETTINGS_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.NEW_TASK_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.EDIT_TASK_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.EXIT_SURVEY_REASON_FORM]: FormTypes.ExitSurveyReasonForm;
[ONYXKEYS.FORMS.EXIT_SURVEY_RESPONSE_FORM]: FormTypes.ExitSurveyResponseForm;
[ONYXKEYS.FORMS.MONEY_REQUEST_DESCRIPTION_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.MONEY_REQUEST_MERCHANT_FORM]: FormTypes.Form;
[ONYXKEYS.FORMS.MONEY_REQUEST_AMOUNT_FORM]: FormTypes.Form;
Expand Down Expand Up @@ -528,6 +537,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.IS_LOADING_REPORT_DATA]: boolean;
[ONYXKEYS.IS_TEST_TOOLS_MODAL_OPEN]: boolean;
[ONYXKEYS.IS_LOADING_APP]: boolean;
[ONYXKEYS.IS_SWITCHING_TO_OLD_DOT]: boolean;
[ONYXKEYS.WALLET_TRANSFER]: OnyxTypes.WalletTransfer;
[ONYXKEYS.LAST_ACCESSED_WORKSPACE_POLICY_ID]: string;
[ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT]: boolean;
Expand Down
11 changes: 11 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ const ROUTES = {
getRoute: (source: string) => `settings/troubleshoot/console/share-log?source=${encodeURI(source)}` as const,
},

SETTINGS_EXIT_SURVEY_REASON: 'settings/exit-survey/reason',
SETTINGS_EXIT_SURVEY_RESPONSE: {
route: 'settings/exit-survey/response',
getRoute: (reason?: ValueOf<typeof CONST.EXIT_SURVEY.REASONS>, backTo?: string) =>
getUrlWithBackToParam(`settings/exit-survey/response${reason ? `?reason=${encodeURIComponent(reason)}` : ''}`, backTo),
},
SETTINGS_EXIT_SURVEY_CONFIRM: {
route: 'settings/exit-survey/confirm',
getRoute: (backTo?: string) => getUrlWithBackToParam('settings/exit-survey/confirm', backTo),
},

KEYBOARD_SHORTCUTS: 'keyboard-shortcuts',

NEW: 'new',
Expand Down
6 changes: 6 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ const SCREENS = {
REPORT_VIRTUAL_CARD_FRAUD: 'Settings_Wallet_ReportVirtualCardFraud',
CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS: 'Settings_Wallet_Cards_Digital_Details_Update_Address',
},

EXIT_SURVEY: {
REASON: 'Settings_ExitSurvey_Reason',
RESPONSE: 'Settings_ExitSurvey_Response',
CONFIRM: 'Settings_ExitSurvey_Confirm',
},
},
SAVE_THE_WORLD: {
ROOT: 'SaveTheWorld_Root',
Expand Down
Loading
Loading