-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Picker network updates #21301
Picker network updates #21301
Conversation
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. |
@georgewrmarshall I take this as I should close #20825 #21051 and #21083. When this PR is completed I'll redo them to match the update |
|
||
export const DefaultStory = () => <NewNetworkInfo />; | ||
|
||
DefaultStory.storyName = 'Default'; |
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.
3fb25d1
to
de72074
Compare
import Button from '../button'; | ||
import Popover from '../popover'; |
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.
Will replace these in another PR
f71e092
to
2532b37
Compare
…el prop Text wrapper as well as removing the max width styles. Replacing some deprecated components in NewNetworkInfo modal
2532b37
to
36e19cd
Compare
@@ -458,7 +458,7 @@ describe('Custom network', function () { | |||
}); | |||
// verify network switched | |||
const networkDisplayed = await driver.findElement({ | |||
tag: 'p', | |||
tag: 'span', |
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.
Changed the wrapping html element of the text from a p
to span
tag in the PickerNetwork
@@ -70,7 +70,7 @@ describe('Stores custom RPC history', function () { | |||
'.networks-tab__add-network-form-footer .btn-primary', | |||
); | |||
|
|||
await driver.findElement({ text: networkName, tag: 'p' }); | |||
await driver.findElement({ text: networkName, tag: 'span' }); |
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.
Changed the wrapping html element of the text from a p
to span
tag in the PickerNetwork
c2abed2
@@ -88,7 +88,7 @@ describe('Switch ethereum chain', function () { | |||
await driver.switchToWindow(extension); | |||
|
|||
const currentNetworkName = await driver.findElement({ | |||
tag: 'p', | |||
tag: 'span', |
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.
Changed the wrapping html element of the text from a p
to span
tag in the PickerNetwork
@georgewrmarshall Do you agree? Should they be redone after these changes? |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #21301 +/- ##
========================================
Coverage 68.61% 68.61%
========================================
Files 1020 1020
Lines 40929 40929
Branches 10920 10920
========================================
Hits 28080 28080
Misses 12849 12849
☔ View full report in Codecov by Sentry. |
Builds ready [dbbf64e]
Page Load Metrics (1209 ± 391 ms)
Bundle size diffs
|
Description
In the new designs for Amon Hen the network picker(
PickerNetwork
) has been moved to inside of the tabs and needs to be full width. The currentPickerNetwork
requires some style updates to allow for this changeThis PR updates the
PickerNetwork
component styles and props to allow for this updated design. It uses the pattern of inversion of control to allow for the label wrapper component to be accessed through a prop calledlabelProps
. It also updates the unit tests to include coverage for this change as well as updates the documentation and stories to provide examples.Manual testing steps
PickerNetwork
Screenshots/Recordings
Before
before.mov
After
after.mov
Other instances of
PickerNetwork
without visual regressionsShowing new-network-info modal with some deprecated components replaced and flex box added
Test coverage 100%
Related issues
https://github.com/MetaMask/metamask-extension/pull/21220/files#diff-afc7617dc1347d665d4f7a058e9ea8ac686f5ad520874a293f6e27e7c50f9568
Pre-merge author checklist
Pre-merge reviewer checklist