storybook: @storybook/addon-backgrounds@next does not work
Describe the bug
I’m trying to use storybook@next. After I installed & set @storybook/addon-background, I faced two problems.
- Background tool is not displayed occasionally.
- When I tried to set a background (by clicking a color button), it emits the following error.
TypeError: _this.tooltipRef.current.scheduleHide is not a function
To Reproduce
git clone https://github.com/Ailrun/storybook-issue5416npm inpm start- Check that there is no background tool just like the screenshot.

- (While running
npm start) uncomment line 5-21 ofindex.js. (FYI, I already set the global parameters in.storybook/config.js) - Check that there is a background tool. (Weirdly…)
- Open the web dev tool.
- Click the background tool button.
- Select
grey(or any other colors). - See the error.
Expected behavior Always display the tool, and do not emit any errors.
Screenshots

System:
- OS: Manjaro (Kernel 4.18)
- Device: Desktop
- Browser: Firefox 64
- Framework: React
- Addons: Backgrounds
- Version: 5.0.0-alpha.10
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (16 by maintainers)
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!
@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.I think @ndelangen has been thinking about this stuff. I would suggest that these addons should be listening to the
SET_CURRENT_STORYevent or perhaps theSTORY_RENDEREDevent?