-
Notifications
You must be signed in to change notification settings - Fork 982
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
Add feedback/indicator when copying recovery phrase #11535
Conversation
components/brave_wallet_ui/components/desktop/wallet-onboarding/recovery/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this 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 |
There was a problem hiding this comment.
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(() => { |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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"
33a356b
to
7b38ddc
Compare
Added functionality to indicate when a user copies recovery phrase by:
The button resets back to 'Copy' after 5 seconds.
Resolves brave/brave-browser#19021
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Copy.Recover.Phrase.Feedback.mov