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

Personal Details - Selected month changes to current month after selecting a year in the picker #16358

Closed
1 of 6 tasks
kbecciv opened this issue Mar 21, 2023 · 13 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Mar 21, 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!


Issue found when executing PR #15343

Action Performed:

  1. Go to staging.new.expensify.com
  2. Enter the Date of Birth page
  3. Click on the calendar icon
  4. Change the month using the arrows
  5. Click the year
  6. After navigating to the new screen select another year
  7. It should go back to screen with calendar open and new year in the picker
  8. Pay attention to selected month in the date picker

Expected Result:

The previously selected month (on step 3) is displayed in the date picker after selecting a year.

Actual Result:

Selected month changes to current month after selecting a year in the picker

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.88.0

Reproducible in staging?: Yes

Reproducible in production?: Different picker in production

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

Bug5987017_15343_Desktop.1.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 21, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 21, 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

@mountiny
Copy link
Contributor

regression from a Date picker PR, asking if the author can take this bug on

@ArekChr
Copy link
Contributor

ArekChr commented Mar 24, 2023

@mountiny Sure, I can work on that issue, would you assign me?

@mountiny
Copy link
Contributor

Arek will work on this one

@melvin-bot melvin-bot bot removed the Overdue label Mar 24, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Mar 24, 2023

Proposal

Problem Statement

When navigating to the push-to-page year list screen on the web app, the selected month in the calendar changes to the current month after selecting a year.

Root Cause

The root cause of the problem is that the DOB TextInput is blurred when navigating to the push-to-page screen, which causes closing the calendar and the selected month to lose their state.

First Solution

I propose to store the selected month value in the NewDatePicker component.
This way, the previously selected month will be saved when going back from the year list to the calendar.
This will prevent the selected month from resetting to the current month after selecting a year.

Second Solution

Another solution is to prevent the picker from closing when TextInput is blurred while navigating the year page.
In this case, the picker will not hide when navigating to the push-to-page screen.

But this will also change the behaviour of the closing calendar as it will prevent closing the calendar when pressing outside of the component.
That will change a bit of close behaviour because we must select a date to close the calendar.
This is how it currently works on mobile.

I am still exploring ways to keep the calendar open while not breaking its ability to close when the user clicks outside.

@mountiny
Copy link
Contributor

@ArekChr lets go with the first solution! Thanks

This can always be updated as we find whats the best ux for the user in terms of closing/ opening the calendar

@ArekChr
Copy link
Contributor

ArekChr commented Mar 24, 2023

Sure! working on PR

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Mar 24, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Mar 24, 2023

Hey, PR is ready for review.

@mountiny
Copy link
Contributor

thank you, gonna test and review.

@MelvinBot
Copy link

@michaelhaxhiu, @ArekChr, @mountiny Huh... This is 4 days overdue. Who can take care of this?

@MelvinBot
Copy link

@michaelhaxhiu, @ArekChr, @mountiny 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@mountiny
Copy link
Contributor

mountiny commented Apr 5, 2023

No payments need to be handled here. Thanks everyone!

@mountiny mountiny closed this as completed Apr 5, 2023
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 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

5 participants