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

Info addon doesn't inherit styling #5723

Closed
zoltanbedi opened this issue Feb 22, 2019 · 11 comments
Closed

Info addon doesn't inherit styling #5723

zoltanbedi opened this issue Feb 22, 2019 · 11 comments

Comments

@zoltanbedi
Copy link
Contributor

Describe the bug
In v4 the info inherited the base font-family and stylings. In v5 it does not.

To Reproduce
Steps to reproduce the behavior:
Use info addon.

Expected behavior
I expect the behavior from v4 where the font-family is the same as in the outer panels.

Screenshots
v5
v5

v4
v4

System:

  • Addons: Info
  • Version: 5.0.0-rc.4
@shilman
Copy link
Member

shilman commented Feb 22, 2019

@B3zo0 Thanks for the report. Bugfix PRs are welcome for this!

@mateoholman
Copy link
Contributor

@shilman I'll take a crack at this one if no one else is working on it.

@shilman
Copy link
Member

shilman commented Feb 23, 2019

Awesome @mateoholman, thanks for taking this on! Our storybook dev setup is documented here https://github.com/storybooks/storybook/blob/next/CONTRIBUTING.md#development-guide and feel free to get help here or on our Storybook Discord/Slack if you run into issues. 🙇

@zoltanbedi
Copy link
Contributor Author

I was able to workaround this with this code in config.js:

addDecorator(storyFn => (
  <ThemeProvider theme={themes.normal}>
    <Global styles={createReset} />
    {storyFn()}
  </ThemeProvider>
))

@shilman
Copy link
Member

shilman commented Mar 1, 2019

Yo-ho-ho!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-rc.8 containing PR #5759 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

@mfellner
Copy link

mfellner commented Mar 5, 2019

Unfortunately this appears to be still an issue in the current version 5.0.0. 😕

@SteffenGorenflo
Copy link
Contributor

I experience the same issue. I found that if the info is rendered with the options: {info: {inline: false}} the styles get applied:
image

But the problem persists when rendering the info inline

@shilman shilman reopened this Mar 15, 2019
@SteffenGorenflo
Copy link
Contributor

I think, I found the commit responsible for this issue: c7f624e#diff-36f288162c3cc9bd518d680f366bbe54L54

You can add the font family to that .infoBody css class just like in https://github.com/storybooks/storybook/pull/5759/files but I don't know if thats the right way, since you may have some global styling/theming/fonts system which should be used?!

@tomspeak
Copy link

Facing the same issue, when passing in a custom styles object that is mapped from https://github.com/storybooks/storybook/blob/master/addons/info/src/components/Story.js#L19. - some, but not all styles are applied.

Notably, I am trying to apply display: none to a lot of the styles to reduce noise.

@shilman
Copy link
Member

shilman commented Mar 22, 2019

Ta-da!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.12 containing PR #6186 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Mar 22, 2019
@shilman
Copy link
Member

shilman commented Mar 24, 2019

w00t!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.4 containing PR #6186 that references this issue. Upgrade today to try it out!

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

No branches or pull requests

6 participants