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

Storybook 7 migration #911

Merged
merged 29 commits into from
Dec 19, 2023
Merged

Storybook 7 migration #911

merged 29 commits into from
Dec 19, 2023

Conversation

bspeare
Copy link
Contributor

@bspeare bspeare commented Dec 1, 2023

Resolves #900

Don't have NVM? https://github.com/nvm-sh/nvm?tab=readme-ov-file#git-install

nvm install 18
nvm use
yarn -v should output 3.7.0 otherwise you may need to run corepack enable while on node 18.
yarn install
yarn storybook

  • Should only have one warning on startup: WARN You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0
  • Introduction docs load
  • Each story should have no code available
  • Each not implemented story should just be the story without the controls and other doc-isms.
  • HTML tab should show on each implemented component.
  • See passing test build in GH Actions
  • BONUS: See uiowa favicon

@bspeare bspeare mentioned this pull request Dec 1, 2023
7 tasks
package.json Outdated Show resolved Hide resolved
@bspeare bspeare added 4.x 4.x version uids labels Dec 7, 2023
@joewhitsitt
Copy link
Contributor

i'll come back to this tomorrow.

@joewhitsitt joewhitsitt requested a review from a team December 12, 2023 16:03
@joewhitsitt joewhitsitt marked this pull request as ready for review December 12, 2023 16:03
@joewhitsitt
Copy link
Contributor

Heads up, I am fine if we decide to pull out the yarn 3 stuff for now. I was just happy to get it to work. Realized along the way how different it is.

@bspeare
Copy link
Contributor Author

bspeare commented Dec 13, 2023

I am noticing that our HTML now contains the slot comments. Can we remove these comments for figure out a comment syntax that is not rendered with the component?

Screenshot 2023-12-13 at 11 28 16 AM

@bspeare
Copy link
Contributor Author

bspeare commented Dec 13, 2023

Now that we have a dedicated docs page, can we hide the story page for each component that is not implemented?

Screenshot 2023-12-13 at 11 34 47 AM

@joewhitsitt
Copy link
Contributor

joewhitsitt commented Dec 13, 2023

Good questions. However, I am now running into this locally. Not sure what changed...

Failed to fetch dynamically imported module: http://localhost:6006/.storybook/preview.js

Update: had to hard cache reload. but did a bunch of things before that so idk.

@joewhitsitt
Copy link
Contributor

Now that we have a dedicated docs page, can we hide the story page for each component that is not implemented?

figure out a comment syntax that is not rendered with the component?

Sounds cool. Looking into to both of these, but haven't had much luck.

@joewhitsitt
Copy link
Contributor

Can hide the whole expandable sidebar item using:

in .storybook/manager.js

  sidebar: {
    filters: {
      patterns: (item) => {
        return !item.tags.includes('disabled');
      }
    }
  }

and in each story:

export default {
  title: 'Not implemented/Background',
  // https://github.com/storybookjs/storybook/issues/14442#issuecomment-1089165153
  tags: ['disabled'],

But this is not what we want. If anything it seems like we want to prevent docs and just show the story.

@bspeare
Copy link
Contributor Author

bspeare commented Dec 14, 2023

@joewhitsitt could you post a quick screenshot of what that would look like?

@joewhitsitt
Copy link
Contributor

@joewhitsitt
Copy link
Contributor

We could create other doc pages like Introduction but probably can't leverage the current story Stub logic to construct the docs.

Copy link
Contributor Author

@bspeare bspeare left a comment

Choose a reason for hiding this comment

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

Tested and I would approve if I could. @pyrello do you want to review?

@joewhitsitt
Copy link
Contributor

Created #912 and #913 to capture Ben's nice-to-haves

@pyrello
Copy link
Contributor

pyrello commented Dec 14, 2023

Pulling to review

Copy link
Contributor

@pyrello pyrello left a comment

Choose a reason for hiding this comment

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

Changes look good.

@pyrello pyrello merged commit e18d868 into 4.x Dec 19, 2023
3 checks passed
@pyrello pyrello deleted the storybook_7 branch December 19, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.x version uids
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x - Update Storybook from 6 to 7
3 participants