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's 'show code' option displays incorrect code #15

Closed
2 of 3 tasks
DanielvanVliet opened this issue Jan 23, 2021 · 2 comments · Fixed by #117
Closed
2 of 3 tasks

Storybook's 'show code' option displays incorrect code #15

DanielvanVliet opened this issue Jan 23, 2021 · 2 comments · Fixed by #117
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@DanielvanVliet
Copy link
Contributor

DanielvanVliet commented Jan 23, 2021

When navigating the docs of a story on nldsreactstorybook, the 'show code' option does not always show working code.

For instance, in the Appbar docs:
show-not-working

The actual story for Appbar looks like this:

return (
    <AppBar {...args}>
      <Toolbar>
        <IconButton
          edge='start'
          className={classes.menuButton}
          color='inherit'
          aria-label='menu'
        >
          <MenuIcon />
        </IconButton>
        <Typography variant='h6'>News</Typography>
      </Toolbar>
      <Button>I am a button!</Button>
    </AppBar>
  )

I would expect at least working code, all of which should be in the nlds-react-components library (WithStyle is Material UI).

  • Investigate how to customize the code example without creating an entire .MD file.
  • Check all component stories to make sure Show code shows working code. Compile a list of all stories that have broken code examples so that follow-up issues can be made.
  • Follow-up issues have been made
@DanielvanVliet DanielvanVliet added bug Something isn't working documentation Improvements or additions to documentation labels Jan 23, 2021
@DanielvanVliet DanielvanVliet added this to Backlog in MDH RYSST Sprint 11 via automation Jan 23, 2021
@GewoonMaarten GewoonMaarten added triage Needs to get a priority needs refinement This story needs more information or needs to be scored labels Jan 30, 2021
@bddjong
Copy link
Contributor

bddjong commented Feb 27, 2021

https://storybook.js.org/docs/react/writing-docs/doc-blocks#docspage-1
This documentation might help with providing custom code examples without creating an entire MD file for the docs

@bddjong bddjong added 3 Story points and removed needs refinement This story needs more information or needs to be scored labels Feb 27, 2021
@ogjtech ogjtech self-assigned this Mar 24, 2021
@ogjtech ogjtech moved this from Product Backlog to In progress in MDH RYSST Sprint 11 Mar 25, 2021
@ogjtech
Copy link
Contributor

ogjtech commented Mar 25, 2021

https://storybook.js.org/docs/react/writing-docs/doc-blocks#docspage-1
This documentation might help with providing custom code examples without creating an entire MD file for the docs

This indeed fixes it, shows actual raw code as it is defined in in the Storybook file. No need for follow-up issues, fixing all stories at once.

@ogjtech ogjtech linked a pull request Mar 25, 2021 that will close this issue
@ogjtech ogjtech moved this from In progress to Review in progress in MDH RYSST Sprint 11 Mar 25, 2021
@DanielvanVliet DanielvanVliet moved this from Review in progress to In progress in MDH RYSST Sprint 11 Mar 27, 2021
@DanielvanVliet DanielvanVliet self-assigned this Mar 27, 2021
@DanielvanVliet DanielvanVliet added the blocked This issue cannot progress at its current stage. label Mar 27, 2021
@bddjong bddjong added 2 Story points and removed 3 Story points triage Needs to get a priority labels Mar 31, 2021
@DanielvanVliet DanielvanVliet added this to the Sprint 8 milestone Mar 31, 2021
@bddjong bddjong removed the blocked This issue cannot progress at its current stage. label Apr 17, 2021
@mjcarsjens mjcarsjens moved this from In progress to Review in progress in MDH RYSST Sprint 11 Apr 21, 2021
@bddjong bddjong moved this from Review in progress to Waiting for merge to master in MDH RYSST Sprint 11 Apr 24, 2021
@bddjong bddjong removed the 2 Story points label May 26, 2021
@bddjong bddjong moved this from Waiting for merge to master to Done in MDH RYSST Sprint 11 May 26, 2021
@bddjong bddjong closed this as completed May 26, 2021
@bddjong bddjong removed this from Released in MDH RYSST Sprint 11 Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants