-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Web - App crashes on click of priority mode #27326
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
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @joelbettner ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes on click of priority mode What is the root cause of that problem?We get
But it doesn't exist in the language. Lines 837 to 840 in 1baf33a
What changes do you think we should make in order to solve the problem?We should define a CONST for the priority mode by the same way we use it in App/src/pages/settings/Preferences/LanguagePage.js Lines 21 to 30 in 1baf33a
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes when navigating to priority mode page What is the root cause of that problem?This is a regression from #25846 which flattens translation objects App/src/languages/translations.ts Lines 46 to 47 in 1baf33a
eg: languagePage: {
language: 'Language',
languages: {
en: {
label: 'English',
},
es: {
label: 'Spanish',
},
},
}, before the change we can easily access the above value using {
languagePage.language: 'Language',
llanguagePage.languages.en.label: 'English',
....
} What changes do you think we should make in order to solve the problem?Since the translation object is flattened we cannot access any key to get it's child object value, we should access the required value directly. App/src/pages/settings/Preferences/PriorityModePage.js Lines 29 to 35 in 1baf33a
const priorityModes = _.map(['default', 'gsd'], (type) => ({
value: type,
text: props.translate(`priorityModePage.priorityModes${type}.label`),
alternateText: props.translate(`priorityModePage.priorityModes.${type}.description`),
keyForList: type,
isSelected: props.priorityMode === type,
})); We also need to update other parts of the code where direct access to object values is being attempted, for example:"
What alternative solutions did you explore? (Optional) |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes on Priority Modes selection list click. What is the root cause of that problem?After the recent changes related translations, while trying to translate the key
What changes do you think we should make in order to solve the problem?Re write the priorityModes map function as below with minimal changes:
modify it to
Additionally, we may need to add the change of Evidence of fix: Screen.Recording.2023-09-13.at.11.39.32.pm.movWhat alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
Along with this there are changes needed in
Can be added in the same PR. |
Looks like this is going to be fixed by #27358 |
Ready to be closed @AndrewGable |
The issue is still occurring. |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
App should open priority mode page on click of priority mode
Actual Result:
App crashes on click of priority mode
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.69.0
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
crash.on.priority.mode.click.mp4
Recording.4431.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694597540315309
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: