Skip to content

[HOLD for payment 2023-07-12] [$1000] 2FA - When the "copy code" button is clicked, the download button moves. #21566

Closed

Description

@kbecciv

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 26, 2023
  2. melvin-bot commented on Jun 26, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 26, 2023

    @melvin-bot

    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
  4. namhihi237 commented on Jun 26, 2023

    @namhihi237
    Contributor

    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,
        },
    
  5. Pujan92 commented on Jun 26, 2023

    @Pujan92
    Contributor

    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)

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 26, 2023
  7. 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.[/+] on Jun 26, 2023
  8. melvin-bot commented on Jun 26, 2023

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 26, 2023
  10. melvin-bot commented on Jun 26, 2023

    @melvin-bot

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

  11. melvin-bot commented on Jun 26, 2023

    @melvin-bot

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

  12. s77rt commented on Jun 27, 2023

    @s77rt
    Member

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

    🎀 👀 🎀 C+ reviewed

  13. 24 remaining items

  14. melvin-bot commented on Jul 5, 2023

    @melvin-bot

    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
  15. melvin-bot commented on Jul 5, 2023

    @melvin-bot

    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:
  16. s77rt commented on Jul 5, 2023

    @s77rt
    Member
  17. kevinksullivan commented on Jul 6, 2023

    @kevinksullivan
    Contributor

    Will pay out after regression period.

  18. namhihi237 commented on Jul 13, 2023

    @namhihi237
    Contributor

    Hello team any update payment for this.

  19. kevinksullivan commented on Jul 13, 2023

    @kevinksullivan
    Contributor

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

  20. s77rt commented on Jul 13, 2023

    @s77rt
    Member

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

  21. namhihi237 commented on Jul 13, 2023

    @namhihi237
    Contributor

    @kevinksullivan the same with me. I have refunded.

  22. usmantariq96 commented on Jul 14, 2023

    @usmantariq96

    @kevinksullivan Offer accepted.

  23. kevinksullivan commented on Jul 17, 2023

    @kevinksullivan
    Contributor

    Thanks everyone. Paid @usmantariq96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions