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

[HOLD for payment 2024-07-10] [$1000] Double click enter to select value on pronouns and timezone edit pages navigates "back" twice #24074

Closed
2 of 6 tasks
mvtglobally opened this issue Aug 2, 2023 · 110 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@mvtglobally
Copy link

mvtglobally commented Aug 2, 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!


Action Performed:

  1. Go to avatar > settings > profile > pronouns
  2. Search for a value that matches i.e "He / Him"
  3. Double tap enter to select the value
  4. Observe you're navigated back to the Settings page (i.e two pages in the nav stack)

Note: Same results on the timezone edit selection page.

Expected Result:

Use should only navigate back the one page in the nav stack when making a selection on the edit page.

Actual Result:

"Multi-tapping" is recognised and navigates back as many pages as you press enter. E.g twice = two pages, three times = three pages etc.

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.3.47-3
Reproducible in staging?: Y
Reproducible 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

double.enter.causes.double.back.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690794214667299

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fd11cd8ee50c8dff
  • Upwork Job ID: 1691023835344474112
  • Last Price Increase: 2023-08-14
  • Automatic offers:
    • huzaifa-99 | Contributor | 26238925
Issue OwnerCurrent Issue Owner: @trjExpensify
@mvtglobally mvtglobally added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 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

@jfquevedol2198
Copy link
Contributor

jfquevedol2198 commented Aug 2, 2023

Updated Proposal

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

Double enter click to select value on pronouns and timezone navigates user to main page/main settings page

What is the root cause of that problem?

navigation.goBack() is wrong. When current active route is /settings/profile and we call navigation.goBack('settings/profie'), it goes to back /settings.

For this reason, when we are on Pronouns Select Page and click Enter key twice, it calls navigation.goBack('settings/profie') twice, but it goes to /settings/profile, and /settings

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

  1. Update goBack method, this will prevent to goBack to current route.
    if (!canNavigate('goBack') || isActiveRoute(fallbackRoute)) {
        return;
    }
  1. And Update updatePronouns, so we will prevent to update pronouns to empty.
    PersonalDetails.updatePronouns(selectedPronouns.keyForList === initiallyFocusedOption.keyForList ? '' : lodashGet(selectedPronouns, 'value', ''));

    In this line, if new pronouns is same as current pronouns, it passes empty string in updatePronouns, so if pronouns is empty, we can perform goBack action only.
function updatePronouns(pronouns) {
    if (pronouns !== '') {
       API.write(...)
    }
    Navigation.goBack(ROUTES.SETTINGS_PROFILE);
}

What alternative solutions did you explore? (Optional)

We can update canNavigate like this:

function canNavigate(methodName, params = {}) {
    if (navigationRef.isReady() && !isActiveRoute(params['route'])) {
        return true;
    }
    Log.hmmm(`[Navigation] ${methodName} failed because navigation ref was not yet ready`, params);
    return false;
}

And, update goBack function like this:

if (!canNavigate('goBack', {route: fallbackRoute})) {
    return;
}

@melvin-bot melvin-bot bot added the Overdue label Aug 4, 2023
@trjExpensify
Copy link
Contributor

Ah, this got assigned to me while I was OoO. Sorry for the delay! I can reproduce this one on desktop as well, so ticked that platform off and removed the needs reproduction label.

I'd quite like an opinion from @mountiny on the expected result here. I don't really see the real world use of "multi-tapping" enter to go back multiple pages in the nav stack, whether that be two, three or ten pages. So IMO, we should just go back the once (because that's the behaviour after the selection on the page you're pushed to). What do you think?

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@trjExpensify trjExpensify added Overdue and removed Needs Reproduction Reproducible steps needed Overdue labels Aug 7, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

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

@trjExpensify
Copy link
Contributor

Bump @mountiny, maybe @shawnborton you have an opinion on this one as well. :)

@melvin-bot melvin-bot bot removed the Overdue label Aug 11, 2023
@shawnborton
Copy link
Contributor

"App should go back once on twice enter click to select value on pronouns or timezone page" - I don't think I understand what this means?

@trjExpensify
Copy link
Contributor

😅 TL;DR

If you're a few pages deep in the nav, open up a push to page edit screen. "double tap" enter to select the value and it will navigate you back two pages in the app stack. If you triple tap, it goes back three pages etc.

IMO, we should just go back the once (because that's the behaviour after the selection on the page you're pushed to) however gung-ho you are with the enter button to make the selection.

@shawnborton
Copy link
Contributor

Got it. Yup, I agree with that.

@melvin-bot melvin-bot bot added the Overdue label Aug 14, 2023
@trjExpensify trjExpensify changed the title Double enter click to select value on pronouns and timezone navigates user to main page/main settings page Double click enter to select value on pronouns and timezone edit pages navigates "back" twice Aug 14, 2023
@trjExpensify
Copy link
Contributor

Cool, nice! Updated the OP to reflect that and moved this on.

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@trjExpensify trjExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Aug 14, 2023
@melvin-bot melvin-bot bot changed the title Double click enter to select value on pronouns and timezone edit pages navigates "back" twice [$1000] Double click enter to select value on pronouns and timezone edit pages navigates "back" twice Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01fd11cd8ee50c8dff

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

melvin-bot bot commented Aug 14, 2023

Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Jul 3, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@mountiny
Copy link
Contributor

mountiny commented Jul 3, 2024

I believe it just got deployed to production

@trjExpensify
Copy link
Contributor

Yeah, looks like it.

@trjExpensify
Copy link
Contributor

Checklist time!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 10, 2024
@parasharrajat
Copy link
Member

parasharrajat commented Jul 15, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: Not PRs, it had been the default behavior.
  • [@parasharrajat] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: NA
  • [@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA
  • [@parasharrajat] Determine if we should create a regression test for this bug. Yes
  • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Steps

  1. Go to Profile.
  2. Open the Pronouns Settings page.
  3. Verify that pressing any unselected option from the list multiple times (either with a mouse click, touch, arrow keys + enter) doesn’t navigate to or navigate back multiple times or make multiple API calls.
  4. And that option gets selected as a result.

Note: links for these pages can change. Please update these as needed and easy to track.

Do you agree 👍 or 👎 ?

@trjExpensify
Copy link
Contributor

Okay and confirming one regression?

@melvin-bot melvin-bot bot removed the Overdue label Jul 15, 2024
@parasharrajat
Copy link
Member

I think yes but the PR was pretty heavy for testing. There were many pages to test. It also needed two PRs.

Is it possible to keep the same price tag on this issue? cc: @huzaifa-99

@mountiny
Copy link
Contributor

I am fine with keeping the full price on this one. This issue was created in August 2023, and it's been a long battle. There were regressions and I think we are still trying to find the ideal solution, but @huzaifa-99 's solution got us into a better place and it was lots of work and effort to do so $1000 seems fair.

@mountiny
Copy link
Contributor

For the regression tests, I think we just need one page like PronounsPage -> /settings/profile/pronouns and make sure the tester clicks really fast to see if the page opens/ navigates mulitple times.

I dont think its viable to test all these pages

@trjExpensify
Copy link
Contributor

Alright, so payment summary as follows:

@trjExpensify
Copy link
Contributor

As for the regression test, I agree with suggesting 1. Can you make this more readable and standardised in a format of numbered steps that a tester can repeatably follow if we were to add this to TestRail, @parasharrajat?

@parasharrajat
Copy link
Member

I updated the formatting. But I can't list down steps for each page as each has separate functionality. The main step or interaction is mentioned in point 1. If the page has a selection list of options, try clicking it multiple times.

Hope this is sufficient.

@trjExpensify
Copy link
Contributor

But I can't list down steps for each page as each has separate functionality.

I thought we agreed on just the one, so we can focus on pronouns or something?

I think we just need one page like PronounsPage -> /settings/profile/pronouns

@parasharrajat
Copy link
Member

@trjExpensify Updated.

@trjExpensify
Copy link
Contributor

Cool done, closing!

@dhanashree-sawant
Copy link

Hi @trjExpensify, @mountiny, @parasharrajat is this issue eligible for reporting bonus?

@trjExpensify
Copy link
Contributor

Oh yeah, this is old and I didn't spot the reportedBy. So yes, I believe this is still eligible for $50 for the bug report. Are you still on Upwork?

@trjExpensify trjExpensify reopened this Jul 23, 2024
@dhanashree-sawant
Copy link

Thanks @trjExpensify, Yes I am still on upwork, here is my profile link
https://www.upwork.com/freelancers/~016c7b8ae165dc0bda
Actually the issue was created before 31st August 2023 (the deadline after which we changed reporting bonus from 250 to 50 dollars) but at this stage of the project, I will be happy with whatever you decide.

@trjExpensify
Copy link
Contributor

Yep, that makes sense. We honour those.

Payment summary as follows:

Offer sent!

@dhanashree-sawant
Copy link

Many Thanks @trjExpensify, I have accepted the offer.

@trjExpensify
Copy link
Contributor

Paid, closing.

@parasharrajat
Copy link
Member

Payment requested as per #24074 (comment)

@JmillsExpensify
Copy link

$1,000 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests