storybookjs/storybook

[Bug]: a long list within controls should be truncated

Open

#25778 opened on Jan 27, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (89,909 stars) (10,058 forks)batch import
feature requesthelp wantedsev:S4

Description

Describe the bug

When there is a prop that accepts a list of items and a story that passes a long list to that prop, the Control value should be somehow truncated but instead it shows the full list of items

To Reproduce

Check the Button docs in https://stackblitz.com/edit/github-bowmaj?file=src%2Fstories%2FButton.tsx,src%2Fstories%2FButton.stories.ts&preset=node

System

Storybook Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.14.0 - /usr/local/bin/pnpm
  npmPackages:
    @storybook/addon-essentials: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    @storybook/addon-interactions: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    @storybook/addon-links: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    @storybook/addon-onboarding: ^1.0.11 => 1.0.11 
    @storybook/blocks: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    @storybook/react: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    @storybook/react-vite: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    @storybook/test: ^8.0.0-alpha.15 => 8.0.0-alpha.15 
    storybook: ^8.0.0-alpha.15 => 8.0.0-alpha.15

Additional context

No response

Contributor guide