-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Web-components: Fix custom-elements order of property application #19183
Web-components: Fix custom-elements order of property application #19183
Conversation
* Changed extraction order of attributes from manifest.
Hello @sonntag-philipp Thank you for contributing to storybook! I'm trying to merge in
I don't think there's anything you or I can do to remedy that situation.. but could you merge in the |
@sonntag-philipp We're also going to be removing the web-components example soon-ish. We're moving towards a testing strategy that has shared generic stories (so we don't have duplicated tests). Would you be able to help us move these stories over? |
Thank you for the feedback. I will merge next asap, but I don't think it will be within the next days. I would really like to help, but I don't have much time right now, sorry. |
I tried moving @sonntag-philipp 's example over to our sandboxes but it isn't working. As far as I can tell his code is working, but the example isn't. I'll see if I can pair with @kasperpeulen to figure it out. |
@storybookjs/web-components is this good to merge? |
…ements-manifest-update
@shilman @kasperpeulen tagging you as you meant to take a look at this. I updated the branch with the latest |
default: | ||
type = { name: 'void' }; | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, and sorely needed! I'd contemplate bringing this into @storybook/html
as well re: transformation of attributes as opposed to properties to args. I say this because it's an easy conflation to newcomers and having a way to distinguish these... would make onboarding to WC DS much easier.
WOOHOOOO |
@usrrname better late than never 🙈 |
…-19167-18858-custom-elements-manifest-update Web-components: Fix custom-elements order of property application (cherry picked from commit abfc677)
…-19167-18858-custom-elements-manifest-update Web-components: Fix custom-elements order of property application (cherry picked from commit abfc677)
…-19167-18858-custom-elements-manifest-update Web-components: Fix custom-elements order of property application (cherry picked from commit abfc677)
…-19167-18858-custom-elements-manifest-update Web-components: Fix custom-elements order of property application (cherry picked from commit abfc677)
…-19167-18858-custom-elements-manifest-update Web-components: Fix custom-elements order of property application (cherry picked from commit abfc677)
…-19167-18858-custom-elements-manifest-update Web-components: Fix custom-elements order of property application (cherry picked from commit abfc677)
Issues:
What I did
I updated the order in which the different declaration information is extracted from the manifest. Previously, the members would override all attributes which would make attributes less specifically shown as "properties" in the storybook. This makes understanding the implementation harder.
Furthermore, I updated the
sb-button
example with a prefix slot that can be used to show the slot capabilities of the Storybook. This allows users to set a string value as content for for a slot within a component.To enable this functionality I had to add the
slots
declaration type to the category evaluation. In old examples, the type of the slot would default to void which would not allow the user to change it's value. This is now changed to string as default for slots, as they don't define a type themselves in the manifest.How to test
If your answer is yes to any of these, please make sure to include it in your PR.