You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Group - ‘Notification preferences’ page transition animation is broken #40426
BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsReviewingHas a PR in reviewWeeklyKSv2
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
@sakluger I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
Please re-state the problem that we are trying to solve in this issue.
There're 2 bugs in the Notification preferences feature, both relating to the option focusing:
There is no animation when navigating to ‘Notification preferences’ page
When coming to ‘Notification preferences’ page and press "ArrowDown" to navigate (the default selected option will be Immediate), the Immediate still has browser focus, but there's no item-focus. In this case the first item in the list should be focused because we have cyclic traversal by default in arrows navigation
What is the root cause of that problem?
In here, we're manually trigger .focus on the item if it's app-focused, this is so that the item will have browser focus too. But this manual focusing will interfere with the screen transition, causing the animation to be skipped and the page shows up immediately.
In here, we're setting the wrong maxIndex for the useArrowKeyFocusManager. The maxIndex's purpose is so that we know whether we reached the edge of the list and should go to top/bottom in a cyclic manner. If the list has 3 items (as in notification preferences), the maxIndex should be 2 (there's item 0, 1, 2). However we're setting the maxIndex to the length of the list (3 here), leading to the focus being moved outside of the screen when we do ArrowDown when we're at the last item of the list (same as when we're on top of the list and ArrowUp)
What changes do you think we should make in order to solve the problem?
In here, we should only focus after the screen transition was all done. We can apply the same approach we already use for useAuthFocusInputhere, which is to wait a specified timeout after the current screen is focused.
Or we can put the focusing here inside InteractionManager.runAfterInteractions, but this might not be as reliable
In here, update flattenedSections.allOptions.length to flattenedSections.allOptions.length - 1
What alternative solutions did you explore? (Optional)
@paultsimura I think this can be handled externally since it has Help Wanted label. If not, we should not have put Help Wanted on it since this was a deploy blocker so it of course comes from a recent PR (by definition).
@tienifr I can't think of why adding the Help Wanted label would mean that the original authors are not responsible for fixing. But if you are passionate about discussing it please email contributors@expensify.com or bring it up in the Slack channel.
BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsReviewingHas a PR in reviewWeeklyKSv2
Activity
melvin-bot commentedon Apr 18, 2024
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Apr 18, 2024
Triggered auto assignment to @danieldoglas (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Apr 18, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
izarutskaya commentedon Apr 18, 2024
@sakluger I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
izarutskaya commentedon Apr 18, 2024
We think this issue might be related to the #vip-vsb.
izarutskaya commentedon Apr 18, 2024
Production
bandicam.2024-04-18.14-19-01-918.mp4
danieldoglas commentedon Apr 18, 2024
I'm not sure if we should block a deploy on this.
16 remaining items
danieldoglas commentedon Apr 18, 2024
Assigned yo you @marcaaron , thanks!
paultsimura commentedon Apr 19, 2024
Thanks for your proposal @shahinyan11 – unfortunately, the offending PR is still in the regression period and should be handled by the authors: @WojtekBoman and @fedirjh.
tienifr commentedon Apr 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
There're 2 bugs in the Notification preferences feature, both relating to the option focusing:
Immediate), theImmediatestill has browser focus, but there's no item-focus. In this case the first item in the list should be focused because we havecyclic traversalby default in arrows navigationWhat is the root cause of that problem?
.focuson the item if it's app-focused, this is so that the item will have browser focus too. But this manual focusing will interfere with the screen transition, causing the animation to be skipped and the page shows up immediately.maxIndexfor theuseArrowKeyFocusManager. ThemaxIndex's purpose is so that we know whether we reached the edge of the list and should go to top/bottom in a cyclic manner. If the list has 3 items (as in notification preferences), themaxIndexshould be2(there's item 0, 1, 2). However we're setting themaxIndexto the length of the list (3 here), leading to the focus being moved outside of the screen when we doArrowDownwhen we're at the last item of the list (same as when we're on top of the list andArrowUp)What changes do you think we should make in order to solve the problem?
useAuthFocusInputhere, which is to wait a specified timeout after the current screen is focused.Or we can put the focusing here inside
InteractionManager.runAfterInteractions, but this might not be as reliableflattenedSections.allOptions.lengthtoflattenedSections.allOptions.length - 1What alternative solutions did you explore? (Optional)
NA
tienifr commentedon Apr 19, 2024
@paultsimura I think this can be handled externally since it has
Help Wantedlabel. If not, we should not have putHelp Wantedon it since this was a deploy blocker so it of course comes from a recent PR (by definition).What do you think?
paultsimura commentedon Apr 19, 2024
@marcaaron WDYT?
#40426 (comment)
#40426 (comment)
WojtekBoman commentedon Apr 19, 2024
Hi! I'll take a look at it :)
marcaaron commentedon Apr 19, 2024
Sounds good to me @paultsimura.
@tienifr I can't think of why adding the
Help Wantedlabel would mean that the original authors are not responsible for fixing. But if you are passionate about discussing it please emailcontributors@expensify.comor bring it up in the Slack channel.fedirjh commentedon Apr 29, 2024
I think this can be closed.
marcaaron commentedon Apr 29, 2024
Thanks!