Skip to content

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

Description

@mvtglobally

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 2, 2023
  2. melvin-bot commented on Aug 2, 2023

    @melvin-bot

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

  3. melvin-bot commented on Aug 2, 2023

    @melvin-bot

    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
  4. jfquevedol2198 commented on Aug 2, 2023

    @jfquevedol2198
    Contributor

    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;
    }
  5. trjExpensify commented on Aug 7, 2023

    @trjExpensify
    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?

  6. melvin-bot commented on Aug 10, 2023

    @melvin-bot

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

  7. 176 remaining items

  8. parasharrajat commented on Jul 17, 2024

    @parasharrajat
    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.

  9. trjExpensify commented on Jul 18, 2024

    @trjExpensify
    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

  10. parasharrajat commented on Jul 19, 2024

    @parasharrajat
    Member

    @trjExpensify Updated.

  11. trjExpensify commented on Jul 19, 2024

    @trjExpensify
    Contributor

    Cool done, closing!

  12. dhanashree-sawant commented on Jul 19, 2024

    @dhanashree-sawant

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

  13. trjExpensify commented on Jul 23, 2024

    @trjExpensify
    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?

  14. dhanashree-sawant commented on Jul 23, 2024

    @dhanashree-sawant

    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.

  15. trjExpensify commented on Jul 23, 2024

    @trjExpensify
    Contributor

    Yep, that makes sense. We honour those.

    Payment summary as follows:

    Offer sent!

  16. dhanashree-sawant commented on Jul 23, 2024

    @dhanashree-sawant

    Many Thanks @trjExpensify, I have accepted the offer.

  17. trjExpensify commented on Jul 23, 2024

    @trjExpensify
    Contributor

    Paid, closing.

  18. parasharrajat commented on Aug 3, 2024

    @parasharrajat
    Member

    Payment requested as per #24074 (comment)

  19. JmillsExpensify commented on Aug 3, 2024

    @JmillsExpensify
    Contributor

    $1,000 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions