Skip to content

[HOLD for payment 2023-08-21] [$2000] Hitting enter key on keyboard does not select a pronoun #21472

Closed

Description

@kavimuru

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. Open ND on android
  2. Go to settings > Profile > Pronouns
  3. Search a pronoun
  4. Hit on Enter / tick mark key on keyboard
  5. Observe the behavior
  6. Open mWeb and do step 2 - 5

Expected Result:

The behavior on both mWeb and Android should be the same.

Actual Result:

On android hitting the enter key does nothing other than closing the keyboard, but on mWeb hitting the enter key on keyboard selects the searched pronoun

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.30-2
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: Any additional supporting documentation

Screen_Recording_20230618_202315_Chrome.mp4
az_recorder_20230623_183852.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687109264930579

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01763c040cae5d6f20
  • Upwork Job ID: 1673255740814970880
  • Last Price Increase: 2023-07-17

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Jun 23, 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. jakub-trzebiatowski commented on Jun 24, 2023

    @jakub-trzebiatowski
    Contributor

    Proposal

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

    When the "Submit" button is pressed on the virtual keyboard, the focused pronouns aren't selected.

    What is the root cause of that problem?

    While we subscribe to "Enter" key presses via KeyboardShortcut.subscribe, this doesn't work on Native.

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

    Minor changes should be done to the BaseOptionsSelector component.

    We should extract the relevant logic and call it...

    Extracted logic:

    selectFocusedOption() {
        const focusedOption = this.state.allOptions[this.state.focusedIndex];
        if (!focusedOption || !this.props.isFocused) {
            return;
        }
        if (this.props.canSelectMultipleOptions) {
            this.selectRow(focusedOption);
        } else if (!this.state.shouldDisableRowSelection) {
            this.setState({shouldDisableRowSelection: true});
            let result = this.selectRow(focusedOption);
            if (!(result instanceof Promise)) {
                result = Promise.resolve();
            }
            setTimeout(() => result.finally(() => this.setState({shouldDisableRowSelection: false})), 500);
        }
    }

    Call from the KeyboardShortcut.subscribe callback:

    this.unsubscribeEnter = KeyboardShortcut.subscribe(
        enterConfig.shortcutKey,
        () => {
            this.selectFocusedOption();
        },
        enterConfig.descriptionKey,
        enterConfig.modifiers,
        true,
        () => !this.state.allOptions[this.state.focusedIndex],
    );

    Call from the onSubmitEditing callback:

    <TextInput
        // ...
        onChangeText={this.props.onChangeText}
        onSubmitEditing={()=> {
            this.selectFocusedOption();
        }}
        // ...
    />

    My branch

  5. conorpendergrast commented on Jun 26, 2023

    @conorpendergrast
    Contributor

    We see the same behaviour in selecting timezone and currency (during a money request and split) too, by the way!

    Timezone Request - Currency Split - Currency
    image image image
  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 26, 2023
  7. changed the title [-]Hitting enter key on keyboard does not select a pronoun[/-] [+][$1000] Hitting enter key on keyboard does not select a pronoun[/+] on Jun 26, 2023
  8. melvin-bot commented on Jun 26, 2023

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 26, 2023
  10. melvin-bot commented on Jun 26, 2023

    @melvin-bot

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

  11. 80 remaining items

  12. changed the title [-][$2000] Hitting enter key on keyboard does not select a pronoun[/-] [+][HOLD for payment 2023-08-21] [$2000] Hitting enter key on keyboard does not select a pronoun[/+] on Aug 14, 2023
  13. melvin-bot commented on Aug 14, 2023

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on Aug 14, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.53-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2023-08-21. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    For reference, here are some details about the assignees on this issue:

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  15. melvin-bot commented on Aug 14, 2023

    @melvin-bot

    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:

    • [@cubuspl42 / @rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
    • [@cubuspl42 / @rushatgabhane] 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:
    • [@cubuspl42 / @rushatgabhane] 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:
    • [@cubuspl42 / @rushatgabhane] Determine if we should create a regression test for this bug.
    • [@cubuspl42 / @rushatgabhane] 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.
    • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  16. rushatgabhane commented on Aug 14, 2023

    @rushatgabhane
    Member
    1. The PR that introduced the bug has been identified. Link to the PR: Standardize arrow navigation in OptionsLists #7702

    2. 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: https://github.com/Expensify/App/pull/7702/files#r1293917132

    3. 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: N.A.

    4. Determine if we should create a regression test for this bug. No

    5. 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 - N.A.

  17. rushatgabhane commented on Aug 14, 2023

    @rushatgabhane
    Member

    created a manual request incl bonus ($3k) https://staging.new.expensify.com/r/5354089055656094

  18. conorpendergrast commented on Aug 21, 2023

    @conorpendergrast
    Contributor

    Payouts due:

    Eligible for 50% #urgency bonus? Yes

    Upwork job is here.

  19. conorpendergrast commented on Aug 21, 2023

    @conorpendergrast
    Contributor

    All done now, thanks everyone!

  20. JmillsExpensify commented on Aug 24, 2023

    @JmillsExpensify
    Contributor

    Reviewed the details for @rushatgabhane. $3,000 payment approved via NewDot based on the BZ summary above.

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.DailyKSv2Engineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions