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]: Error: <svg> attribute width: Expected length, "inherit". #23815

Closed
dylannnn opened this issue Aug 11, 2023 · 3 comments · Fixed by #23907
Closed

[Bug]: Error: <svg> attribute width: Expected length, "inherit". #23815

dylannnn opened this issue Aug 11, 2023 · 3 comments · Fixed by #23907

Comments

@dylannnn
Copy link

dylannnn commented Aug 11, 2023

Describe the bug

Since recent update of the storybook to v7.2.3 from v7.1.x, when there is a Controls tab been attached to a story, there is the error in the console: Error: <svg> attribute width: Expected length, "inherit". chunk-SJD7EFYL.js:2 Error: <svg> attribute width: Expected length, "inherit".

After the investigation, I have found out that when the first time open this storybook, it show the "Interactive story playground
Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically.", which has introduced few svg image, with width and height as inherit value that cause this issue.

See the screenshot here:
Screenshot 2023-08-11 at 23 17 57

Error:
Screenshot 2023-08-11 at 23 46 15

Clear cookie if needed if you want to check multiple times.

To Reproduce

https://githubc38259-4aaj--6006--d5d65229.local-credentialless.webcontainer.io/

System

Environment Info:

  System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 9.8.1
  Browsers:
    Chrome: 115.0.5790.170
    Safari: 16.5.2
  npmPackages:
    @storybook/addon-a11y: 7.2.3 => 7.2.3 
    @storybook/addon-actions: 7.2.3 => 7.2.3 
    @storybook/addon-docs: 7.2.3 => 7.2.3 
    @storybook/addon-essentials: 7.2.3 => 7.2.3 
    @storybook/addon-interactions: 7.2.3 => 7.2.3 
    @storybook/addon-links: 7.2.3 => 7.2.3 
    @storybook/addon-mdx-gfm: 7.2.3 => 7.2.3 
    @storybook/angular: 7.2.3 => 7.2.3 
    @storybook/cli: ^7.2.3 => 7.2.3 
    @storybook/core-common: 7.2.3 => 7.2.3 
    @storybook/core-server: 7.2.3 => 7.2.3 
    @storybook/test-runner: 0.11.0 => 0.11.0 
    @storybook/theming: 7.2.3 => 7.2.3

Additional context

No response

@yasuaki640
Copy link

For storybook version 7.3.0-alpha.0, this issue appears to have already been fixed.

image

image

@fabiradi
Copy link
Contributor

fabiradi commented Aug 18, 2023

This appears to exist on many SVG components, also Icon.ChevronRight (https://github.com/storybookjs/storybook/blob/3dfc4173f50fff57ab5de688884da0c409f72c88/code/ui/components/src/new/Link/Link.tsx#L33C24-L33C41)

Bildschirmfoto 2023-08-18 um 13 47 43

It helps to search code for these occurrences:

@vanessayuenn
Copy link
Contributor

@ndelangen when you are done with reverting the experimental components work, can you please verify that this issue is also fixed please? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants