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-07-12] [$1000] 2FA - When the "copy code" button is clicked, the download button moves. #21566

Closed
2 of 6 tasks
kbecciv opened this issue Jun 26, 2023 · 33 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 Jun 26, 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. Go to the "Settings" section.
  2. Click on the "Security" option.
  3. Click the "Two-factor authentication" feature.
  4. Observe that when the "copy code" button is clicked, the download button moves.

Expected Result:

When the "copy code" button is clicked, the "Download" and "copy code" buttons should not move. Instead they should remain fixed and only the internal data should change.

Actual Result:

When the "copy code" button is clicked, the "Download" and "copy code" buttons move.

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.30-5
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

Bug.14.mp4
Recording.5156.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014f0d2000a41973c1
  • Upwork Job ID: 1673451819177918464
  • Last Price Increase: 2023-06-26
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 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

@namhihi237
Copy link
Contributor

namhihi237 commented Jun 26, 2023

Proposal

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

When the "copy code" button is clicked, the "Download" and "copy code" buttons should not move. Instead, they should remain fixed and only the internal data should change.

What is the root cause of that problem?

The problem here is that when clicking the copy button the code its content change resulting in the width button changing:

styles={[styles.button, styles.buttonMedium, styles.twoFactorAuthCodesButton]}

App/src/styles/styles.js

Lines 2216 to 2218 in f867c17

twoFactorAuthCodesButton: {
minWidth: 100,
},

With the button on page VerifyPage the same as above

styles={[styles.button, styles.buttonMedium]}

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

We can update minWidth of the button equal to the width when the text is copy codes, because the langue 'Spanish' have a length than English. So we will base on the Spanish

    twoFactorAuthCodesButton: {
        minWidth: 140,
    },

With button copy in VerifyPage we can add style:

    verifyCodesButton: {
        minWidth: 110
    },

And add style for the button:

styles={[styles.button, styles.buttonMedium, styles.verifyCodesButton]}

Result:

Screen.Recording.2023-06-26.at.21.30.05.mov
Screen.Recording.2023-06-27.at.00.29.15.mov

What alternative solutions did you explore? (Optional)

Or we can use fix width for button:

    twoFactorAuthCodesButton: {
        width: 140,
    },

    verifyCodesButton: {
        width: 110,
    },

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 26, 2023

Proposal

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

2FA copy codes page copy button width gets changed on click

What is the root cause of that problem?

It seems we don't have provided the correct fixed width to the button and the button Section also gets overlapped to the padding area.

Screenshot 2023-06-26 at 11 08 35 PM

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

As from the slack discussion fixed-width needs to provide to these buttons and considering the spanish text it requires approx 140px width.

Below changes seems to be required for this.

  1. Considering the 140px width of the buttons decrease the padding to restrict overlapping of the content to padding area
    <View style={[styles.twoFactorAuthCodesBox(props)]}>

App/src/styles/styles.js

Lines 2168 to 2176 in 468dd6c

let paddingHorizontal = styles.ph15;
if (isSmallScreenWidth) {
paddingHorizontal = styles.ph10;
}
if (isExtraSmallScreenWidth) {
paddingHorizontal = styles.ph4;
}

Update the padding in the order of ph6, ph4 & ph2.

  1. Provide a width 140px to these buttons

    App/src/styles/styles.js

    Lines 2217 to 2219 in 468dd6c

    twoFactorAuthCodesButton: {
    minWidth: 100,
    },

  2. After giving more width the content doesn't look in the center, to fix that update justifyContent: 'space-around' for twoFactorAuthCodesContainer.

    justifyContent: 'center',

Result

Screen.Recording.2023-06-26.at.11.32.52.PM.mov
Screenshot 2023-06-26 at 11 32 41 PM

For VerifyPage we can also update the width to achieve the same(inspired by above proposal)

@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Jun 26, 2023
@melvin-bot melvin-bot bot changed the title 2FA - When the "copy code" button is clicked, the download button moves. [$1000] 2FA - When the "copy code" button is clicked, the download button moves. Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014f0d2000a41973c1

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

melvin-bot bot commented Jun 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

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

@s77rt
Copy link
Contributor

s77rt commented Jun 27, 2023

@namhihi237 Thanks for the proposal. You RCA is correct and the solution looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

@s77rt
Copy link
Contributor

s77rt commented Jun 27, 2023

@Pujan92 Thanks for the proposal. Your RCA is not necessary wrong but we don't have to pass a fixed width, we already pass a min-width and we can just adjust that.

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 27, 2023

Thanks @s77rt , I thought as we want to take out the moving effect we should provide the fixed width. Do you think other point of overlapping the button section makes sense?

@s77rt
Copy link
Contributor

s77rt commented Jun 27, 2023

@Pujan92 I think min-width is enough for this case, the fixed width could back fire if the content is too large, it's better to see the moving effect than the text being cut or being shown in two lines. Not that this case would ever happen just noting. I think it would be okay going either way. Yes the other point makes sense but it's unrelated to this issue.

@kevinksullivan
Copy link
Contributor

hi @namhihi237 please apply for the job in upwork when you get a chance

https://www.upwork.com/jobs/~014f0d2000a41973c1

@kevinksullivan
Copy link
Contributor

Offer sent for C+ @s77rt

@namhihi237
Copy link
Contributor

Applied job, please assign an issue for me thanks.

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

melvin-bot bot commented Jun 27, 2023

📣 @namhihi237 You have been assigned to this job by @kevinksullivan!
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 📖

@kevinksullivan
Copy link
Contributor

Sent the offer back @namhihi237

@namhihi237
Copy link
Contributor

Accepted, thanks @kevinksullivan

@namhihi237 namhihi237 mentioned this issue Jun 27, 2023
57 tasks
@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jun 27, 2023
@namhihi237
Copy link
Contributor

Hi @s77rt PR already for reviewe, Please check when you have time. thanks.

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 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 @namhihi237 got assigned: 2023-06-27 15:14:05 Z
  • when the PR got merged: 2023-06-30 21:14:16 UTC
  • days elapsed: 3

On to the next one 🚀

@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

@s77rt, @kevinksullivan, @namhihi237, @aldo-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@s77rt
Copy link
Contributor

s77rt commented Jul 4, 2023

Not overdue. PR is merged and deployed to staging

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 5, 2023
@melvin-bot melvin-bot bot changed the title [$1000] 2FA - When the "copy code" button is clicked, the download button moves. [HOLD for payment 2023-07-12] [$1000] 2FA - When the "copy code" button is clicked, the download button moves. Jul 5, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.36-5 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-07-12. 🎊

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 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:

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

@s77rt
Copy link
Contributor

s77rt commented Jul 5, 2023

@kevinksullivan
Copy link
Contributor

Will pay out after regression period.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 11, 2023
@namhihi237
Copy link
Contributor

Hello team any update payment for this.

@kevinksullivan
Copy link
Contributor

Paid @s77rt and @namhihi237 . @usmantariq96 sent offer for reporting. Lmk when you accept

@s77rt
Copy link
Contributor

s77rt commented Jul 13, 2023

@kevinksullivan This is not eligible for the 50% bonus. I have refunded the bonus.

@namhihi237
Copy link
Contributor

@kevinksullivan the same with me. I have refunded.

@usmantariq96
Copy link

@kevinksullivan Offer accepted.

@melvin-bot melvin-bot bot added the Overdue label Jul 17, 2023
@kevinksullivan
Copy link
Contributor

Thanks everyone. Paid @usmantariq96

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