-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## **Description** In the [new designs for Amon Hen](https://github.com/MetaMask/metamask-extension/pull/21220/files#diff-afc7617dc1347d665d4f7a058e9ea8ac686f5ad520874a293f6e27e7c50f9568) the network picker(`PickerNetwork`) has been moved to inside of the tabs and needs to be full width. The current `PickerNetwork` requires some style updates to allow for this change This 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 called `labelProps`. 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** 1. Go to the storybook build of this PR 2. Search `PickerNetwork` 3. See that there are no visual regressions 4. Check the updated documentation and Width story ## **Screenshots/Recordings** ### **Before** https://github.com/MetaMask/metamask-extension/assets/8112138/7ca4f2ea-63fb-4e12-a3ab-34e8890bbbfc ### **After** https://github.com/MetaMask/metamask-extension/assets/8112138/22036bca-7ebd-418d-8fae-c15f055bab0c Other instances of `PickerNetwork` without visual regressions <img width="327" alt="Screenshot 2023-10-10 at 10 29 55 PM" src="https://github.com/MetaMask/metamask-extension/assets/8112138/8c43357b-6ddc-420c-b58f-1f1bc70ae40e"><img width="374" alt="Screenshot 2023-10-10 at 7 54 53 PM" src="https://github.com/MetaMask/metamask-extension/assets/8112138/647e03bf-a775-4f03-bd70-787047876a04"> Showing new-network-info modal with some deprecated components replaced and flex box added <img width="1512" alt="Screenshot 2023-10-11 at 3 12 43 PM" src="https://github.com/MetaMask/metamask-extension/assets/8112138/2babc73c-f7c9-4df8-84b6-4e29dfd71872"> <img width="968" alt="Screenshot 2023-10-10 at 9 53 33 PM" src="https://github.com/MetaMask/metamask-extension/assets/8112138/1dabfd5d-8aa2-4d65-b396-9a27eb22d9f9"> <img width="1512" alt="Screenshot 2023-10-10 at 10 29 24 PM" src="https://github.com/MetaMask/metamask-extension/assets/8112138/34544b1f-bcc3-4668-a936-a4c151ca231a"> Test coverage 100% <img width="1512" alt="Screenshot 2023-10-10 at 6 41 48 PM" src="https://github.com/MetaMask/metamask-extension/assets/8112138/d85f2221-4d83-4c13-bd0a-d9e771bc0c76"> ## **Related issues** https://github.com/MetaMask/metamask-extension/pull/21220/files#diff-afc7617dc1347d665d4f7a058e9ea8ac686f5ad520874a293f6e27e7c50f9568 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained: - [x] What problem this PR is solving. - [x] How this problem was solved. - [x] How reviewers can test my changes. - [ ] I’ve indicated what issue this PR is linked to: Fixes #??? - [x] I’ve included tests if applicable. - [x] I’ve documented any added code. - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). - [ ] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
- Loading branch information
1 parent
b9ec72e
commit 8646a76
Showing
13 changed files
with
99 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
ui/components/component-library/picker-network/picker-network.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
ui/components/ui/new-network-info/new-network-info.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import NewNetworkInfo from '.'; | ||
|
||
export default { | ||
title: 'Components/UI/NewNetworkInfo', | ||
}; | ||
|
||
export const DefaultStory = () => <NewNetworkInfo />; | ||
|
||
DefaultStory.storyName = 'Default'; |