Skip to content

Added storybook check to CI#17092

Merged
NidhiKJha merged 36 commits intodevelopfrom
test-storybook
Jan 20, 2023
Merged

Added storybook check to CI#17092
NidhiKJha merged 36 commits intodevelopfrom
test-storybook

Conversation

@NidhiKJha
Copy link
Copy Markdown
Member

@NidhiKJha NidhiKJha commented Jan 6, 2023

This PR is to add the storybook check for stories

Fixes #15760

Changes:

  1. Delete the id field from all the stories.js files. Stories won't be relying on filename/id anymore.
  2. Currently URLs are generated based on the existing ids but since theids are gone, new story URLs are generated based on the title of each story.
  3. For the CI, we are generating the URL from stories.json.
  4. Updated the New URLs in the docs (README.mdx) files.

Ref: #16721

@socket-security
Copy link
Copy Markdown

socket-security bot commented Jan 6, 2023

Socket Security Pull Request Report

👍 No new dependency issues detected in pull request

Pull request report summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script confusion ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@2.4.2

Ignoring: playwright@1.29.2, playwright-core@1.29.2

Powered by socket.dev

@NidhiKJha NidhiKJha requested a review from Gudahtt January 6, 2023 10:29
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Looking good! I've created another issue to update internal links once this has been merged #17110

Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Looks good! Make sure to create issues for the stories that you've updated to stories-to-do.js so we can track them 👣 You can use the other tickets as a template #16820

@NidhiKJha NidhiKJha changed the title Added storybook test-runner (WIP 👷‍♀️ ) Added storybook test-runner Jan 13, 2023
@NidhiKJha NidhiKJha marked this pull request as ready for review January 13, 2023 12:52
@NidhiKJha NidhiKJha requested review from a team and kumavis as code owners January 13, 2023 12:52
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [c49b9c7]
Page Load Metrics (1274 ± 87 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint90159111189
domContentLoaded10311778127118388
load10451778127418087
domInteractive10311778127118388
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2413 bytes
  • ui: 43779 bytes
  • common: 360 bytes

@NidhiKJha
Copy link
Copy Markdown
Member Author

@SocketSecurity ignore playwright@1.29.2
@SocketSecurity ignore playwright-core@1.29.2

@github-actions
Copy link
Copy Markdown
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.

@NidhiKJha NidhiKJha force-pushed the test-storybook branch 2 times, most recently from 8f76d5f to 58cfa6d Compare January 16, 2023 14:23
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [6bf33e9]
Page Load Metrics (1215 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint9112110584
domContentLoaded10481482121112259
load10481482121512058
domInteractive10481482121112259
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2413 bytes
  • ui: 43779 bytes
  • common: 339 bytes

@NidhiKJha NidhiKJha added type-story area-buildSystem related to our build system contributor experience An issue that impacts, or planned improvement to, the contributor experience. and removed type-story labels Jan 16, 2023
@NidhiKJha NidhiKJha changed the title Added storybook test-runner Added storybook check to CI Jan 16, 2023
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [cb47bcb]
Page Load Metrics (1381 ± 118 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint841981292813
domContentLoaded96618111362235113
load98318611381247118
domInteractive96618111362235113

Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [2b0b4b0]
Page Load Metrics (1236 ± 105 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint96154117168
domContentLoaded99017751225224108
load99017751236218105
domInteractive99017751225224108
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2413 bytes
  • ui: 43779 bytes
  • common: 339 bytes

Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

Great work!

I had a couple of suggestions, most notably moving the new dependencies from dependencies into devDependencies. But that can be done in a follow-up (in the interest of getting this merged sooner to avoid conflicts)

"nonce-tracker": "^1.0.0",
"obj-multiplex": "^1.0.0",
"pify": "^5.0.0",
"playwright": "^1.29.2",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you move both of these from dependencies to devDependencies? We only use dependencies for things that end up in the built extension

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the review Mark, I will create a follow up PR to add these changes :)

*
* @param {string} string - The string to sanitize.
* @returns The sanitized string.
* @param {fileName} string - The fileName to get the story id.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Could we add a description here as well? Ideally all of our new functions would have a description.

We require this with a lint rule in other repos, but it hasn't been enabled in the extension yet due to the huge backlog of descriptions we'd have to add.

Suggested change
* @param {fileName} string - The fileName to get the story id.
* Get the ID for a story file.
*
* @param {fileName} string - The filename of the story file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated in 17344

@NidhiKJha NidhiKJha merged commit c5368c1 into develop Jan 20, 2023
@NidhiKJha NidhiKJha deleted the test-storybook branch January 20, 2023 19:27
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-buildSystem related to our build system contributor experience An issue that impacts, or planned improvement to, the contributor experience.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add storybook check to CI

6 participants