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-05-04] [$2000] No background color on hover on copy to clipboard in workspace->reimburse expenses #16574

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

Comments

@kavimuru
Copy link

kavimuru commented Mar 27, 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 the app
  2. Open workspaces
  3. Open any workspace
  4. Open reimburse expenses
  5. Hover on copy to clipboard icon
  6. Get back to home page and open any report
  7. Click on that report user profile to open user details page for that user
  8. Hover on copy to clipboard icon

Expected Result:

Copy to clipboard in reimburse expenses should have background color effect on hover and properly spaced from the text.

Actual Result:

Inconsistent behavior for same copy to clipboard icon on hover between user details and reimburse expenses page

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.90-4
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.68.mp4
inconsistent.copy.to.clipboard.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679905653532999

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0125054b3431e347fc
  • Upwork Job ID: 1643686746350624768
  • Last Price Increase: 2023-04-19
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 27, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@mallenexpensify
Copy link
Contributor

@dhanashree-sawant, before moving this along, can you do an audit to see if there are any other instances where there are inconsistencies with the way the copy button looks in the app? I'd prefer to fix multiple at once if possible vs creating multiple issues for the same inconsistency)

@dhanashree-sawant
Copy link

Hi @mallenexpensify , Sure will check throughout the app and let you know.

@dhanashree-sawant
Copy link

Hi @mallenexpensify, I have gone through all the pages and we only use copy to clipboard on message hover, user details and reimburse expenses. Only reimburse expenses page has the inconsistency which we will need to resolve.

@melvin-bot melvin-bot bot added the Overdue label Mar 31, 2023
@dhanashree-sawant
Copy link

Hi @mallenexpensify, recently we have again added new contact methods page in profile, even on that page we will need to resolve copy to clipboard icon issue

@MelvinBot
Copy link

@mallenexpensify Huh... This is 4 days overdue. Who can take care of this?

@MelvinBot
Copy link

@mallenexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@mallenexpensify
Copy link
Contributor

Thanks @dhanashree-sawant , sorry for the delay, been sick the past week. Moving along.

@melvin-bot melvin-bot bot removed the Overdue label Apr 5, 2023
@mallenexpensify mallenexpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Apr 5, 2023
@melvin-bot melvin-bot bot changed the title No background color on hover on copy to clipboard in workspace->reimburse expenses [$1000] No background color on hover on copy to clipboard in workspace->reimburse expenses Apr 5, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~0125054b3431e347fc

@MelvinBot
Copy link

Current assignee @mallenexpensify 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 - @aimane-chnaif (External)

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

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

@alitoshmatov
Copy link
Contributor

alitoshmatov commented Apr 5, 2023

Proposal

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

Inconsistency in copy to clipboard buttons

What is the root cause of that problem?

This is caused due to different approaches in coding this buttons. The correct one, CommunicationsLink component is using ContextMenuItem like this

<ContextMenuItem
icon={Expensicons.Clipboard}
text={props.translate('reportActionContextMenu.copyToClipboard')}
successIcon={Expensicons.Checkmark}
successText={props.translate('reportActionContextMenu.copied')}
isMini
onPress={() => Clipboard.setString(props.value)}
/>

Whereas in CopyTextToClipboard it is used like this:

<Tooltip text={this.props.translate(`reportActionContextMenu.${this.state.showCheckmark ? 'copied' : 'copyToClipboard'}`)}>
<Icon
src={this.state.showCheckmark ? Expensicons.Checkmark : Expensicons.Clipboard}
fill={this.state.showCheckmark ? themeColors.iconSuccessFill : themeColors.icon}
width={variables.iconSizeSmall}
height={variables.iconSizeSmall}
inline
/>
</Tooltip>

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

We should update CopyTextToClipboard to use the same logic as CommunicationsLink

What alternative solutions did you explore? (Optional)

@alitoshmatov
Copy link
Contributor

Updated code reference

@aimane-chnaif
Copy link
Contributor

@alitoshmatov thanks for your proposal but that will easily break style inside text.

For contributors:

  • please explain in detail how to prevent style break in inline text
  • please share 2 videos at the end of your proposals - one for web, one for native
    Thanks

@allroundexperts
Copy link
Contributor

allroundexperts commented Apr 5, 2023

Proposal

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

The copy to clipboard button is not hovered.

What is the root cause of that problem?

The root cause of the issue is that we're not wrapping the Icon inside the button inside a Pressable component. Not doing so does not result in a hover.

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

We can replace this block with the following:

<View>
                        <Pressable
                            focusable
                            onPress={this.copyToClipboard}
                            style={({hovered, pressed}) => ([
                                StyleUtils.getButtonBackgroundColorStyle(getButtonState(hovered, pressed, this.state.showCheckmark), true),
                                {marginLeft: 4},
                            ])}
                        >
                            {({hovered, pressed}) => (
                                <Icon
                                    src={this.state.showCheckmark ? Expensicons.Checkmark : Expensicons.Copy}
                                    fill={StyleUtils.getIconFillColor(getButtonState(hovered, pressed, this.state.showCheckmark))}
                                    width={variables.iconSizeSmall}
                                    height={variables.iconSizeSmall}
                                    inline
                                />
                            )}
                        </Pressable>
                    </View>

The position of the Pressable component dictates the style breaking of the inline text here. If we add it such that it wraps around the email address as well, then the inline styles break. However, for our case, I think its sufficient to add the Pressable around the Icon only. This does not break the layout on any of the platforms.

Result

Screenshot 2023-04-19 at 9 17 20 PM

Screenshot 2023-04-19 at 9 17 25 PM

Screen.Recording.2023-04-06.at.12.40.04.AM.mov
Screen.Recording.2023-04-06.at.12.40.28.AM.mov
Screen.Recording.2023-04-06.at.12.43.37.AM.mov
Screen.Recording.2023-04-06.at.12.44.36.AM.mov
Screen.Recording.2023-04-06.at.12.56.08.AM.mov

What alternative solutions did you explore? (Optional)

None

@soumyajit4419
Copy link

Proposal

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

The copy to clipboard button is not hovered.

What is the root cause of that problem?

The root cause of the issue is that there is no hover functionality present in copyToClipboard component.

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

We can wrap the icon present in the copyToClipboard component with a view and track the mouseEvent to maintain the hover state.
We can replace this Block with below function.

    <View
        style={[
            Platform.OS === 'web' && styles.copyToClipBoardButton,
            styles.alignItemsCenter, styles.justifyContentCenter,
            this.state.isHovered ? styles.hoveredButton : styles.bgTransparent,
        ]}
        onMouseEnter={
            () => {
                this.setState({isHovered: true});
            }
          }
        onMouseLeave={
            () => {
                this.setState({isHovered: false});
            }
          }
    >
        <Icon
            src={this.state.showCheckmark ? Expensicons.Checkmark : Expensicons.Clipboard}
            fill={this.state.showCheckmark ? themeColors.iconHovered : themeColors.icon}
            width={variables.iconSizeSmall}
            height={variables.iconSizeSmall}
            inline
        />
    </View>

Result

Screen.Recording.2023-04-06.at.1.59.11.AM.mov
Screen.Recording.2023-04-06.at.2.05.37.AM.mov
Screen.Recording.2023-04-06.at.1.59.37.AM.mov

What alternative solutions did you explore? (Optional)

NA

@MelvinBot
Copy link

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

@mallenexpensify
Copy link
Contributor

@situchan and @aimane-chnaif hired in Upwork, please accept
https://www.upwork.com/jobs/~0125054b3431e347fc

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 25, 2023
@melvin-bot melvin-bot bot changed the title [$2000] No background color on hover on copy to clipboard in workspace->reimburse expenses [HOLD for payment 2023-05-04] [$2000] No background color on hover on copy to clipboard in workspace->reimburse expenses Apr 27, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 27, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.6-0 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-05-04. 🎊

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 Apr 27, 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:

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

@Natnael-Guchima
Copy link

Hello @mallenexpensify. I have reported similar issue on Contact methods page here , and it was decided to be addressed with a single PR on this issue and the issue that I reported was closed. Is this something I am eligible for bonus reporting or is this something that is considered as a duplicate?
Thanks.

@mallenexpensify
Copy link
Contributor

Posted on the other issue @Natnael-Guchima
#17362 (comment)

@Natnael-Guchima
Copy link

Posted on the other issue @Natnael-Guchima
#17362 (comment)

Thanks for the reply. I just read that now.

@mallenexpensify
Copy link
Contributor

(sorry, doubling up to get clarification)

@Natnael-Guchima it appears that your report is after the others and they're pretty similar
image

image

The deciding factor might be, would this instance have been fixed if you hadn't reported it? Or... did this instance get added to the other issue/PR ? If it's the former, I don't think you'd be eligible for the reporting bonus. If the latter, it makes sense to me that you would (especially since we'd rather have it lumped in with the other bug instead of have this separate issue we need to complete)

@aimane-chnaif for the above, do you think the former or the latter is true?

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 3, 2023
@aimane-chnaif
Copy link
Contributor

@mallenexpensify former is true. They have the same root cause so it should have been fixed even if it wasn't reported.
When we fix something, we look for all instances across the app.

@aimane-chnaif
Copy link
Contributor

No PR caused regression. This is just polish issue of hover effect to be consistent with other pages.

  • Is it easy to test for this bug? Yes
  • Is the bug related to an important user flow? No
  • Is it an impactful bug? No

QA Steps in PR can be used for regression test step:

  1. Login any account
  2. Open Settings > Workspaces > any workspace > Reimburse expenses
  3. Verify that there's 4px space between email and copy icon
  4. Hover or long press copy icon
  5. Verify that icon color changes to white
  6. Open Settings > Profile > Contact methods
  7. Repeat the steps 3-5

@dhanashree-sawant
Copy link

Hi @mallenexpensify, ping for payment.

@melvin-bot melvin-bot bot added the Overdue label May 8, 2023
@robertjchen
Copy link
Contributor

not overdue, pending payment

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 8, 2023
@mallenexpensify
Copy link
Contributor

Thanks for the ping, apologies for the delay.
@situchan and @aimane-chnaif paid $3000 each which includes the timeliness bonus.
@dhanashree-sawant can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~0125054b3431e347fc

@melvin-bot melvin-bot bot removed the Overdue label May 11, 2023
@dhanashree-sawant
Copy link

Hi @mallenexpensify, thanks I have accepted the offer.

@mallenexpensify
Copy link
Contributor

@dhanashree-sawant paid $250 for reporting, thanks!

Added to the Design Guidelines section of the Testing Guidelines docs here

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

No branches or pull requests