Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement improved code examples #1729

Open
2 tasks
BoppLi opened this issue Aug 9, 2024 · 1 comment
Open
2 tasks

Implement improved code examples #1729

BoppLi opened this issue Aug 9, 2024 · 1 comment
Labels
dev Requires technical expertise documentation Improvements or additions to documentation storybook Storybook improve- or adjustments

Comments

@BoppLi
Copy link
Contributor

BoppLi commented Aug 9, 2024

In cases that need functions in storybook examples, we should create a demo component file and reference the code like here:
packages/sit-onyx/src/components/examples/FormExample/FormExample.stories.ts

import FormExampleSourceCode from "./FormExample.vue?raw";
// ...
const meta: Meta<typeof FormExample> = {
  // ...
  parameters: {
    docs: {
      source: {
        code: FormExampleSourceCode.replace('from "../../.."', 'from "sit-onyx"'),
      },
    },
  },
};

List of examples we should change:

Acceptance criteria

  • the abovementioned examples have demo vue files which are bound in storybook
  • for those examples, the controls are deactivated (as changing the controls will not have any effect on the
    demo anymore)
@BoppLi BoppLi self-assigned this Aug 9, 2024
@BoppLi
Copy link
Contributor Author

BoppLi commented Aug 9, 2024

Full example context
Image

@mj-hof mj-hof added this to the Product improvements milestone Aug 9, 2024
@mj-hof mj-hof added the dev Requires technical expertise label Aug 9, 2024
@BoppLi BoppLi added the 0-refinement All issues that can or need to be estimated in our next refinement label Aug 12, 2024
@mj-hof mj-hof added the storybook Storybook improve- or adjustments label Aug 20, 2024
@mj-hof mj-hof changed the title Implement improved code examples in storybook Implement improved code examples Aug 20, 2024
@mj-hof mj-hof removed the 0-refinement All issues that can or need to be estimated in our next refinement label Aug 20, 2024
@mj-hof mj-hof added the documentation Improvements or additions to documentation label Aug 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dev Requires technical expertise documentation Improvements or additions to documentation storybook Storybook improve- or adjustments
Projects
Status: Ready
Development

No branches or pull requests

2 participants