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-03-28] [$1000] Couldn’t copy by command C on the placeholder in the Search Page after selecting it #15800

Closed
1 of 6 tasks
kavimuru opened this issue Mar 9, 2023 · 44 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Mar 9, 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. Open App
  2. Click on avatar in LHN to open the search page
  3. Click on the search title and press Command + C
  4. Exit right pane and Press command V to paste content in chat box.
  5. Click on avatar in LHN to open the search page
  6. Move the mouse close to the search input (but the mouse is displayed the cursor instead of the input mouse)
  7. Click to select the placeholder text.
  8. Press Command C.
  9. Exit right pane and Press command V to paste content in chat box. Observe that the placeholder text (which could be selected) was not copied to the clipboard.

Expected Result:

User should not be able to select placeholder text.

Actual Result:

Placeholder text could be copied.

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.2.81-1
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:

Recording.1662.mp4
Screen.Recording.2023-03-06.at.16.17.24.mov

Expensify/Expensify Issue URL:
Issue reported by: @tienifr
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678094304431979

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011914d9d4422901ad
  • Upwork Job ID: 1635811332773281792
  • Last Price Increase: 2023-03-15
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 9, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Mar 9, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 9, 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

@joekaufmanexpensify
Copy link
Contributor

OOO today, will take a closer look on Monday

@melvin-bot melvin-bot bot added the Overdue label Mar 13, 2023
@joekaufmanexpensify
Copy link
Contributor

Not overdue.

@melvin-bot melvin-bot bot removed the Overdue label Mar 13, 2023
@joekaufmanexpensify
Copy link
Contributor

Reproduced in web:

2023-03-14_16-22-03 (1)

@joekaufmanexpensify
Copy link
Contributor

I don't think we want to allow users to select placeholder text (we don't allow this in other places of the app). So updated the fix to be removing the ability to select this text, rather than adding the ability to copy it.

@joekaufmanexpensify
Copy link
Contributor

Assigning to engineering for confirmation that this can be external!

@MelvinBot
Copy link

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

@hayata-suenaga
Copy link
Contributor

I'm checking on this issue now

@hayata-suenaga
Copy link
Contributor

  1. Open App on desktop web (chrome/safari)
  2. Click the search icon to open the search page (or press CMD + K)
  3. Move the mouse close to the search input (but distant enough that the mouse is displayed as a pointer instead of a cursor)
  4. Click and check the placeholder text. (Name, email...) is selected

The placeholder text should not be selectable.

@hayata-suenaga
Copy link
Contributor

I clarified the reproduction steps above. This issue can be external.

@hayata-suenaga hayata-suenaga added the External Added to denote the issue can be worked on by a contributor label Mar 15, 2023
@melvin-bot melvin-bot bot unlocked this conversation Mar 15, 2023
@melvin-bot melvin-bot bot changed the title Couldn’t copy by command C on the placeholder in the Search Page after selecting it [$1000] Couldn’t copy by command C on the placeholder in the Search Page after selecting it Mar 15, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~011914d9d4422901ad

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

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

Current assignee @hayata-suenaga is eligible for the External assigner, not assigning anyone new.

@tienifr
Copy link
Contributor

tienifr commented Mar 15, 2023

Proposal

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

In the Search Page, after selecting the placeholder, we couldn’t copy it by command C

What is the root cause of that problem?

The placeholder couldn't be copied but we still allow the user to select the placeholder

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

I suggest we adopt the same approach as other messaging apps such as Slack and WhatsApp, where the text input placeholder is not selectable by setting the user-select is none

In this case, adding this line

inputStyle={[styles.userSelectNone]}

into

<TextInput
ref={el => this.textInput = el}
value={this.props.value}
label={this.props.textInputLabel}
onChangeText={this.props.onChangeText}
placeholder={this.props.placeholderText}
onBlur={(e) => {
if (!this.props.shouldFocusOnSelectRow) {
return;
}
this.relatedTarget = e.relatedTarget;
}}
selectTextOnFocus
blurOnSubmit={Boolean(this.state.allOptions.length)}
/>

Using the styles.userSelectNone for the TextInput component in all scenarios, not just the one mentioned above, would be consistent with other messaging applications such as Slack and WhatsApp.

In order for the proposed solution to be effective, it will be necessary to remove the Safari hack mentioned in issue #3613. I have tested this and can confirm that removing the hack will not reintroduce the bug that the hack was originally implemented to fix, using the latest code in the main branch.

Result

Screen.Recording.2023-03-13.at.11.09.58.mov

@parasharrajat
Copy link
Member

parasharrajat commented Mar 15, 2023

Aha, good one. We forgot to revert the PR when we upgraded RNweb. #3613 (comment)

So first thing is to revert the PR #3613.

@tienifr
Copy link
Contributor

tienifr commented Mar 15, 2023

Hi @parasharrajat @hayata-suenaga The PR is ready for review

@hayata-suenaga
Copy link
Contributor

@tienifr thank you for the quick PR!

@tienifr
Copy link
Contributor

tienifr commented Mar 16, 2023

Regression Test Proposal

Bug: Couldn’t copy by command C on the placeholder in the Search Page after selecting it

Proposed Test Steps:

  1. Open App
  2. Click on avatar in LHN to open the search page
  3. Move the mouse close to the search input (but the mouse is displayed the cursor instead of the input mouse)
  4. Click (double or triple click) or drag the cursor from the start of the input over the placeholder text to select the placeholder.
  5. Verify that the placeholder is unselectable
  6. Focus on text input and text something
  7. Verify that the search value still can be selectable

Do we 👍 or 👎

@parasharrajat
Copy link
Member

You can also add drag the cursor from the start of the input over the placeholder text to select the placeholder with point 4.

@tienifr
Copy link
Contributor

tienifr commented Mar 16, 2023

@parasharrajat Yes, I've updated my regression test proposal

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 21, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Couldn’t copy by command C on the placeholder in the Search Page after selecting it [HOLD for payment 2023-03-28] [$1000] Couldn’t copy by command C on the placeholder in the Search Page after selecting it Mar 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 21, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.87-1 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-03-28. 🎊

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

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

@MelvinBot
Copy link

MelvinBot commented Mar 21, 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:

  • [@parasharrajat / @hayata-suenaga] The PR that introduced the bug has been identified. Link to the PR: N/A
  • [@parasharrajat / @hayata-suenaga] 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: N/A
  • [@parasharrajat / @hayata-suenaga] 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. Hard to catch the issue.
  • [@joekaufmanexpensify] Determine if we should create a regression test for the bug.
  • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to the appropriate location to ensure the same bug will not reach production again.
  • [@joekaufmanexpensify] Review the proposed regression test steps and location.
  • [@joekaufmanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: N/A

@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@joekaufmanexpensify
Copy link
Contributor

This is a fairly niche bug. I'm thinking no need to have a regression test here. Curious if y'all agree @parasharrajat @hayata-suenaga ?

@hayata-suenaga
Copy link
Contributor

yes I agree we don't need a regression test for this one.

@parasharrajat
Copy link
Member

[@parasharrajat / @hayata-suenaga] The PR that introduced the bug has been identified. Link to the PR: NA
[@parasharrajat / @hayata-suenaga] 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 / @hayata-suenaga] 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. Hard to catch the issue. **

@joekaufmanexpensify
Copy link
Contributor

Great, thanks! BZ checklist is updated and complete.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 27, 2023
@joekaufmanexpensify
Copy link
Contributor

All set to issue payment here. @tienifr was assigned on 2023-03-15, and the PR was merged on 2023-03-16, so this qualifies for a speed bonus. Great job! So we need to issue the following payments:

  • @tienifr $1,750 - this is made up of $1,000 for fixing the job, a $500 speed bonus, and $250 for reporting the bug.
  • @parasharrajat $1,500 - this is made up of $1,000 for C+ review, and $500 speed bonus.

@joekaufmanexpensify
Copy link
Contributor

@tienifr , offer sent for $1000 (remaining $750 will be paid as a bonus during payment).

@joekaufmanexpensify
Copy link
Contributor

@parasharrajat offer sent for $1000 (remaining $500 will be paid as a bonus during payment).

@joekaufmanexpensify
Copy link
Contributor

@parasharrajat $1500 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@tienifr $1750 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed!

@joekaufmanexpensify
Copy link
Contributor

Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. 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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants