Skip to content

Add feedback/indicator when copying recovery phrase #11535

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

Merged
merged 6 commits into from
Dec 16, 2021

Conversation

muliswilliam
Copy link
Contributor

Added functionality to indicate when a user copies recovery phrase by:

  • Changing button text from 'Copy' to 'Copied' when a user clicks on Copy button
  • Adding a checkmark when text is copied

The button resets back to 'Copy' after 5 seconds.

Resolves brave/brave-browser#19021

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Copy.Recover.Phrase.Feedback.mov

@muliswilliam muliswilliam requested a review from a team as a code owner December 9, 2021 17:47
@muliswilliam muliswilliam added this to the 1.35.x - Nightly milestone Dec 9, 2021
@muliswilliam muliswilliam changed the title Add indicator when copying recover phrase Add feedback/indicator when copying recover phrase Dec 9, 2021
@muliswilliam muliswilliam changed the title Add feedback/indicator when copying recover phrase Add feedback/indicator when copying recovery phrase Dec 9, 2021
Copy link
Contributor

@Douglashdaniel Douglashdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor nits

@@ -25,11 +26,12 @@ export interface Props {
isRecoveryTermsAccepted: boolean
onSubmitTerms: (key: string, selected: boolean) => void
recoverPhrase: string[]
recoverPhraseCopied: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isRecoverPhraseCopied seems to fit more with existing pattern for booleans

}

React.useEffect(() => {
const timer = setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if !recoverPhraseCopied then don't need to set timeout

@@ -84,6 +84,7 @@
<message name="IDS_BRAVE_WALLET_SWAP_FEES_NOTICE" desc="Swap fees notice">Quote includes a 0.875% Brave fee.</message>
<message name="IDS_BRAVE_WALLET_BUTTON_CONTINUE" desc="General Continue button">Continue</message>
<message name="IDS_BRAVE_WALLET_BUTTON_COPY" desc="General Copy button">Copy</message>
<message name="IDS_BRAVE_WALLET_BUTTON_COPIED" desc="General Copied button">Copied</message>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a more useful description for translators would be "Confirmation that text has been copied to clipboard"

@muliswilliam muliswilliam force-pushed the add-indicator-when-copying-recover-phrase branch from 33a356b to 7b38ddc Compare December 14, 2021 21:29
@muliswilliam muliswilliam merged commit 24b5591 into master Dec 16, 2021
@muliswilliam muliswilliam deleted the add-indicator-when-copying-recover-phrase branch December 16, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no feedback/indicator when copying phrase from Your recovery phrase screen
3 participants