Commit 1daccaf
DataViews: Adopt
* DataViews: Utilise `@wordpress/theme` tokens where possible
* token adjustments
* more adjustments
* Changelog
* Swap more base variables with DS tokens
* Add TODO comments for future size token migration
Made-with: Cursor
* Replace remaining SCSS variables with design system tokens
Made-with: Cursor
* Replace direct --wp-admin-theme-color references with design system tokens
Migrate direct var(--wp-admin-theme-color) and
var(--wp-admin-theme-color-darker-20) usages in DataViews to semantic
--wpds-color-* tokens (stroke-focus-brand, fg-interactive-brand,
bg-interactive-brand-strong, stroke-interactive-brand, and their
-active variants). Alpha/color-mix references using --rgb are left
for a follow-up.
Made-with: Cursor
* Changelog
Made-with: Cursor
* Replace alpha/color-mix --wp-admin-theme-color references with design tokens
Migrate remaining rgba/color-mix usages of --wp-admin-theme-color--rgb
to semantic --wpds-color-* tokens: interactive-brand-weak-active for
selected states, interactive-brand-weak for hover, and
stroke-surface-brand for row borders. Remove grid media overlay
backgrounds that lack a suitable token equivalent.
Made-with: Cursor
* Update renamed typography tokens to use --wpds-typography-* prefix
The @wordpress/theme package renamed font tokens from --wpds-font-* to
--wpds-typography-* — update all dataviews references to match.
Made-with: Cursor
* Reduce action button gap in DataViews list layout
Made-with: Cursor
* Reduce field gap spacing in DataViews list layout
Made-with: Cursor
* Replace hardcoded rgba values with color-mix using design token in activity layout gradient
Made-with: Cursor
* DataViews: Address review findings on token migration
Fixes from the AI-assisted review on PR #75204:
- Grid title: rename JSX className from `__title` to `__title-actions`
so the existing SCSS rule in `grid/style.scss` actually matches.
Aligns with picker-grid's existing convention.
- Table header padding: replace `--wpds-dimension-gap-2xl` (32px) with
`--wpds-dimension-padding-lg` (16px) on first/last header cells. The
doubled value was a token-scale typo.
- Table header button gap: replace `--wpds-dimension-gap-sm` (8px) with
`--wpds-dimension-gap-xs` (4px) to preserve the original.
- Grid gap: replace `calc(var(--wpds-dimension-base) * 8)` (32px) with
`--wpds-dimension-padding-2xl` (24px) in `grid/style.scss` and
`utils/grid-items.scss` so it matches the original `$grid-unit-30`.
- Activity layout: restore trunk dimensions while keeping theme tokens.
- `padding`: 0 24px (was 8px 24px).
- `__group-header` margin-bottom: 8px (was 16px).
- `__item-fields` gap: 12px (was 16px).
- `is-compact __item-type` width: 12px (was 8px — narrower than the
11px icon).
- `is-compact`/`is-balanced` `__item-content` margin: 12px (was 16px).
- `is-comfortable` `__item-content` margin top: 8px (was 16px).
- List default density `row-gap`: restore 4px (`gap-xs`) — was 16px
(`gap-lg`).
Made-with: Cursor
* DataViews: Re-categorise CHANGELOG for #75204 and move to Unreleased
The token-migration entry was filed under "Code Quality" in two
already-released sections. Move it to "Unreleased" and split per the
review on PR #75204:
- Enhancements: filter chip restyle, panel popover min-width bump.
- Bug Fixes: dimension drifts that the second review pass corrected
(grid title selector, table header padding, table header button gap,
default-density grid gap).
- Code Quality: the token migration itself.
Made-with: Cursor
* DataViews: Restore trunk dimensions on remaining drifted styles
Sweep grid, table, activity, list, panel, and filter styles for any
remaining 4-8px dimension drifts introduced by the token migration:
- list: restore 8px scroll-margin, 12px field gap, 8px group-header
margin-bottom (had drifted to 16px)
- panel: restore 24px min-height on field trigger, label, and control
(had drifted to 32px)
- filters: restore 28px end-padding on resettable summary chips
(had drifted to 32px)
- card: drop the orphan .dataforms-layouts-card__field-header-label
rule (no element uses that class)
Made-with: Cursor
* DataViews: Use brand-strong foreground token for selected radio dot
The inner dot of a selected radio in the filter search widget sits on
top of the brand-strong background of the radio ring. Switch from
--wpds-color-bg-surface-neutral-strong to --wpds-color-fg-interactive-
brand-strong, the token that's purpose-built to render legibly on top
of --wpds-color-bg-interactive-brand-strong across light/dark themes.
Forced-colors mode behaviour is unchanged (the browser overrides the
border colour with a system colour either way).
Made-with: Cursor
* DataViews: Use gap-xl token for grid gaps
Switch the grid layout's gap declarations from
--wpds-dimension-padding-2xl to --wpds-dimension-gap-xl. Identical
computed values across all density modes, just correct semantics for
a grid/flex gap property.
Made-with: Cursor
* DataViews: Use $icon-size consistently for icon-button widths in filters
Three spots in dataviews-filters/style.scss represent the same
"one icon-button wide" concept:
- summary-chip.has-reset padding-inline-end (was a literal 24px)
- summary-chip-remove width/height (already $icon-size)
- search-widget icon container width (was a literal 24px, drifted
from $icon-size on trunk)
Use vars.$icon-size everywhere and add a TODO to migrate once a
component-size DS token is available.
Made-with: Cursor
* DataViews: Use neutral stroke token for list focus-within border
Made-with: Cursor
* DataViews: Improve selected table row text contrast
Use the stronger neutral foreground token so cell contents remain legible against the selected row background.
Co-authored-by: Cursor <cursoragent@cursor.com>
* DataViews: Keep list row border consistent on hover
Drop the hover/focus border override so list rows retain the resting border color when hovered or focused.
Co-authored-by: Cursor <cursoragent@cursor.com>
* DataViews: Refine grid selected thumbnail outline
Match the media overlay radius to the thumbnail itself and add a 2px surface inset between the thumbnail and the brand selection stroke so the corners align and the stroke reads as a distinct ring.
Co-authored-by: Cursor <cursoragent@cursor.com>
* DataViews: Keep filter checkbox fill solid on row hover
Override the unselected multi-selection checkbox background with a surface token in the listitem hover/focus/active state so the brand-tinted row no longer shows through the transparent resting fill.
Co-authored-by: Cursor <cursoragent@cursor.com>
* DataViews: Apply brand border to filter checkbox on row hover
Mirror the single-select radio behavior so multi-select checkboxes pick up the brand stroke when their listitem is hovered, focused, or highlighted.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Dataviews: remove unused Sass imports from grid layout styles
Drop unused @use of sass:math and @wordpress/base-styles/variables; the grid stylesheet uses design tokens and other modules only.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Dataviews: align picker grid with grid layout; tidy SCSS imports
- Picker grid: match grid selected media inset ring and use md border-radius on media overlay; drop unused sass:math and variables imports.
- Filters: remove unused base-styles colors import; use md border radius on summary popover content.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Dataviews: drop sass:math from filters styles
Replace math.div for radio dot sizing with length * 0.5, which compiles to the same values without the sass:math import.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>@wordpress/theme design tokens (#75204)1 parent c1f09a1 commit 1daccaf
23 files changed
Lines changed: 431 additions & 430 deletions
File tree
- packages/dataviews
- src
- components
- dataform-controls
- dataform-layouts
- card
- details
- panel
- regular
- dataviews-bulk-actions
- dataviews-filters
- dataviews-item-actions
- dataviews-layouts
- activity
- grid
- list
- picker-grid
- picker-table
- table
- utils
- dataviews-pagination
- dataviews-selection-checkbox
- dataviews-view-config
- dataviews
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
5 | 23 | | |
6 | 24 | | |
7 | 25 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
| 29 | + | |
32 | 30 | | |
33 | 31 | | |
34 | | - | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | | - | |
| 14 | + | |
18 | 15 | | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | | - | |
| 3 | + | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | | - | |
| 7 | + | |
10 | 8 | | |
Lines changed: 41 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | | - | |
| 91 | + | |
93 | 92 | | |
94 | | - | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
| 110 | + | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
| 114 | + | |
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
135 | 151 | | |
136 | 152 | | |
137 | 153 | | |
| |||
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
154 | | - | |
155 | | - | |
| 170 | + | |
| 171 | + | |
156 | 172 | | |
157 | 173 | | |
158 | 174 | | |
159 | | - | |
| 175 | + | |
160 | 176 | | |
161 | 177 | | |
162 | 178 | | |
163 | | - | |
| 179 | + | |
164 | 180 | | |
165 | 181 | | |
166 | 182 | | |
167 | 183 | | |
168 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | | - | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
13 | | - | |
| 10 | + | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
20 | | - | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | | - | |
| 20 | + | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
| |||
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | | - | |
| 34 | + | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 1 | | |
6 | | - | |
| 2 | + | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
11 | | - | |
| 7 | + | |
12 | 8 | | |
0 commit comments