controls: Boolean props interpreted as strings for radio control
See original GitHub issueDescribe the bug
After upgrade to v6.2 I started to see warnings in the console Received illegal value for '{{propName}}'. Supported options: 'false', 'true'. I was used to that boolean props are interpreted as radio control type, but it was using at least real true and false values (not strings).
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/securityscorecard/design-system
- Run storybook with
yarn storybook - Open storybook in browser and console
- Navigate to
http://localhost:8008/?path=/story/components-datatable-internalcomponents-table--with-disabled-selection
Expected behavior
Boolean prop should be interpreted as values not as strings. Also would be nice that boolean props are interpreted as boolean control type instead of radio.
Screenshots

System
Environment Info:
System:
OS: macOS 11.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 7.8.0 - ~/Downloads/design-system/node_modules/.bin/npm
Browsers:
Chrome: 89.0.4389.114
Safari: 14.0.3
npmPackages:
@storybook/addon-a11y: ^6.2.3 => 6.2.3
@storybook/addon-actions: ^6.2.3 => 6.2.3
@storybook/addon-backgrounds: ^6.2.3 => 6.2.3
@storybook/addon-controls: ^6.2.3 => 6.2.3
@storybook/addon-docs: ^6.2.3 => 6.2.3
@storybook/react: ^6.2.3 => 6.2.3
@storybook/theming: ^6.2.3 => 6.2.3
┆Issue is synchronized with this Asana task by Unito
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why does <lightning:radioGroup returns String rather than ...
Because the HTML specification says that "value" is a "String." You need to convert it to a Boolean value if you want it...
Read more >Controls - Storybook - JS.ORG
It works well with certain types of args, such as boolean values or free-text strings, but in other cases, you want a more...
Read more >Next-level component showcasing with Storybook controls
The goal with our custom control is to map the radio button values to boolean values that are passed as a checked prop...
Read more >Set a boolean from buttonGroup (vue-strap) - Stack Overflow
Since the button-group works with string values and you want a boolean value, ... Then v-model that proxy value in your button-group.
Read more ><af:selectBooleanRadio> - Oracle Help Center
Name Type Supports EL?
accessKey char Yes
attributeChangeListener javax.el.MethodExpression Only EL
autoSubmit boolean Yes
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think what’s going on here is an unintentional breaking change in the way argTypes are extracted for React/Typescript. Specifically, there are changes to the defaultreactDocgenTypescriptOptionsconfiguration:In your repo, you’re overriding the settings so the new 6.2 config changes are not getting applied, and downstream 6.2 code is breaking because of it.I think we should:MIGRATION.md@tmeasday WDYT
UPDATE: Oof no I’m wrong, this always gets set here:
https://github.com/storybookjs/storybook/blob/next/app/react/src/server/framework-preset-react-docgen.ts#L49
Same here, all my bools props are shown like this in the browser
<my-button disabled="false" />whereas I would like something like<my-button disabled />