-
Notifications
You must be signed in to change notification settings - Fork 179
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
v3: experimenting with CvTag component, including stories #1119
Conversation
Deploy preview for carbon-components-vue ready! Built with commit 5a61f94 https://deploy-preview-1119--carbon-components-vue.netlify.app |
This is great @Fontinalis I wasn't expecting submissions just yet, but more than happy to receive them. Currently I am trying to establish a base expectation for each component. This is likely to include tests that check for non-deprecated features available in V2 in the V3 component. After which I will go through #1099 and produce an updated contributions guide. I'll try to get around to your PR next week.
Thanks again, and look forward to updates. |
Absolutely, testing non-deprecated features is essential. And on the same topic, I think there's no better time for dropping support for deprecated props. Sounds great, let me know if I can help by any means.
|
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.
A couple of minor changes and you are good to go.
// - verify tag disabled class on span | ||
const tagSpan = wrapper.find('span'); | ||
expect(tagSpan.classes()).toContain(`${carbonPrefix}--tag--disabled`); | ||
}); |
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.
A direct call to onRemove when the tag is disabled catches the else path.
// Call onRemove directly to test disabled path
wrapper.vm.onRemove();
v-if="filter" | ||
:class="`${carbonPrefix}--tag__close-icon`" | ||
:aria-label="clearAriaLabel" | ||
@click="onRemove" |
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.
Is there a good reason not to use @click.stop.prevent="onRemove"
?
docs: { | ||
source: { | ||
code: ` | ||
<CvTag |
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 nice will both borrow and raise an issue with Storybook regarding the docs output.
P.S. @Fontinalis found this storybookjs/storybook#13917 and made a suggestion. |
Hey @lee-chase,
Seen your commits and decided to join you in the effort of moving forward with the support for Vue 3.
In this PR, I've been experimenting on adding the CvTag component to the v3 package, including stories for documentation. Just something small to begin with.
I see a huge potential in refactoring these components and making them better on the way, extending their features with ones that are already being used in the original React package, but missing from the current
@carbon/vue
package.Let me know if you need me to change something, I'm happy to do so.
Changelog