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

UX: Allow quick Add Account name based on default name #20168

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

darkwing
Copy link
Contributor

Explanation

Formerly it was possible to quickly create a new account with the next default account name but this was recently changed. If the new account input is empty, the placeholder value should be used as the account name.

Screenshots/Screencaps

Screen.Recording.2023-07-24.at.9.32.37.PM.mov

Manual Testing Steps

  1. Open the account menu
  2. Click "Add account"
  3. Don't change the value of the Account input (keep it empty)
  4. Click create
  5. See the account created with the placeholder name

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@darkwing darkwing requested a review from a team as a code owner July 25, 2023 02:33
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@@ -43,7 +43,7 @@ export const CreateAccount = ({ onActionComplete }) => {
const { isValidAccountName, errorMessage } = getAccountNameErrorMessage(
accounts,
{ t },
newAccountName,
newAccountName === '' ? defaultAccountName : newAccountName,
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be shortened and clarified to:
newAccountName ?? defaultAccountName

Copy link
Member

Choose a reason for hiding this comment

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

This ended up nullifying the change. The ?? operator only checks for null and undefined, but the newAccountName is always an empty string if it's unset (never nullish). So the default account name is never used here, leaving the behavior of the component exactly as it was before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh my! Should I fix this? I guess it should be || instead of ??

Copy link
Member

Choose a reason for hiding this comment

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

Yeah exactly! || should work well here. A fix would be appreciated.

We found this during RC testing but this improvement wasn't urgent, so we removed it from the RC. That is, fixing this isn't urgent, so no rush.

@metamaskbot
Copy link
Collaborator

Builds ready [12fc72f]
Page Load Metrics (1577 ± 35 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1091891382412
domContentLoaded1462174715767335
load1463174715777335
domInteractive1462174715767335
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 9 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #20168 (9c6e8db) into develop (d1bc22a) will increase coverage by 0.00%.
The diff coverage is 75.00%.

@@           Coverage Diff            @@
##           develop   #20168   +/-   ##
========================================
  Coverage    69.44%   69.44%           
========================================
  Files          986      986           
  Lines        37291    37293    +2     
  Branches     10014    10015    +1     
========================================
+ Hits         25895    25897    +2     
  Misses       11396    11396           
Files Changed Coverage Δ
ui/components/ui/editable-label/editable-label.js 60.87% <0.00%> (ø)
...onents/multichain/create-account/create-account.js 90.91% <100.00%> (+0.59%) ⬆️

@kevinghim kevinghim added team-extension-client team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead labels Jul 25, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [9c6e8db]
Page Load Metrics (1524 ± 39 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint103159126157
domContentLoaded1398172315248039
load1398172315248039
domInteractive1398172215248039
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 21 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@HowardBraham HowardBraham merged commit f584f56 into develop Jul 27, 2023
9 checks passed
@HowardBraham HowardBraham deleted the new-account-easy-pass branch July 27, 2023 01:03
@github-actions github-actions bot locked and limited conversation to collaborators Jul 27, 2023
@metamaskbot metamaskbot added the release-10.36.0 Issue or pull request that will be included in release 10.36.0 label Jul 27, 2023
@Gudahtt Gudahtt added release-11.1.0 Issue or pull request that will be included in release 11.1.0 and removed release-10.36.0 Issue or pull request that will be included in release 10.36.0 labels Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.1.0 Issue or pull request that will be included in release 11.1.0 team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants