Skip to content

[HOLD for payment 2023-06-13] Polish codes screen in managing 2FA in newdot #19180

Closed

Description

@MonilBhavsar

Problem

Here in the 2FA codes screen, we have Copy and Download buttons. We need to add an icon that turns into a check box and provides response that code has been copied or downloaded.
In the main PR, we discussed we'll make a follow up PR to address those issues as it requires updating main Button component.

Screenshot 2023-05-18 at 1 47 45 PM

Solution

Discuss design Done!
and Implement that.

We need to make our button component accept icons on the right hand side, and once pressed, turn that icons into a check icon indicating that the action succeeded.

Mockups here

https://user-images.githubusercontent.com/2319350/239196300-67a7d86f-79b3-41c6-ba5b-02b5b6af1d0c.png

Why it is important

Provide proper response on user action is an important part of the UX

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a61f676ec916b6ec
  • Upwork Job ID: 1670753035689127936
  • Last Price Increase: 2023-06-19

Activity

  1. MonilBhavsar commented on May 18, 2023

    @MonilBhavsar
    ContributorAuthor

    @shawnborton can we please get thoughts on the design.
    Also, keeping it daily for now. Feel free to bump it to weekly.

  2. shawnborton commented on May 18, 2023

    @shawnborton
    Contributor

    Yup, let's just use buttons with icons and the copy icon can turn into a green check once it has been copied:
    image

  3. MonilBhavsar commented on May 18, 2023

    @MonilBhavsar
    ContributorAuthor

    Thanks! Should we only turn update copy button or download button too?
    I would say both.

  4. shawnborton commented on May 18, 2023

    @shawnborton
    Contributor

    Yeah, let's do both!

  5. MonilBhavsar commented on May 18, 2023

    @MonilBhavsar
    ContributorAuthor

    Thanks sounds good 👍

  6. BeeMargarida commented on May 18, 2023

    @BeeMargarida
    Contributor

    Hi, Ana from Callstack here 👋 , as mentioned in Slack, I can pick this up!

  7. BeeMargarida commented on May 18, 2023

    @BeeMargarida
    Contributor

    Proposal

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

    Make the buttons in 2FA screens have an icon and change icons when they have been pressed

    What is the root cause of that problem?

    There are two things that need change:

    1. Fix an bug in Button where the iconRight is not being shown if no icon is provided
    2. New component that uses Pressable and WithDelayToggleButtonState to allow changing the icon and text when it has been pressed (similar to CopyTextToClipboard but more general and using Pressable)

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

    1. Fix the bug in Button
      1. The conditional for this.props.icon should also include this.props.shouldShowRightIcon
      2. Should apply left margin for the right icon, pass the iconStyles and also apply the small prop to the right icon
    2. Make a new component called PressableWithDelayToggle that uses WithDelayToggleButtonState and allows passing a checked icon, style and text. It should use a similar setup as CopyTextToClipboard, allowing to set text with an icon or just an icon
    3. Change CopyTextToClipboard, ContextMenuItem and the buttons mentioned in this issue to use this new component

    What alternative solutions did you explore? (Optional)

    We could go without a new component, but it would require implementing the delay toggle logic directly on the page.

    Screen.Recording.2023-05-18.at.14.20.46.mov
  8. MonilBhavsar commented on May 18, 2023

    @MonilBhavsar
    ContributorAuthor

    @BeeMargarida thank you for the proposal. Looks good to me!
    Just curious if we can reuse this component src/components/ContextMenuItem.js
    As we are using this to copy user's personal details on "Details" page

  9. BeeMargarida commented on May 18, 2023

    @BeeMargarida
    Contributor

    Just curious if we can reuse this component src/components/ContextMenuItem.js As we are using this to copy user's personal details on "Details" page

    @MonilBhavsar Hum, we could refactor and make both ContextMenuItem and CopyTextToClipboard use the same base component that contains this logic and then use that same component in this use case.
    A question that I have is if we want this new component to be based upon the Button component, or if it's alright to just use Pressable (like in ContextMenuItem and CopyTextToClipboard).

  10. MonilBhavsar commented on May 18, 2023

    @MonilBhavsar
    ContributorAuthor

    Sounds good to me 👍
    It is fine using Pressable. There is no necessary requirement to use Button component.

  11. BeeMargarida commented on May 18, 2023

    @BeeMargarida
    Contributor

    Got it, I'll use Pressable instead! Do you want me to still fix the iconRight problem mentioned in the proposal?
    Also updated the proposal with these changes

  12. 49 remaining items

  13. MonilBhavsar commented on Jun 29, 2023

    @MonilBhavsar
    ContributorAuthor

    Not overdue, waiting for @rushatgabhane to accept the contract.

  14. MonilBhavsar commented on Jul 3, 2023

    @MonilBhavsar
    ContributorAuthor
  15. rushatgabhane commented on Jul 3, 2023

    @rushatgabhane
    Member
  16. MonilBhavsar commented on Jul 3, 2023

    @MonilBhavsar
    ContributorAuthor

    Oh thanks! So I think we can close this out, correct?

  17. rushatgabhane commented on Jul 3, 2023

    @rushatgabhane
    Member

    I think @adelekennedy will need to approve the manual request.

  18. adelekennedy commented on Jul 3, 2023

    @adelekennedy
    Contributor

    This is new for me - let me see how this works

  19. adelekennedy commented on Jul 3, 2023

    @adelekennedy
    Contributor
    Screenshot 2023-07-03 at 10 34 32 AM hmm - I don't think I have access, let me get clarity on how we're supposed to pay these out
  20. adelekennedy commented on Jul 3, 2023

    @adelekennedy
    Contributor

    @rushatgabhane do you mind resubmitting or posting your steps here? For some reason I can't access it!

  21. rushatgabhane commented on Jul 3, 2023

    @rushatgabhane
    Member

    @adelekennedy I think @anmurali would be the best person to help with this :)

  22. adelekennedy commented on Jul 5, 2023

    @adelekennedy
    Contributor

    thread started here waiting fro Anu and Jason to follow up on next steps

  23. adelekennedy commented on Jul 5, 2023

    @adelekennedy
    Contributor

    @rushatgabhane anu and jason will approve these! closing for now

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.DailyKSv2ImprovementItem broken or needs improvement.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions