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

Fix broken stories in UI Storybook #19632

Merged
merged 2 commits into from
Oct 26, 2022
Merged

Fix broken stories in UI Storybook #19632

merged 2 commits into from
Oct 26, 2022

Conversation

JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Oct 26, 2022

This PR fixes issues with a few stories in our UI Storybook that was caused by symlinks as suggested here #19598 (comment)

Most notably Emotion conflicts and SyntaxHighlighter 2 is undefined - reported as Qt in Chromatic because of minification.

Eg. see the Chromatic build here for an example of a fixed story: https://www.chromatic.com/test?appId=635781f3500dd2c49e189caf&id=635930a76623c00ed5f85ae3

CC @shilman this is the problem we were debugging a few days ago.

@JReinhold JReinhold self-assigned this Oct 26, 2022
@JReinhold JReinhold added the build Internal-facing build tooling & test updates label Oct 26, 2022
@JReinhold JReinhold marked this pull request as ready for review October 26, 2022 13:08
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM other than one nit!

"storybook:ui": "./lib/cli/bin/index.js dev --port 6006 --config-dir ./ui/.storybook --no-manager-cache",
"storybook:ui:build": "./lib/cli/bin/index.js build --config-dir ./ui/.storybook",
"storybook:ui": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" ./lib/cli/bin/index.js dev --port 6006 --config-dir ./ui/.storybook --no-manager-cache",
"storybook:ui:build": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" ./lib/cli/bin/index.js build --config-dir ./ui/.storybook",
Copy link
Member

Choose a reason for hiding this comment

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

You should probably cd into the ui directory & run storybook from there. Though I'm not 100% sure it's required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's actually on purpose we don't do that, because Vite will look for node_modules in cwd, and since they're all at code/node_modules we have to run from code

@JReinhold JReinhold merged commit ce66b39 into next Oct 26, 2022
@JReinhold JReinhold deleted the jeppe/fix-uisb-symlinks branch October 26, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants