-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Theme variables(brandTitle, brandUrl, brandImage) not working #6521
Comments
It also doesn't work in 5.0.6 |
@KaboomFox Just FYI, reason for not working is different for version 5.0.6 and this 5.1.0-alpha.27. Released version 5.0.6 had a bug and PR that fixes merged to 5.1.0.-alpha.7 which is not released yet. Problem with this version(5.1.0-alpha.27 actually from 5.1.0-alpha.10) is that It is not working at all. |
👍 |
Thanks for the clarification @lonyele ! I'll release the patch and follow-up to make sure that the new bug gets fixed in 감사합니다 🙏 |
@shilman Whaaaaaat 안녕하세요~ Recently, I've started trying to contribute to open source as a mean of learning. Let's see how it goes |
@lonyele 화이팅! ㅋㅋㅋㅋ |
@hipstersmoothie I'm releasing a new version now with the fix from #6120. Can you try again in a few mins? |
Also I'm currently on the latest storybook alpha |
seems to be something to do with |
this line always returns true https://github.com/storybooks/storybook/blob/f07b2b7574611388ef45a4cb8a89389b434e257d/lib/api/src/modules/layout.ts#L119 which overrides all of these options on this line |
Also from my reading of the code it seems like the keys of deprecatedThemeOptions are the deprecations and not the values. I think the appropriate code is const checkDeprecatedThemeOptions = (options: Options) => {
// Check the deprecated options exist
if (Object.keys(deprecatedThemeOptions).find(v => !!options[v])) {
return applyDeprecatedThemeOptions(options);
}
return {};
}; |
const applyDeprecatedThemeOptions = deprecate(
({ name, url }: Options, userOptions: any): PartialThemeVars => ({
brandTitle: userOptions.brandTitle || name,
brandUrl: userOptions.brandUrl || url,
brandImage: userOptions.brandImage || null,
}),
deprecationMessage(deprecatedThemeOptions)
); |
My PR seems to fix the |
It is this line this prevents the user from setting a |
Shiver me timbers!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.30 containing PR #6543 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the |
Ooh-la-la!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.10 containing PR #6543 that references this issue. Upgrade today to try it out! |
Describe the bug
Even if I set
brandTitle, brandUrl, brandImage
on theme object, It doesn't work at all(5.1.0-alpha.27)To Reproduce
Set any combinations of
brandTitle, brandUrl, brandImage
ofdefined, undefined, null
on theme object.Expected behavior
SidebarHeading should be rendered according to the inputs from options
System:
The text was updated successfully, but these errors were encountered: