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

Implement Storybook Code tab for stories #1904

Closed
4 tasks done
larsrickert opened this issue Oct 1, 2024 · 1 comment
Closed
4 tasks done

Implement Storybook Code tab for stories #1904

larsrickert opened this issue Oct 1, 2024 · 1 comment
Assignees
Labels
dev Requires technical expertise storybook Storybook improve- or adjustments
Milestone

Comments

@larsrickert
Copy link
Collaborator

larsrickert commented Oct 1, 2024

Why?

In #1898 we removed all examples except the default one from the docs page to address performance issues.
This now has the downside that the Vue code for the remaining examples can not be shown/copied by the users.

To fix this, we want to contribute to Storybook by implementing a new "Code" panel when viewing a single story which shows the current code snippet with copy functionality. There is also an existing discussion in the Storybook repository which appreciates this new feature: storybookjs/storybook#26691

We already contributed a lot to Storybook to improve the code snippet generation itself (see Storybook PRs) so not being able to view/copy the code snippets would be a big bummer.

Design

Image

Acceptance criteria

  • Single Storybook stories show a new "Code" panel which shows the current code snippet
  • the code snippet can be copied to the clipboard

Definition of Done

Approval

Implementation details

@larsrickert larsrickert added this to onyx Oct 1, 2024
@larsrickert larsrickert self-assigned this Oct 1, 2024
@larsrickert larsrickert converted this from a draft issue Oct 1, 2024
@larsrickert larsrickert moved this from New to In Progress in onyx Oct 1, 2024
@larsrickert larsrickert added dev Requires technical expertise storybook Storybook improve- or adjustments labels Oct 1, 2024
@larsrickert
Copy link
Collaborator Author

@mj-hof mj-hof added this to the Documentation milestone Oct 2, 2024
@JoCa96 JoCa96 added 0-refinement All issues that can or need to be estimated in our next refinement and removed 0-refinement All issues that can or need to be estimated in our next refinement labels Oct 2, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in onyx Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Requires technical expertise storybook Storybook improve- or adjustments
Projects
Status: Done
Development

No branches or pull requests

3 participants