Describe the bug
I'm trying to use storybook@next. After I installed & set @storybook/addon-background, I faced two problems.
TypeError: _this.tooltipRef.current.scheduleHide is not a function
To Reproduce
git clone https://github.com/Ailrun/storybook-issue5416npm inpm start
npm start) uncomment line 5-21 of index.js..storybook/config.js)grey (or any other colors).Expected behavior
Always display the tool, and do not emit any errors.
Screenshots

System:
Based on my investigation, the error part comes from https://github.com/storybooks/storybook/blob/fe4521c706549d5cb8f197e583f0d4016d5381ea/lib/components/src/menu/popout.js#L143
As you can see in the source code of react-popper-tooltip, their class don't have the method and all other methods are private (i.e., they intended not to use those methods outside of the class). Although changing the invoked method to hideTooltip removes the error, I don't think this is a valid and stable solution.
@tmeasday After few searches in this repo, I found following things.
STORY_CHANGED event only when it is rendered again.STORY_CHANGED event only when some stories are changed.STORY_CHANGED event.I also tried @storybook/addon-options@next, and it has a similar problem from
https://github.com/storybooks/storybook/blob/0c27be92b954e4a434617693f3fd055e31e83dc5/lib/ui/src/core/context.js#L84-L88
I think storybook should emit a single STORY_CHANGED event when it starts. How do you think?
Maybe related with #5418.
I think @ndelangen has been thinking about this stuff. I would suggest that these addons should be listening to the SET_CURRENT_STORY event or perhaps the STORY_RENDERED event?
I'll fix this
Yowza!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-beta.1 containing PR #5439 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.
FYI, I cannot reopen this issue for whatever reason.
What I'm curious about is whether the error is fixed or not. If it's not fixed, I think this issue (or my new issue) should be kept opened.
@ailrun - AFAICT the addon is working. Here is the latest version build of our storybook: https://next--storybooks-official.netlify.com/?path=/story/addons-backgrounds--story-1
You can try yourself with the @storybook/react@next (5.0.0-beta.1) release. Let us know if it is not fixed.
Oh, I notice that it is already fixed in the commit 4687253! It was just not yet released. I will check the lastest version :) I think it will work.
Thank you for all your endeavors to make storybook better!
Backgrounds addon works well! (Although options addon doesn't.... :( )
Yo-ho-ho!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-beta.2 containing PR #5452 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.
@tmeasday, that link currently doesn't change background colors?
Doesn't work at all on Desktop but works on mobile in portrait mode (not landscape).
Hmm, doesn't currently work for me at all at that link (on desktop). Shall we re-open @shilman?
I don't think it's currently being deployed at netlify. @ndelangen can you update the docs to reflect the current state?
Updated the docs, here's the url for next:
https://monorepo.storybook.now.sh/
@ndelangen if you don't issue a PR with the patch label, these won't make it onto the live site. I'm fine with self-merging uncontroversial documentation-only like this.