You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Storybook in combination with Lit, hyphenated attribute names (eg: not-interactive), defined using the Lit @Property decorator, break the Story book Controls.
In this PR, I defined the non-interactive attribute like so:
Vahid1919
changed the title
[Bug]: Boolean controls break when attributes names are more than 1 word in Lit
[Bug]: Boolean controls break when attributes names use hyphens(-) in Lit
Jul 17, 2024
** Disclaimer** This information might be inaccurate, due to it being generated automatically
To address the issue with hyphenated attribute names in Lit components, follow these steps:
Update Boolean Control:
Modify /code/lib/blocks/src/controls/Boolean.tsx to handle hyphenated attribute names.
Ensure the control correctly parses and maps hyphenated names to their corresponding properties.
Update Object Control:
Modify /code/lib/blocks/src/controls/Object.tsx similarly to handle hyphenated attribute names.
Ensure the control correctly parses and maps hyphenated names to their corresponding properties.
Test Changes:
Add test cases in /code/lib/blocks/src/controls/Boolean.stories.tsx and /code/lib/blocks/src/controls/Object.stories.tsx to verify the controls work with hyphenated attribute names.
Describe the bug
When using Storybook in combination with Lit, hyphenated attribute names (eg: not-interactive), defined using the Lit @Property decorator, break the Story book Controls.
In this PR, I defined the non-interactive attribute like so:
Adding the attribute property breaks the control after the first activation:
not.working.mov
When I remove the attribute property, this issue is resolved. Though the attribute name is not ideal:
working.mov
Reproduction link
https://github.com/solid-design-system/solid
Reproduction steps
System
Additional context
No response
The text was updated successfully, but these errors were encountered: