Storybook: Prop warnings from dependencies

Created on 15 Feb 2019  路  8Comments  路  Source: storybookjs/storybook

Describe the bug

React v 15.8 has become very noisy with errors of the form "Unknown event handler property onVisibilityChange. It will be ignored".

That's all very well but in some cases it is our dependencies that are doing this. Sadly this problem comes through to users of Storybook.

Not quite sure if there is some workaround here (apart from PR-ing our dependencies of course). Let's collect a list here:

  • react-popper-tooltip (onVisibilityChange to TooltipTrigger)

To Reproduce
Run any the beta storybook (official storybook or a user storybook)

Expected behavior
No warnings

bug ui

All 8 comments

Perhaps we should run the manager in prod mode?

Yes, this buggy me too. I think it is okay to have Storybook run in the prod mode but will it bring problems? This I wasn't sure. Or maybe fire a PR there so it got solved...?!

I鈥檒l send a PR to popper

Do I understand correctly that the warnings bellow are all related to this issue?

Warning: Failed prop type: Invalid prop `notifications[0].id` of type `string` 
supplied to `NotificationList`, expected `number`.
    in NotificationList (created by Sidebar)
    in Sidebar (created by Context.Consumer)
    in _default (created by Layout)
    in div (created by Context.Consumer)
    in Styled(div) (created by Nav)
    in Nav (created by Layout)
    in Layout (created by Context.Consumer)
    in WithTheme(Layout) (created by ResizeDetector)
    in ResizeDetector
    in div (created by Context.Consumer)
    in Styled(div)
    in Unknown
    in Unknown (created by ResizeDetector)
    in ResizeDetector
    in Unknown
    in Unknown (created by Manager)
    in ThemeProvider (created by Manager)
    in Manager (created by Context.Consumer)
    in Location (created by QueryLocation)
    in QueryLocation (created by Root)
    in LocationProvider (created by Root)
    in HelmetProvider (created by Root)
    in Root
vendors~main.e950b5acba49be35c988.bundle.js:79398 Warning: Unknown event 
handler property `onVisibilityChange`. It will be ignored.
    in div (created by Context.Consumer)
    in Styled(div) (created by InnerReference)
    in InnerReference (created by Context.Consumer)
    in Reference (created by TooltipTrigger)
    in Manager (created by TooltipTrigger)
    in TooltipTrigger (created by WithTooltip)
    in WithTooltip
    in div (created by Context.Consumer)
    in Styled(div)
    in Unknown (created by withState(Component))
    in withState(Component) (created by Context.Consumer)
    in Styled(withState(Component)) (created by Sidebar)
    in nav (created by Context.Consumer)
    in Styled(nav) (created by Sidebar)
    in Sidebar (created by Context.Consumer)
    in _default (created by Layout)
    in div (created by Context.Consumer)
    in Styled(div) (created by Nav)
    in Nav (created by Layout)
    in Layout (created by Context.Consumer)
    in WithTheme(Layout) (created by ResizeDetector)
    in ResizeDetector
    in div (created by Context.Consumer)
    in Styled(div)
    in Unknown
    in Unknown (created by ResizeDetector)
    in ResizeDetector
    in Unknown
    in Unknown (created by Manager)
    in ThemeProvider (created by Manager)
    in Manager (created by Context.Consumer)
    in Location (created by QueryLocation)
    in QueryLocation (created by Root)
    in LocationProvider (created by Root)
    in HelmetProvider (created by Root)
    in Root
The pseudo class ":first-child" is potentially unsafe when doing server-side rendering. 
Try changing it to "first-of-type"
(anonymous) @ vendors~main.e950b5acba49be35c988.bundle.js:444

Also, are these warnings non-critical and will they appear in production mode?
Asking because they are very annoying, especially in case the users would see them too.

Hey @web-padawan,

The middle one is. The other two are issues that still need to be resolved (I think the last one has been, see #5602). I'll sort out the first.

Actually totally false accusations on react-popper-tooltip, it was us, also fixed in above PR

Huzzah!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-rc.2 containing PR #5635 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.

Was this page helpful?
0 / 5 - 0 ratings