feat(Chip): Add read-only, icon, badge variants; deprecate status label#5555
feat(Chip): Add read-only, icon, badge variants; deprecate status label#5555
Conversation
|
Hey @timea-udvarhelyi , some updates and questions for you:
|
|
Opening for design review. There are still some updates to the Design docs pending.
@timea-udvarhelyi let me know if these are accomplishable soon - I'd like to merge and release this tomorrow ideally. If needed we can deliver the documentation separately from the chip updates. |
|
@jmuzina I updated the anatomy image and checked the examples, there are permitted to be published except for one that I have changed in the doc. The correct colors are used in the Figma component as tokens. The MVP for the Styling and Accessibility sections are ready. I would like your help reviewing the spacing color and responsiveness sections. But this should not be a blocker. The anatomy section has also been updated to contain the mention of the dismissible icon subcomponent. I reviewed the icon radius change, it looks good to me! +1 from visual review |
|
Additional notes from @timea-udvarhelyi :
|
|
Approved, Q/Ad with comments to learn from for the future :
Nothing new here under the sun, only an indication that we need to land better our concept of defining singular components :) Thanks @timea-udvarhelyi and @jmuzina for the great work and I wish you a great week-end, |
|
@timea-udvarhelyi while applying the read-only chip to the Vanilla website, I noticed an interesting point we should probably hash out here: Currently, chips have If the read-only chip had the same margin, it would cause unexpected spacing in contexts where it is inline (such as navigation or tables) So, I've set the read-only chips to have no margin: However, this means that a cluster of read-only chips in succession would be very close together. Would multiple read-only chips ever be used in the same block? |
|
@jmuzina there are use cases where we will have multiple read-only chips next to each other, but as a default state for using the read-only chip it makes sense to remove the bottom and right margins, as for groups of chips - would it be a solution to wrap them in a container? |
|
@jmuzina we can redefine what |
|
The inline chip spacing ended up being solvable by using the already existing I also noticed that, with our current spacing settings, placing a non-dense chip inline with paragraph text causes the parent element to grow vertically due to the chip padding. This would cause, for example, side navigation items with non-dense chips to be taller than the others: List item with a status chipList item without a status chipAnd table cells (and by extension, rows) to be taller than they need to be: Default chipDense chipI've found that this can be avoided by using the Dense chip - see that all items with the same line count are now the same height: I haven't been instructed to change any spacing across VF, so I have documented the Chip to explain when to use As far as I can tell, visual regressions have been corrected and documentation is fully updated - moving this out of draft state for another round of design review with these fixes. |
|
is-dense usage in tables/sidenav validated by @lyubomir-popov in mattermost |
There was a problem hiding this comment.
Pull Request Overview
This PR deprecates the legacy Status Label pattern, replacing its usage with the new read-only Chip variant, and adds icon and badge support to Chips.
- Deprecate and remove Status Label; replace with read-only Chips in docs and templates
- Introduce icon and badge variants in the Chip component and update examples
- Update SCSS imports and mixins to support the expanded Chip functionality
Reviewed Changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/docs/whats-new.html | Swapped <span class="p-status-label"> for <span class="p-chip is-readonly is-inline"> |
| templates/docs/settings/placeholder-settings.md | Replaced deprecated status label with a read-only chip in table |
| templates/docs/settings/animation-settings.md | Converted manual status label to {{ status("deprecated") }} |
| templates/docs/patterns/strip/index.md | Removed status label but no replacement chip or status helper |
| templates/docs/patterns/status-labels/index.md | Added deprecation notice and link to read-only Chip |
| templates/docs/patterns/chip/index.md | Added read-only/icon/badge sections and updated import snippet |
| templates/_layouts/docs.html | Updated side-navigation status badges to use Chips |
| templates/_layouts/_status-label.html | Changed default status-label span to a Chip span |
| scss/_patterns_status-label.scss | Marked status-label component as deprecated |
| scss/_patterns_chip.scss | Enhanced Chip mixin with icon, badge, and read-only support |
Comments suppressed due to low confidence (1)
templates/docs/patterns/chip/index.md:81
- The class
is-read-onlyis inconsistent with the mixin and other templates, which useis-readonly. Rename tois-readonlyfor consistency.
To create a read-only chip, use `<span class="p-chip is-read-only">`.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>













Done
Fixes #5535
Fixes WD-22497
TODO
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS or macro code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁,Breaking Change 💣,Bug 🐛,Documentation 📝,Maintenance 🔨.package.jsonshould be updated relative to the most recent release, following semver conventionScreenshots