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

UI: Extract stories.json for Storybook composition #11274

Closed
wants to merge 2 commits into from

Conversation

DingoEatingFuzz
Copy link
Contributor

This follows what we do in structure1 to surface the stories in Nomad's storybook. This way a meta-storybook instance can be created that pulls in Nomad's stories.

You can see what it looks like when a Storybook instance composes another storybook instance's stories here2.

Footnotes

  1. Source PR: https://github.com/hashicorp/structure/pull/81

  2. Note that underneath the HCP stories there's a "Structure" section with a version dropdown.

@github-actions
Copy link

github-actions bot commented Oct 6, 2021

Ember Asset Size action

As of 57e59eb

Files that stayed the same size 🤷‍:

File raw gzip
nomad-ui.js 0 B 0 B
vendor.js 0 B 0 B
nomad-ui.css 0 B 0 B
vendor.css 0 B 0 B

@DingoEatingFuzz
Copy link
Contributor Author

Lol, this requires storybook 6 and we're on storybook five 😂 😭

I'll change this to a draft and look into how much of a lift the upgrade is.

@DingoEatingFuzz DingoEatingFuzz marked this pull request as draft October 6, 2021 17:51
@github-actions
Copy link

github-actions bot commented Oct 6, 2021

Ember Test Audit comparison

main 57e59eb change
passes 1135 1135 0
failures 0 0 0
flaky 0 0 0
duration 9m 13s 972ms 7m 54s 958ms -1m 19s 014ms

{
"versions": {
"main": "https://nomad-storybook-and-ui.vercel.app/storybook"
}
Copy link

Choose a reason for hiding this comment

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

i need to look into this comment https://github.com/hashicorp/cloud-ui/pull/1457#discussion_r724258881

i'm thinking it may not apply to nomad, cause the product is self-hosted, not cloud?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh snap, it definitely still applies. Everything in /public gets shrink-wrapped into the nomad binary via go-bindata-assetfs.

Copy link

Choose a reason for hiding this comment

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

to follow up here, i removed /public/metadata.json from cloud-ui, since we don't seem to need versions

i will see if i can use the storybook link from this build in design-system-website next

Copy link

Choose a reason for hiding this comment

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

totally works! thanks for your help with this @DingoEatingFuzz, much appreciated https://github.com/hashicorp/design-system-website/pull/13

@amyrlam
Copy link

amyrlam commented Oct 18, 2021

still needs a change for the metadata.json to not be in prod, but moved to /dist or something

@didoo @Dhaulagiri please update the URL on https://github.com/hashicorp/design-system-website/blob/main/taskbox/.storybook/main.js when this is merged

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@amyrlam
Copy link

amyrlam commented Mar 15, 2022

We can close this to keep Nomad tidy, I filed https://github.com/hashicorp/unofficial-design-system-search/issues/44 to keep track, if unofficial-design-system-search gets used again

@amyrlam amyrlam closed this Mar 15, 2022
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants