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

feat: change story IDs #409

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: change story IDs #409

wants to merge 1 commit into from

Conversation

matijs
Copy link
Member

@matijs matijs commented Dec 18, 2024

@Robbert Dit… is denk ik niet helemaal wat je echt wilt maar volgens mij wel het enige dat nog kan. De Storybook manier van het genereren van IDs is aardig overhoop gehaald.

  • meta.id moeten we wat mij betreft sowieso voor alle story files aanpassen om het begin van een Story ID stabiel (en kort) te krijgen
  • de enige manier om invloed te hebben op de uiteindelijke URL van een story lijkt echt een specifieke named export te zijn
  • omdat we story.name gebruiken voor wat er in de sidebar van Storybook getoond wordt, kan dit van alles zijn en we zouden iets creatiefs kunnen kiezen voor stabiele URLs, ik heb een voorzetje gedaan maar echt blij word ik er niet van

Add an `id` to the story to ‘hardcode’ the prefix of the story ID
instead of it being based on the `title`.

Use ‘special’ named exports to create more memorable story IDs.
@matijs matijs requested a review from Robbert December 18, 2024 20:08
Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
candidate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 8:08pm
candidate-storybook-test ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 8:08pm
evil-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 8:08pm

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e29c5b4) to head (c94e2f2).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #409   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines          346       346           
  Branches        26        26           
=========================================
  Hits           346       346           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants