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

[$500] Workspace - Currency list scrolls up when opening currency list immediately after selecting it #30951

Closed
4 of 6 tasks
kbecciv opened this issue Nov 7, 2023 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Nov 7, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.3.96.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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Go to Settings > Workspaces > any workspace.
  3. Click Settings > Default currency.
  4. Select another currency.
  5. Immediately click on Default currency when navigated back to workspace settings.

Expected Result:

The currency list will not scroll up.

Actual Result:

The currency list scrolls up.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6266778_1699325727452.20231107_084753__1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014c774584f7eaf06c
  • Upwork Job ID: 1721723629691908096
  • Last Price Increase: 2023-11-07
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 7, 2023
@melvin-bot melvin-bot bot changed the title Workspace - Currency list scrolls up when opening currency list immediately after selecting it [$500] Workspace - Currency list scrolls up when opening currency list immediately after selecting it Nov 7, 2023
Copy link

melvin-bot bot commented Nov 7, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014c774584f7eaf06c

Copy link

melvin-bot bot commented Nov 7, 2023

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Nov 7, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 7, 2023
Copy link

melvin-bot bot commented Nov 7, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)

@shubham1206agra
Copy link
Contributor

Maybe dupe of #26978

@DylanDylann
Copy link
Contributor

regression from this PR #30438

@tienifr
Copy link
Contributor

tienifr commented Nov 7, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The currency list scrolls up.

What is the root cause of that problem?

In here, we'll scroll to top whenever the sections change, but the sections can change when the selected item change too, so even when the original list is not changed, it will still scroll to the top.

What changes do you think we should make in order to solve the problem?

Listening to sections changes is not ideal due to the above reason.

We need to use the flattenedSections.allOptions instead, and in the useEffect we also should make sure the flattenedSections.allOptions, when omitting the isSelected from all items, have changed compared to the previous value.

Only after all that conditions are satisfied, we'll scroll to the top, this is the same approach as the OptionsSelector (OptionsSelector does not have isSelected inside items)

What alternative solutions did you explore? (Optional)

An even better design is to not embed the isSelected inside sections, but use a selectedItem prop instead, similar to the OptionsSelector

@twisterdotcom
Copy link
Contributor

@robertKozik and @allroundexperts - is @DylanDylann correct? Should we treat this as a regression from #30438

@melvin-bot melvin-bot bot added the Overdue label Nov 9, 2023
@twisterdotcom
Copy link
Contributor

bump for your thoughts @robertKozik and @allroundexperts

@melvin-bot melvin-bot bot removed the Overdue label Nov 9, 2023
@situchan
Copy link
Contributor

We can close this and handle in #29080.
The offending PR should have been reverted earlier but unfortunately that was not marked as deploy blocker though was caught in staging.

@melvin-bot melvin-bot bot added the Overdue label Nov 13, 2023
Copy link

melvin-bot bot commented Nov 13, 2023

@twisterdotcom, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@robertKozik
Copy link
Contributor

@twisterdotcom Yes it is regression from that PR/issue.

Copy link

melvin-bot bot commented Nov 13, 2023

@twisterdotcom, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@twisterdotcom
Copy link
Contributor

Okay, closing here then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants