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 2023-10-13] [$500] Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab #28047

Closed
1 of 6 tasks
kbecciv opened this issue Sep 22, 2023 · 35 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

@kbecciv
Copy link

kbecciv commented Sep 22, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Click on FAB button
  3. Select Send message from dropdown
  4. Put random e-mail in the input field
  5. Try to select part of the e-mail by dragging

Expected Result:

The e-mail address should be easily highlighted

Actual Result:

User navigates to Room tab when drag to select e-mail from Chat tab

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

Bug6210931_Recording__1060.mp4

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013efbb12cd17aad2f
  • Upwork Job ID: 1705746404787040256
  • Last Price Increase: 2023-09-24
  • Automatic offers:
    • mollfpr | Reviewer | 26877122
    • akinwale | Contributor | 26877123
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 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

@ginsuma
Copy link
Contributor

ginsuma commented Sep 22, 2023

Proposal

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

Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab

What is the root cause of that problem?

This is a feature that allows users to swipe to change tabs. Depending on the browser, dragging to select (not just text, maybe images, or something else) can cause a swipe action to change tabs.

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

This issue only happens on the web app, so we can disable this feature on them
In OnyxTabNavigator, we add something like below

<TopTab.Navigator
  screenOptions={{
      swipeEnabled: shouldDisableSwipe,
  }}
  ...

@akinwale
Copy link
Contributor

Proposal

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

When attempting to select the email address in the text input of the Chat tab, the tab swipes to show the Room tab.

What is the root cause of that problem?

Attempting to swipe or drag anywhere on the tab screens results in a swipe action which will change the current tab, regardless of the focused or active control.

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

Add a PanResponder to the target control in order to handle the swipe action and prevent the tab from swiping. This can be added to a wrapper View for the text input control in BaseOptionsSelector.

const panResponder = PanResponder.create({
    onMoveShouldSetPanResponder: () => true,
    onPanResponderTerminationRequest: () => false,
});
...
<View {...panResponder.panHandlers}>
  <TextInput
      ...
  />
</View>

Since this will also affect the text input on the Room tab, we can create a lib file that defines the pan responder and then wrap each of the affected text inputs with a View that uses the pan responder's handlers.

What alternative solutions did you explore? (Optional)

None.

28047-demo.mp4

@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 24, 2023
@melvin-bot melvin-bot bot changed the title Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab [$500] Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab Sep 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 24, 2023

Job added to Upwork: https://www.upwork.com/jobs/~013efbb12cd17aad2f

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

melvin-bot bot commented Sep 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 24, 2023

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

@mollfpr
Copy link
Contributor

mollfpr commented Sep 25, 2023

Please re-state the problem that we are trying to solve in this issue.
Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab

@ginsuma Please don't just copy the title to re-state the problem. Your solution is not fixing this issue; we still want to be able to navigate the tab with a swipe on all platforms.

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Sep 25, 2023

@akinwale Your proposal looks good. We already have the same pan responder in the MapView. For better understanding, could you explain more about the combination of onMoveShouldSetPanResponder and onPanResponderTerminationRequest fixing the issue?

@akinwale
Copy link
Contributor

akinwale commented Sep 25, 2023

@mollfpr

onMoveShouldSetPanResponder is triggered when there is any movement gesture on the control either horizontally or vertically. Setting it to true enables the view which has the handler set to become the responder for the move gesture. In this case, since we set the pan handler for the wrapper view, it starts to handle the move gesture, instead of the parent tab view which does the swiping.

onPanResponderTerminationRequest deals with the parent view intercepting or interrupting the current gesture being handled. This could happen in empty areas of the view handling the gesture. Empty areas are the parts of the view that don't have any text content or subviews that can be interacted with. When the movement gesture gets to this empty area, the view's gesture handling is terminated, and the parent takes over, unless we set the termination request to return false.

Hope that makes sense.

@mollfpr
Copy link
Contributor

mollfpr commented Sep 25, 2023

Thanks @akinwale!

The proposal from @akinwale looks good to me!

🎀 👀 🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

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

@puneetlath
Copy link
Contributor

Should we udpate our text inputs to work like this more generally? Is there ever a scenario where we want this swipe gesture to work when swiping within a text input?

@akinwale
Copy link
Contributor

Should we udpate our text inputs to work like this more generally? Is there ever a scenario where we want this swipe gesture to work when swiping within a text input?

This only really affects text inputs that are used within swipeable tabs, so maybe we could have a separate component called SwipeInterceptTextInput (or a better name?), which can be used in these scenarios. The root view of the component would have the necessary pan handlers set up.

@puneetlath
Copy link
Contributor

This only really affects text inputs that are used within swipeable tabs

That makes sense. Would there be a downside of adding this swipe intercept code to all TextInputs anyways?

@akinwale
Copy link
Contributor

This only really affects text inputs that are used within swipeable tabs

That makes sense. Would there be a downside of adding this swipe intercept code to all TextInputs anyways?

I can't say for sure. In BaseTextInput there is a wrapper view around RNTextInput, so maybe we could (conditionally?) add the panhandlers to that instead.

<View
style={[styles.textInputAndIconContainer, isMultiline && hasLabel && styles.textInputMultilineContainer]}
pointerEvents="box-none"
>

So essentially create a new prop interceptsSwipe and when it's true add the pan handler to the View.

@puneetlath
Copy link
Contributor

I like that approach. What do you think @mollfpr?

@mollfpr
Copy link
Contributor

mollfpr commented Sep 26, 2023

Yup, I agree with making the component generic in case we have a similar case happen.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

📣 @mollfpr 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@puneetlath
Copy link
Contributor

Great, let's do it.

@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer 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 📖

@akinwale
Copy link
Contributor

@mollfpr My PR is ready for review. Thanks.

@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @akinwale got assigned: 2023-09-26 05:49:34 Z
  • when the PR got merged: 2023-10-03 16:38:58 UTC
  • days elapsed: 5

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 6, 2023
@melvin-bot melvin-bot bot changed the title [$500] Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab [HOLD for payment 2023-10-13] [$500] Web - Send message screen - User navigates to Room tab when drag to select e-mail from Chat tab Oct 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.78-4 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-10-13. 🎊

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

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:

  • [@akinwale / @mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale / @mollfpr] 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:
  • [@akinwale / @mollfpr] 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:
  • [@akinwale / @mollfpr] Determine if we should create a regression test for this bug.
  • [@akinwale / @mollfpr] 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.
  • [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 12, 2023
@laurenreidexpensify
Copy link
Contributor

Payment Summary:

  • External issue reporter - Applause N/A
  • Contributor that fixed the issue - @akinwale payment issued in Upwork $500
  • Contributor+ that helped on the issue and/or PR - @mollfpr please accept offer in Upwork, payment owed $500

Please update the checklist steps above so we can close out. Thanks!

@akinwale
Copy link
Contributor

@laurenreidexpensify Could this be considered eligible for the speed bonus? There was a delay with merging the PR. Thanks.

cc @puneetlath

@mollfpr
Copy link
Contributor

mollfpr commented Oct 15, 2023

[@akinwale / @mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale / @mollfpr] 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:

No offending PR. The issue arises when implementing the slide tab navigation, but we improve our TextInput component to ignore swiping the tab inside the text input.

[@akinwale / @mollfpr] 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:

This should be a one time bug, the regression step should be enough.

[@akinwale / @mollfpr] Determine if we should create a regression test for this bug.
[@akinwale / @mollfpr] 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.

Precondition: the account should be in beta or at least can create a room chat.

  1. Launch Expensify
  2. Open the global create menu and select Send message
  3. Enter an email address in the text input in the Chat tab
    • On the web and desktop, verify that attempting to select the text in the text input does result in a swipe to the Room tab.
    • On native iOS, verify that when the text is in selection mode, dragging the text selection handles does not result in a swipe to the Room tab.
    • On native Android, verify that when the text input is focused, dragging within the text input does not result in a swipe to the Room tab.
  4. Switch to the Room tab.
  5. Enter some text for the room name.
  6. Run the same verifications for step 4 with the room name input.

@mollfpr
Copy link
Contributor

mollfpr commented Oct 16, 2023

@laurenreidexpensify Could you confirm if we are eligible for the speed bonus? Thanks!

@laurenreidexpensify
Copy link
Contributor

@puneetlath do you agree this is eligible for the speed bonus?

@puneetlath
Copy link
Contributor

Yes, that seems fair given me accidentally not merging after approving.

@laurenreidexpensify
Copy link
Contributor

laurenreidexpensify commented Oct 18, 2023

Updated Payment Summary:

  • External issue reporter - Applause N/A
  • Contributor that fixed the issue - @akinwale payment issued in Upwork $500 + 50% bonus = $750
  • Contributor+ that helped on the issue and/or PR - @mollfpr request in newdot $500 + 50% bonus = $750

@mollfpr
Copy link
Contributor

mollfpr commented Oct 18, 2023

@laurenreidexpensify I make manual requests in NewDot for this issue 😄

@JmillsExpensify
Copy link

$750 payment approved for @mollfpr based on summary above.

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
None yet
Development

No branches or pull requests

7 participants