-
-
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
Vue3:fix reactive decorators #21954
Vue3:fix reactive decorators #21954
Conversation
…into chaks/vue3-reactive-decorators # Conflicts: # code/renderers/vue3/template/stories/ReactiveDecorators.stories.ts
…torybookjs/storybook into chaks/vue3-reactive-decorators
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.
If you can get the tests in proper state, feel free to merge it.
// to test that Simple html Decorators in CSF2 format are applied correctly in reactive mode | ||
export const ReactiveCSF2Wrapper = (args, { argTypes }) => ({ | ||
components: { ReactiveArgs }, | ||
props: Object.keys(argTypes), |
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.
Just a general question, do you think we should recommend this style with props?
Or this style with data
to make the args
available:
data: () => ({ args })
story = decorated({ | ||
...context, | ||
...sanitizeStoryContextUpdate(update), | ||
}); |
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.
Shouldn't we make sure args stay reactive when they get overridden here by an decorator update?
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.
Do we have tests for updating args from a decorator update?
code/renderers/vue3/template/stories/ReactiveDecorators.stories.ts
Outdated
Show resolved
Hide resolved
code/renderers/vue3/template/stories/ReactiveDecorators.stories.ts
Outdated
Show resolved
Hide resolved
i have gone all the tests to get them properly, + ReactiveSlots.stories as well |
With the more recent version, most of the settings are no longer reactive which seems to be a bug on storybook side. It could have something to do with storybookjs/storybook#21954 but is not resolved by this version either UIEXT-609 (Make knime-ui-table more developable across multiple teams)
Closes #21235 #21221 #21812
What I did
fixing losing reactivity when using decorators ( global decorator ex: vuetify , function story decorator , template story decorator )
now vue stories support 👍 :
PR has a good tests coverage for these 3 features, but you can add some others if you feel they can be relevant
How to test
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]