-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for #46611][$500] App displays 'Most recent' for some time after login and also does not change background color when value is changed #28184
Comments
Triggered auto assignment to @kadiealexander ( |
Job added to Upwork: https://www.upwork.com/jobs/~017588740c0155fa37 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @puneetlath ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
ProposalPlease re-state the problem that we are trying to solve in this issueApp displays 'Most recent' for some time after login and also does not change background color when value is changed What is the root cause of that problem?The root cause of the problem is that we currently don't display a loading while app data is still being fetched, that way the user can interact with the select list before the data is fetched from the backend. What changes do you think we should make in order to solve the problem?I recommend adding the
At: App/src/pages/settings/Preferences/PriorityModePage.js Lines 24 to 26 in 70e9fa0
We change to this: const defaultProps = {
isLoading: true,
priorityMode: CONST.PRIORITY_MODE.DEFAULT,
}; At: App/src/pages/settings/Preferences/PriorityModePage.js Lines 55 to 59 in 70e9fa0
We change to this: {props.isLoading ? (
<FullscreenLoadingIndicator />
) : (
<SelectionList
sections={[{data: priorityModes}]}
onSelectRow={updateMode}
initiallyFocusedOptionKey={_.find(priorityModes, (mode) => mode.isSelected).keyForList}
/>
)} At: App/src/pages/settings/Preferences/PriorityModePage.js Lines 70 to 74 in 70e9fa0
We change to this: withOnyx({
isLoading: {
key: ONYXKEYS.IS_LOADING_APP,
},
priorityMode: {
key: ONYXKEYS.NVP_PRIORITY_MODE,
},
}), This is a video working locally with the changes that I mention above. VideoScreen.Recording.2023-09-25.at.16.22.34.movWhat alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.App displays 'Most recent' for some time after login and also does not change background color when value is changed What is the root cause of that problem?In PriorityModePage, we're using App/src/pages/settings/Preferences/PriorityModePage.js Lines 29 to 35 in 3e9fdf6
Let take a look at our initiallyFocusedOptionKey props in here:
And here:
What changes do you think we should make in order to solve the problem?Add an useEffect(() => {
setFocusedIndex(_.findIndex(flattenedSections.allOptions, (option) => option.keyForList === initiallyFocusedOptionKey))
}, [initiallyFocusedOptionKey, flattenedSections]) What alternative solutions did you explore? (Optional)Add an loading while our // we can use isLoadingApp as well
{isLoadingReportData ? <FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} /> : <SectionList ... />} |
@fedirjh any thoughts on the proposals here? |
Can we put this issue on hold for #27767 ? @hungvu193 proposal makes sense to me, but it seems that |
@fedirjh why the solution I proposed doesn't make sense to you? The solution I proposed is how it is done across all other sections of the app, l still think it is more appropriated fix to this bug, because it solves this issue and the one I reported in the chat. Another one that raises when user has a slow network connection, and it is how it is done across the app in other sections. Similar issues on other parts of the app with similar solution that I propose: Address page: Display Name page: As I reported here: https://expensify.slack.com/archives/C049HHMV9SM/p1695655428909709 "No loading indicating that it is fetching the data. While loading, user can select another option and if he is using a slow network, he will be able to save a "new priority mode", but when finish loading it will show the server saved priority mode (See video)" So I agree that @hungvu193 solves the issue, but the issue I reported would be still present with his solution, so maybe we need to address the issue I reported in a different bug? Because I was told that this was a duplicate, but seems like it was not in the end. To be honest, I think the bug I reported is not the same as this one, but if we fix the bug I reported, it will automatically solve this issue |
hey @lcsvcn Please check the expected result in the OP. |
@kadiealexander What is the expected result when we initially open the priority mode preference page?
I am leaning toward the @hungvu193 For the |
It will happen any where that we use initiallyFocusedOptionKey, because it's loaded once |
For more context, 1 was the way we handled it before, it's only broken after we refactored the BaseOptionList |
@fedirjh what is OP? |
It's the original post. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@fedirjh Agreed, I don't think we should show default data and have it be interactable if it's possibly going to change after it loads. |
Still on hold, not a priority at this time. |
Same as above. |
Still on hold. |
Same as above. |
@flodnv can we close this? |
Hi @kadiealexander, @flodnv is this issue eligible for reporting bonus? |
This is now on hold for #46611 |
Still on hold. |
ITS BECAUSE I DON'T HAVE A LOCAL BANK |
📣 @jasonp2203! 📣
|
Still holding for #46611, we're getting closer. |
Probably, yes. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
App should display correct priority mode on login and also maintain background highlight over correct value
Actual Result:
App displays 'Most Recent' as selected value even though '#focus' is current selected priority mode on login and also maintain background highlight is maintained on 'Most Recent' even when value is rectified
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.74-0
Reproducible in staging?: y
Reproducible in production?: y
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
focus.on.login.and.background.highlight.too.is.wrong.mp4
Recording.1604.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693324854860599
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: