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 2022-08-01] [$250] Web - New Room - Drop down is opened again after use the Enter Key to create a new room #9741

Closed
kbecciv opened this issue Jul 6, 2022 · 20 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jul 6, 2022

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 staging.new.expensify.com
  2. Log in with expensifail account
  3. Click on Fub menu - New Room
  4. Type any room and use Enter Key
  5. Select any Workspace and use Enter Key
  6. Select any Visibility option and use Enter Key

Expected Result:

Drop down should not open again after use Enter Key

Actual Result:

Drop down is opened again after use the Enter Key to create a new room

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.79.17

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any expensifail account

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Recording.729.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@melvin-bot
Copy link

melvin-bot bot commented Jul 6, 2022

Triggered auto assignment to @MariaHCD (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@MariaHCD
Copy link
Contributor

MariaHCD commented Jul 7, 2022

Unable to reproduce on staging or on local on a mac:

Untitled_.Jul.7.2022.4_56.PM.mp4

But I am able to reproduce the issue on a windows device.

@MariaHCD MariaHCD added the External Added to denote the issue can be worked on by a contributor label Jul 7, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2022

Triggered auto assignment to @MitchExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MitchExpensify
Copy link
Contributor

Upwork Job

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 7, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2022

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

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

melvin-bot bot commented Jul 7, 2022

Triggered auto assignment to @marcochavezf (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot changed the title Web - New Room - Drop down is opened again after use the Enter Key to create a new room [$250] Web - New Room - Drop down is opened again after use the Enter Key to create a new room Jul 7, 2022
@eVoloshchak
Copy link
Contributor

eVoloshchak commented Jul 8, 2022

Proposal:
When user presses Enter (when this listener fires), we need to call event.preventDefault() so the browser will not handle this event and dropdown will stay closed

this.unsubscribe = KeyboardShortcut.subscribe(shortcutConfig.shortcutKey, (e) => {
    if (!this.props.isFocused || this.props.isDisabled || this.props.isLoading || (e && e.target.nodeName === 'TEXTAREA')) {
        return;
    }
+   e.preventDefault();
    this.props.onPress();
}, shortcutConfig.descriptionKey, shortcutConfig.modifiers, true, false, this.props.enterKeyEventListenerPriority, false);

Before:

cinnamon-20220708-10.mp4

After:

cinnamon-20220708-11.mp4

Alternatively, if this somehow breaks usage of Button on other screens, we can do the same thing for this specific screen on WorkspaceNewRoomPage

validateAndCreatePolicyRoom(e) {
+   e.preventDefault();
    if (!this.validate()) {
        return;
    }

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2022

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

@MitchExpensify MitchExpensify added Weekly KSv2 and removed Daily KSv2 labels Jul 11, 2022
@melvin-bot melvin-bot bot removed the Overdue label Jul 11, 2022
@mananjadhav
Copy link
Collaborator

@eVoloshchak Went through your proposal and looks like preventDefault will fix it. I'd like to clarify the following:

Alternatively, if this somehow breaks usage of Button on other screens

  1. Did you check if it breaks anything anywhere?
  2. e.preventDefault can you confirm if this break anything on the mobile app side?

@eVoloshchak
Copy link
Contributor

  1. Did you check if it breaks anything anywhere?

Yes. I checked whatewer seemed logical to check, but I'm not used to navigating a site using keyboard, so I can't check all. In theory it shouldn't break anything, so I think we may add this change to Button, and in case it causes any regressions, move it to WorkspaceNewRoomPage

  1. e.preventDefault can you confirm if this break anything on the mobile app side?

Keyboard shortcuts are disabled on native, so this listener will never be fired. But then the shorcuts will be added to native apps, it should work fine.

@mananjadhav
Copy link
Collaborator

I tested this on Desktop. I am not able to reproduce this on Mac, but once on Windows. @eVoloshchak's proposal looks good.

🎀 👀 🎀 C+ reviewed

cc - @marcochavezf

@marcochavezf
Copy link
Contributor

Cool, thank you guys! Assigning @eVoloshchak 👍🏽

@melvin-bot
Copy link

melvin-bot bot commented Jul 18, 2022

📣 @eVoloshchak You have been assigned to this job by @marcochavezf!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 18, 2022
@eVoloshchak
Copy link
Contributor

PR is up

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@MitchExpensify
Copy link
Contributor

Reminder to pay on August 1st assuming no regressions

@mountiny mountiny changed the title [$250] Web - New Room - Drop down is opened again after use the Enter Key to create a new room [HOLD for payment 2022-08-01] [$250] Web - New Room - Drop down is opened again after use the Enter Key to create a new room Jul 28, 2022
@mountiny mountiny added the Awaiting Payment Auto-added when associated PR is deployed to production label Jul 28, 2022
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@MitchExpensify
Copy link
Contributor

Paid @eVoloshchak, just waiting on @mananjadhav to accept the offer to process C+ payment then we'll close this out

@mananjadhav
Copy link
Collaborator

just waiting on @mananjadhav to accept the offer

Done @MitchExpensify

@MitchExpensify
Copy link
Contributor

Paid and contracts ended, thanks everyone!

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 Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants