-
Notifications
You must be signed in to change notification settings - Fork 56
feat(component): Add Tag component #3062
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
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: Maxime Lardenois <[email protected]>
Co-authored-by: Maxime Lardenois <[email protected]>
Co-authored-by: Maxime Lardenois <[email protected]>
Co-authored-by: Maxime Lardenois <[email protected]>
…o ouds/main-his-tag-component
|
hello, |
@Aniort , you told us yesterday that we should use a visually hidden content in the first |
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.
Pull Request Overview
This PR implements the Tag component for the OUDS Web design system, providing two types of tags: informative tags and interactive input tags. The implementation follows the OUDS design guidelines with support for various colors, states, icons, and accessibility features.
Key Changes
- Complete Tag component implementation with both static and interactive variants
- Comprehensive documentation with examples covering all tag features
- Updated site navigation and migration guides to reflect the new component
Reviewed Changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
scss/_tags.scss |
Complete rewrite of tag component styles with new design system tokens and interactive variants |
site/src/content/docs/components/tags.mdx |
Full documentation implementation with examples and accessibility guidance |
scss/_variables.scss |
Removal of old tag-related variables |
site/src/pages/index.astro |
Updated homepage to showcase new tag component |
site/src/layouts/partials/ExamplesMain.astro |
Applied consistent tag styling |
site/src/content/docs/migrations/migration.mdx |
Added tag component to migration notes |
site/src/content/docs/migrations/migration-from-boosted.mdx |
Updated migration guide with tag changes |
site/src/components/shortcodes/Example.astro |
Added showToolbar prop for flexible example display |
site/src/components/shortcodes/Code.astro |
Improved code block spacing |
site/src/components/shortcodes/BootstrapCompatibility.astro |
Applied consistent tag styling |
site/data/sidebar.yml |
Removed draft status from Tags component |
.bundlewatch.config.json |
Updated bundle size limits to accommodate new component |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| OUDS Web [color and background utilities]([[docsref:/helpers/color-background]]) can be applied to display colored tag variants. Colors are classified in two hierarchies, emphasized (for key tags) or muted (for secondary tags), and each color has its own semantic purpose. Please follow the tag design guidelines to choose the right color for the right usage. | ||
|
|
||
| <Callout type="warning"> | ||
| Keep in mind that color should not be the only way to convey information. If the color has strong meaning, reflect it in the tag's text or add additional text with the class `.visually-hidden`. |
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.
The "or" at the end of this sentence could be misleading, adding visually accessible content is ok for screen readers, but won't be useful for people having trouble with color vision. We should do the first, and the second if needed.
| background-color: #{$ouds-color-surface-status-neutral-muted} if($enable-important-utilities, !important, null); | ||
| } | ||
|
|
||
| .tag-loader { // TODO partially copied from button loader, should be factorized as much as possible |
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 this Todo still relevant, should we do that now or is it done and we should remove the comment ?
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.
Added a reminder here: #3152
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Vincent Prothais <[email protected]>
|
hello
|
MaxLardenois
left a comment
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.
Need to add a review to comment?
| background-color: #{$ouds-color-surface-status-neutral-muted} if($enable-important-utilities, !important, null); | ||
| } | ||
|
|
||
| .tag-loader { // TODO partially copied from button loader, should be factorized as much as possible |
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.
Added a reminder here: #3152
Note: Please transform
- [ ]into- (NA)in the description when things are not applicableRelated issues
#2845
Fixes #3124
Description
Add the tag component, composed of two types : Tag and Input tag. Implement the version 1.3.0 of Tags with new colors, functional icons, etc. Add some accessibility explanations.
Motivation & Context
New Tag component
Types of change
Live previews