question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link to brandImage not working

See original GitHub issue

Describe the bug During upgrade from 5.2.8 to 5.3.3 my brandImage stopped working.

I have a custom theme, using a static assets folder for the image

./storybook
 - ./public
   - logo.svg

Previously I had me theme defined like this:

import { create } from '@storybook/theming';
import logo from './public/logo.svg';

export default create({
  base: 'light',

  brandImage: logo,
  brandTitle: 'Custom - Storybook'
});

After updating to 5.3.3 I’ve moved my theming to manager.js, like so

import { addons } from '@storybook/addons';
import { create } from '@storybook/theming/create';
import logo from './public/logo.svg';

const theme = create({
  base: 'light',

  brandImage: `/${logo}`,
  brandTitle: 'Custom - Storybook'
});

addons.setConfig({
  panelPosition: 'bottom',
  theme
});

But the logo.svg does not show up when I start storybook using start-storybook -p 6006 -s ./.storybook/public.

If I however do a static build via build-storybook -s ./.storybook/public, the logo shows up correctly.

Webserver fetches the logo from /media/static/logo.svg in both cases. But it seems the local webserver started when starting storybook locally does not correctly allow fetching images from this folder.

System: Environment Info:

System: OS: macOS 10.15.2 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Binaries: Node: 13.6.0 - ~/.nvm/versions/node/v13.6.0/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.13.4 - ~/.nvm/versions/node/v13.6.0/bin/npm Browsers: Chrome: 79.0.3945.117 Safari: 13.0.4 npmPackages: @storybook/addon-a11y: ^5.3.3 => 5.3.3 @storybook/addon-actions: ^5.3.3 => 5.3.3 @storybook/addon-docs: ^5.3.3 => 5.3.3 @storybook/addon-knobs: ^5.3.3 => 5.3.3 @storybook/addon-links: ^5.3.3 => 5.3.3 @storybook/addon-notes: ^5.3.3 => 5.3.3 @storybook/addon-viewport: ^5.3.3 => 5.3.3 @storybook/addons: ^5.3.3 => 5.3.3 @storybook/angular: ^5.3.3 => 5.3.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
shilmancommented, Mar 31, 2020

Whoopee!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.18 containing PR #9646 that references this issue. Upgrade today to try it out!

3reactions
cone56commented, Feb 20, 2020

@shilman would it be possible to backport the fix to the 5.3.x branch and republish? It’s in the 5.3 hotlist, but it seems it was mistakenly merged to a prerelease branch. I’m still unable to update storybook because of this bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set brand image on bootstrap navbar using link_to
1 Answer 1 · Ty! · It works, I mean it does insert the image but it doesnt fit at all, even if...
Read more >
Theming
Replace Storybook's logo in the sidebar with our own (defined in the brandImage variable). Add custom branding information. Set the brand link to...
Read more >
Brand image link says brand not found!
I've noticed several people ask about this and no one helped them, so I doubt someone will help me. Anyway, my brand images...
Read more >
How to configure the Intune Company Portal apps, ...
This occurs when the iOS/iPadOS app is linked to the app store, ... The following shows an example of the brand image in...
Read more >
Solved 1. Discuss the link between a brand image and
Discuss the advantages and disadvantages of celebrity endorsement in the promotion of fashion brands. This problem has been solved! You'll get a detailed ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found