-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat: better storybook stories for the notification pages #27861
base: develop
Are you sure you want to change the base?
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. |
Builds ready [cf66689]
Page Load Metrics (1909 ± 109 ms)
Bundle size diffs
|
Quality Gate passedIssues Measures |
Builds ready [2322c20]
Page Load Metrics (1795 ± 141 ms)
Bundle size diffs
|
Builds ready [36288c3]
Page Load Metrics (1948 ± 98 ms)
Bundle size diffs
|
Builds ready [7f9b8c6]
Page Load Metrics (1990 ± 97 ms)
Bundle size diffs
|
Builds ready [4096501]
Page Load Metrics (1875 ± 42 ms)
Bundle size diffs
|
Builds ready [d44e45b]
Page Load Metrics (1868 ± 64 ms)
Bundle size diffs
|
Builds ready [14cacbc]
Page Load Metrics (1879 ± 64 ms)
Bundle size diffs
|
Builds ready [5c3ba50]
Page Load Metrics (2121 ± 89 ms)
Bundle size diffs
|
Builds ready [be54666]
Page Load Metrics (2022 ± 98 ms)
Bundle size diffs
|
…ask/metamask-extension into feat/improve-notifications-stories
@@ -4,6 +4,10 @@ | |||
; This variable is required | |||
INFURA_PROJECT_ID=00000000000 | |||
|
|||
; This variable is not required but it's necessary for the storybook | |||
; to render stories that use onchain data. | |||
INFURA_STORYBOOK_PROJECT_ID= |
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.
This is the new ENV introduced to handle a dedicated Infura ID only for Storybook builds
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.
We may need to discuss with someone on how we can populate this into our CI system.
### | ||
# Storybook | ||
### | ||
- STORYBOOK_ENV: false |
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.
This ENV is set to false by default
"storybook": "storybook dev -p 6006 -c .storybook", | ||
"storybook:build": "storybook build -c .storybook -o storybook-build", | ||
"storybook:deploy": "storybook-to-ghpages --existing-output-dir storybook-build --remote storybook --branch master", | ||
"storybook": "STORYBOOK_ENV=true storybook dev -p 6006 -c .storybook", |
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.
In the case of running one of these Storybook-related commands, the STORYBOOK_ENV
is set to true
headers: process.env.STORYBOOK_ENV | ||
? undefined | ||
: { | ||
'Infura-Source': 'metamask/metamask', |
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.
This sub-optimal solution was previously introduced to handle a dedicated header for RPC calls to the Infura endpoint. In this PR, the use of this call is managed without the header in the case of a Storybook build
ui/pages/notifications/notification-components/feature-announcement/feature-announcement.tsx
Show resolved
Hide resolved
Builds ready [312be96]
Page Load Metrics (1740 ± 51 ms)
Bundle size diffs
|
Description
This pull request enhances the Storybook stories for the notification pages. The improvements aim to provide better clarity and usability for developers working with notification components. The changes include more detailed and organized stories, making it easier to understand and test different notification states and components.
### Important
ui/pages/notification-details/notification-details.stories.tsx
) need to use an RPC endpoint to fetch certain data"storybook": "STORYBOOK_ENV=true storybook dev -p 6006 -c .storybook",
inpackage.json
).metamaskrc.dist
)ui/helpers/utils/notification.util.ts
)Related issues
N/A
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Screen.Recording.2024-10-24.at.17.23.49.mov
Pre-merge author checklist
Pre-merge reviewer checklist