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: Optimize code preview #414

Closed
BoppLi opened this issue Feb 26, 2024 · 2 comments
Closed

Storybook: Optimize code preview #414

BoppLi opened this issue Feb 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working or not shown correctly dev Requires technical expertise documentation Improvements or additions to documentation storybook Storybook improve- or adjustments

Comments

@BoppLi
Copy link
Contributor

BoppLi commented Feb 26, 2024

Task: make a utility for our storybook code demos:
The goal is to separate the code example between "script" and "template" sections

Example:
Image

@BoppLi BoppLi added this to onyx Feb 26, 2024
@BoppLi BoppLi converted this from a draft issue Feb 26, 2024
@BoppLi BoppLi added documentation Improvements or additions to documentation dev Requires technical expertise labels Mar 1, 2024
@larsrickert
Copy link
Collaborator

larsrickert commented Apr 15, 2024

We can contribute to Storybook to improve this: storybookjs/storybook#26691

This was referenced Apr 15, 2024
@mj-hof mj-hof changed the title Optimize Storybook Code Preview Storybook: Optimize code preview Apr 17, 2024
@mj-hof mj-hof added the storybook Storybook improve- or adjustments label Apr 17, 2024
@mj-hof mj-hof added this to the Release preparation milestone Apr 17, 2024
larsrickert added a commit that referenced this issue May 23, 2024
Relates to #1078, #414

- simplified some Stories
- refactor oynx icon import code transformer to work globally so we
don't need to add it to every component that uses icons
- temporarily copy over improved source code generation until it is
released in Storybook itself (see
storybookjs/storybook#27194)
@larsrickert larsrickert self-assigned this Jun 10, 2024
@larsrickert larsrickert moved this from New to In Progress in onyx Jun 10, 2024
@larsrickert
Copy link
Collaborator

Basically implemented in storybookjs/storybook#27194

@mj-hof mj-hof added the bug Something isn't working or not shown correctly label Jun 10, 2024
larsrickert added a commit that referenced this issue Jun 12, 2024
Relates to #414

Fork latest updates from
storybookjs/storybook#27194.
Main improvements:

- place objects/arrays properties into `<script setup>`
- support for v-models
@larsrickert larsrickert moved this from In Progress to In Approval in onyx Jun 12, 2024
@github-project-automation github-project-automation bot moved this from In Approval to Done in onyx Jun 12, 2024
larsrickert added a commit that referenced this issue Jun 13, 2024
Relates to #414

Automatically add imports for all used onyx components for the generated
source code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or not shown correctly dev Requires technical expertise documentation Improvements or additions to documentation storybook Storybook improve- or adjustments
Projects
Status: Done
Development

No branches or pull requests

3 participants