Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: configureActions depth parameter changed behavior between Storybook 6.5 and 7.0 #21933

Open
jattasNI opened this issue Apr 4, 2023 · 2 comments

Comments

@jattasNI
Copy link

jattasNI commented Apr 4, 2023

Describe the bug

My project uses the depth parameter of the configureActions function to improve performance of the Actions addon by reducing the amount of event data that is serialized. After we upgraded to Storybook 7 we noticed that performance slowdowns were back because our previous configuration of depth: 6 was resulting in much more data being serialized in v7 than in v6.5 Now we need to set depth: 1 to achieve the same result (and it appears to be serializing at least 6 levels deep).

We've been setting this parameter based on trial and error so it's not a huge deal for its meaning to change but ideally it would be documented in the migration guide if it was intended. If nothing else, hopefully this issue helps someone else who is debugging a similar performance regression.

To Reproduce

Note the field in these images called action-menu-toggle.target._tableData.

Storybook 6.5 with depth: 6:

image

Storybook 7.0 with depth: 6:


image

Storybook 7.0 with depth: 1:

image

This will be reproducible in the Storybook for ni/nimble based on this preview.js configuration shortly. If you need more targeted steps to reproduce please say so!

System

Environment Info:

  System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 111.0.5563.146
    Firefox: 111.0.1
    Safari: 16.3

Additional context

No response

@shilman
Copy link
Member

shilman commented Apr 5, 2023

@ndelangen know anything about this one? is it an intentional change?

@ndelangen
Copy link
Member

ndelangen commented Apr 6, 2023

Ah re-reading this, Yes I think this was an intentional change made way way waaay back in the beginning of the 7.0 process.

The number now excludes the nesting done by storybook internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants