Commit 98002b3
committed
fix(label-group): address review feedback on pf-label-group
- Remove add-label-mode concept; adding labels is external code's job
- Remove add-label demos (auto, from-list, custom-form)
- Align component with pf-chip-group patterns:
- Use `@queryAssignedNodes` instead of manual slot querying
- Use `?hidden` binding instead of conditional rendering (SSR-friendly)
- Compute overflow text inline in template via `#remaining` getter
- Handle removal via event listener pattern (cancelable)
- Export proper Event subclasses
- Fix CSS:
- Replace hardcoded colors with PF global token fallbacks
- Use CSS logical properties throughout
- Add `::slotted([hidden])` rule (pf-label lacks `:host([hidden])`)
- Remove `.add-label` styles
- Add CSS custom property declarations on `:host`
- Remove superfluous `type: String` from `@property` decorators
- Add `@summary` JSDoc tag
- Rewrite tests following pf-chip-group patterns:
- Use `a11ySnapshot` assertions
- Use `function()` instead of arrow functions
- Add tests for overflow, closeable, num-labels, category, a11y
- Clean up demos with minimal imports
- Update changeset and README to match project conventions
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c90b4ff commit 98002b3
13 files changed
Lines changed: 347 additions & 742 deletions
File tree
- .changeset
- elements/pf-label-group
- demo
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
14 | 11 | | |
15 | 12 | | |
16 | | - | |
| 13 | + | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
26 | | - | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 39 | + | |
51 | 40 | | |
52 | | - | |
| 41 | + | |
53 | 42 | | |
54 | 43 | | |
55 | 44 | | |
56 | 45 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
Lines changed: 0 additions & 38 deletions
This file was deleted.
0 commit comments