-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$1000] Pressing space bar while details page is opened, scrolls up the reports #15631
Comments
Triggered auto assignment to @stephanieelliott ( |
Bug0 Triage Checklist (Main S/O)
|
@stephanieelliott Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Yeah this is weird behavior. Made a small tweak to the issue description (changed |
Job added to Upwork: https://www.upwork.com/jobs/~017ddd7486addffc52 |
Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Triggered auto assignment to @joelbettner ( |
Is it expected that I am able to see this happening without having to open the details page, @rushatgabhane? |
ProposalPlease re-state the problem that we are trying to solve in this issue.After the details page has opened, press space bar will scroll the chats up. What is the root cause of that problem?This happens because the current What changes do you think we should make in order to solve the problem?We need to add focus trap to the pages in the right sidebar, we can use this package https://github.com/focus-trap/focus-trap-react, and add the Line 101 in f1769bc
(other pages with the same issue will also need to be fixed) What alternative solutions did you explore? (Optional)We can add the focus trap in the |
Looks like something related to As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our Feel free to drop a note in #expensify-open-source with any questions. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When the details page is open, pressing on space bar will cause scroll down/up (based on the initial position). What is the root cause of that problem?As we can see, the chats section has a stack of components, with the details modal being the most recent one. Any scroll event triggered by the user (in this case, by pressing the space key) will be applied to the body element since the details page does not have a body element of its own. This means that the scroll event will automatically be applied to the parent component, which is a normal and expected behavior. What changes do you think we should make in order to solve the problem?As the problem is caused by normal behavior, I suggest simply disabling scrolling using the space key when the details page is open. Adding more complexity, packages, or changing the stack view behavior is not the best solution. Therefore, we need to add an event listener on the details page that listens for a "keydown" event with a code of 32 (space) in the componentDidMount(), and prevent the default action on the body, we should also add a little function to handle the event.
What alternative solutions did you explore? (Optional)We also considered an alternative solution of disabling scrolling using the space key on all pages in the app by adding the listener on the app component. This ensures that the issue will not occur again. |
📣 @you1996! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Format:
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
📣 @pradhankukiran! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Format:
|
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Looks like we're currently HOLDing for #32815 |
Also, I'm going to go ahead and make this lower-priority issue into a weekly |
@roryabraham linked PR fixes regression which wasn't coming from my changes (but it was linked to my PR anyway), so I think we don't need to hold. |
PR is being actively reviewed! |
PR is reviewed, but we're going to do the QA before merging. |
Kicked off QA here |
Regression testing was completed (notes), no issues 🎉 |
PR is under review |
@kosmydel reports this was unknowingly fixed by #ideal-nav. I wasn't able to reproduce this anymore. I think we should close it out? |
Ha, well would you look at that! |
Love it when that happens! Ok, given that we had 3 PRs reviewed (2 of which were merged), I think payment is due here however the regression penalty would apply. Some quick math: Original job price $1000
That would make the payout summary:
Upwork job is here: https://www.upwork.com/jobs/~0112187286e2fd23a2 |
All paid! |
Hey, good to know that the issue doesn't occur anymore. However, I want to confirm, if we don't want to introduce the FocusTrap anyway. It did not only meant to solve this issue, but also improved the accessibility and tab navigation on the web/desktop. |
@kosmydel can you be more specific about what accessibility problem it solves? |
Tab navigation is used together with e.g. VoiceOver on macOS to help people with visual disabilities. Currently, if the e.g. RHP modals don't support focus trap, tab navigation is almost impossible (or at least cumbersome). We are "tabbing" outside the modal, which is probably not what a user expects after pressing the button that opens it. The navigation order is not correct. |
Ok, I think that makes sense. @kosmydel can you create a separate issue using the standard issue template Generally we aren't prioritizing accessibility too highly but given that this is already pretty much ready and we've already discovered then fixed the regressions it caused, we can talk about it. |
@roryabraham @stephanieelliott Sorry for coming late, I think I'm also eligible for partial compensation (suggested by @fedirjh here)
|
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
Nothing should happen
Actual Result
Chats are scrolled up
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.78-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:
Screen.Recording.2023-02-28.at.3.29.35.PM.mov
Recording.118.mp4
Expensify/Expensify Issue URL:
Issue reported by: @esh-g
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1677578613083529
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: