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

escapeHTML option isn't respected in v6 with storiesOf #18

Open
tay1orjones opened this issue Oct 14, 2020 · 2 comments
Open

escapeHTML option isn't respected in v6 with storiesOf #18

tay1orjones opened this issue Oct 14, 2020 · 2 comments

Comments

@tay1orjones
Copy link

Describe the bug
Since updating to v6, my stories using the storiesOf api that configure the escapeHTML addon-knobs option present an error.

Config at the story level:

{
  knobs: {
    escapeHTML: false, // needed for greater than less than
  },
}

Error I see that relates to invalid props being passed on storyshot generation due to being HTML escaped:

Failed: "Warning: Failed prop type: Invalid prop `comparison` of value `&lt;` supplied to `Threshold`, expected one of [\"<\",\">\",\"=\",\"<=\",\">=\"].

I know I can migrate these stories to CSF and it will probably fix it, but it's my understanding that storiesOf is intended to be supported for the time being.

@shilman
Copy link
Member

shilman commented Oct 15, 2020

If this is a problem (haven't confirmed), it's a regression in addon-knobs and unrelated to storiesOf vs CSF (which are almost entirely isomorphic -- CSF executes storiesOf API under the hood)

FYI, we’ve released addon-controls in Storybook 6.0. Controls are portable, auto-generated knobs that are intended to replace addon-knobs long term. (Note: escapeHtml is not yet supported in controls storybookjs/storybook#12516)

Please upgrade and try them out today!

@stale
Copy link

stale bot commented Dec 25, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@shilman shilman transferred this issue from storybookjs/storybook May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants