storybook-eol / storybook-addon-options

REPO/PACKAGE MOVED - Storybook UI Options Addon
https://github.com/storybooks/storybook/tree/master/addons/options
30 stars 7 forks source link

the delay before displaying the name #10

Open usulpro opened 7 years ago

usulpro commented 7 years ago

when set option

setOptions({
    name: 'React Theming',
})

it displayed with a slight delay, during which present title "React Storybook". This is repeated each time the page is refreshed

arunoda commented 7 years ago

@mnmtanish Is there anything we could do about this. I hope this is something related to core Storybook UI.

thani-sh commented 7 years ago

The name is set by sending a message over the channel at the moment. I see 2 possible ways to avoid that and fix this issue right now:

I prefer the first option because we can avoid adding more stuff to npm script line on the package.json file. The addons.js file usually stays out of the way so adding code we don't change often there is not an issue.

arunoda commented 7 years ago

I also don't like the env vars. Using addons.js is a good idea for now.

usulpro commented 7 years ago

Is this solution related to https://github.com/storybooks/react-storybook/issues/604?

arunoda commented 7 years ago

@UsulPro I don't think it's directly related.

christophior commented 7 years ago

Can I get an example of doing this using the addons.js file option? I've given it a try but don't see it working for me.

Thanks!

usulpro commented 7 years ago

@christophior unfortunately this delay is still present