Skip to content

DataViews: Use border width token for 1px borders and hairlines - #87662

Merged
simison merged 2 commits into
trunkfrom
simison/dataviews-border-width-xs-token
Nov 30, 2026
Merged

simison merged 2 commits into
trunkfrom
simison/dataviews-border-width-xs-token

Conversation

@simison

@simison simison commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

What?

Replaces hard-coded 1px border widths and 1px divider lines in the DataViews and DataForm styles with the --wpds-border-width-xs design token.

Why?

We've been moving the DataViews to WPDS design tokens and @wordpress/ui components so this is a step to that direction.

How?

--wpds-border-width-xs resolves to 1px, so there should be no visual change.

  • border / border-top / border-bottom: 1px solid … in filters, DataForm controls, list and table layouts.
  • 1px-wide or 1px-tall pseudo-element dividers: the table actions divider, the table's sticky header line and the timeline connector lines in the activity and picker-activity layouts.
  • The 1px row line drawn with background-size in the table layout.

Left out on purpose: the calc( … ± 1px ) icon sizes in the activity and picker-activity layouts. They size the timeline icons, not borders.

Testing Instructions

  1. Open the DataViews and DataForm stories in Storybook (table, list, activity, picker activity layouts; filters; DataForm panel and card layouts).
  2. Confirm borders, row lines, the table's sticky header line, the actions column divider and timeline connector lines look the same as on trunk.

@simison simison added [Type] Code Quality Issues or PRs that relate to code quality [Package] DataViews /packages/dataviews labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: simison <simison@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +265 B (0%)

Total Size: 8.73 MB

📦 View Changed
Filename Size Change
build/styles/edit-site/style-rtl.css 21.3 kB +39 B (+0.18%)
build/styles/edit-site/style-rtl.min.css 17.2 kB +24 B (+0.14%)
build/styles/edit-site/style.css 21.4 kB +41 B (+0.19%)
build/styles/edit-site/style.min.css 17.2 kB +24 B (+0.14%)
build/styles/editor/style-rtl.css 32.2 kB +42 B (+0.13%)
build/styles/editor/style-rtl.min.css 27.9 kB +27 B (+0.1%)
build/styles/editor/style.css 32.3 kB +41 B (+0.13%)
build/styles/editor/style.min.css 27.8 kB +27 B (+0.1%)

07b561e Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 551b1d9 trunk % Change
timeToFirstByte 36.8 ms +14.54% -3.94% 36.3 ms +8.82% -5.51% 1.38%
largestContentfulPaint 64 ms +3.13% -12.5% 56 ms +14.29% -3.57% 14.29%
lcpMinusTtfb 22.7 ms +24.01% -12.33% 20.2 ms +11.88% -8.42% 12.38%
wpBeforeTemplate 19.13 ms +16.52% -2.25% 19.61 ms +7.45% -8.21% -2.45%
wpTemplate 14.34 ms +3.14% -4.53% 13.74 ms +5.17% -4.22% 4.37%
wpTotal 33.67 ms +14.14% -4.1% 33.42 ms +9.04% -5.83% 0.75%
wpMemoryUsage 7.75 MB +0% -0% 7.72 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 551b1d9 trunk % Change
timeToFirstByte 30.05 ms +10.65% -2.5% 28.8 ms +10.94% -1.91% 4.34%
largestContentfulPaint 56 ms +7.14% -7.14% 52 ms +7.69% -0% 7.69%
lcpMinusTtfb 25.1 ms +4.58% -8.76% 23.75 ms +2.53% -2.32% 5.68%
wpBeforeTemplate 17.08 ms +3.57% -1.11% 16.17 ms +3.4% -0.62% 5.63%
wpTemplate 10.17 ms +5.6% -2.26% 9.91 ms +6.86% -2.42% 2.62%
wpTotal 27.09 ms +7.57% -0.44% 26.17 ms +8.02% -1.68% 3.52%
wpMemoryUsage 6.44 MB +0% -0% 6.41 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 551b1d9 trunk % Change
mediaProcessingJpeg 224.68 ms +3.06% -0.36% 227.67 ms +1.75% -4.55% -1.31%
mediaProcessingAvif 3667.31 ms +1.44% -0.73% 3638.84 ms +5.74% -1.57% 0.78%
mediaProcessingJpegToAvif 2592.05 ms +1.2% -0.73% 2550.19 ms +3.21% -3.48% 1.64%

media-upload

Metric 551b1d9 trunk % Change
jpegUploadProcessing 1441.5 ms +1.69% -1.34% 1431.47 ms +2.31% -0.52% 0.7%
pngUploadProcessing 188.62 ms +2.22% -4.82% 184.56 ms +1.97% -3.66% 2.2%
largeJpegUploadProcessing 1443.89 ms +0.57% -1.12% 1424.26 ms +2.09% -0.75% 1.38%
multipleImageUploadProcessing 1490.06 ms +0.47% -1.15% 1487.78 ms +0.76% -0.26% 0.15%

post-editor

Metric 551b1d9 trunk % Change
serverResponse 399.78 ms +6.34% -6% 422.97 ms +0.97% -10.08% -5.48%
firstPaint 403.91 ms +9.67% -8.25% 418.51 ms +11.26% -6.38% -3.49%
domContentLoaded 815.79 ms +1.66% -2.76% 844.21 ms +0.6% -1.2% -3.37%
loaded 816.99 ms +1.65% -2.78% 845.3 ms +0.59% -1.19% -3.35%
firstContentfulPaint 464.17 ms +2.11% -3.51% 466.07 ms +5.36% -1.4% -0.41%
firstBlock 2161.13 ms +0.75% -1.66% 2255.8 ms +0.5% -1.46% -4.2%
type 18.8 ms +8.14% -15% 19.61 ms +6.12% -9.54% -4.13%
typeWithoutInspector 17.53 ms +8.16% -7.82% 19.16 ms +6.21% -11.9% -8.51%
typeWithTopToolbar 23.18 ms +1.16% -2.8% 25.59 ms +9.11% -10.75% -9.42%
typeContainer 8.25 ms +5.94% -5.33% 8.32 ms +6.85% -3.12% -0.84%
focus 112.66 ms +11.92% -6.41% 112.99 ms +1.86% -3.11% -0.29%
firstFocus 289.86 ms +0% -0% 274.95 ms +0% -0% 5.42%
selectAll 401 ms +0.4% -2.47% 384.18 ms +1.16% -0.85% 4.38%
undo 32.56 ms +7.03% -6.33% 31.6 ms +4.72% -4.65% 3.04%
listViewOpen 40.48 ms +3.26% -2.96% 41.62 ms +4.66% -11.7% -2.74%
inserterOpen 42.44 ms +6.76% -2.59% 44.05 ms +14.07% -5.2% -3.65%
inserterHover 11.94 ms +6.03% -6.11% 11.87 ms +11.96% -9.44% 0.59%
inserterSearch 9.05 ms +3.31% -4.75% 8.38 ms +3.82% -3.58% 8%
loadPatterns 641.64 ms +6.34% -4.8% 694.74 ms +0.34% -6.14% -7.64%
wpTotal 388.46 ms +6.6% -6.15% 412.07 ms +0.94% -10.36% -5.73%
wpMemoryUsage 14.80 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 551b1d9 trunk % Change
serverResponse 300.72 ms +8.89% -1.92% 326.06 ms +3.59% -9.42% -7.77%
firstPaint 386.96 ms +1.27% -18.87% 387.88 ms +0.88% -19.42% -0.24%
domContentLoaded 690.31 ms +4.1% -0.74% 689.43 ms +0.18% -1.26% 0.13%
loaded 691.17 ms +4.09% -0.73% 690.39 ms +0.18% -1.27% 0.11%
firstContentfulPaint 392.01 ms +0.72% -0.32% 389.6 ms +1.21% -1.13% 0.62%
firstBlock 2147.56 ms +0.78% -0.53% 2127.73 ms +1.11% -0.56% 0.93%
type 15.83 ms +20.09% -11.94% 17.05 ms +4.99% -6.51% -7.16%
navigate 93.85 ms +0.98% -5.08% 108.29 ms +19.79% -4.25% -13.33%
loadPatterns 1208.03 ms +7.34% -9.69% 1227.43 ms +2.82% -16.04% -1.58%
loadPages 929.33 ms +1.72% -1.28% 929.75 ms +10.38% -2.27% -0.05%
wpTotal 292.2 ms +9.16% -1.96% 317.58 ms +3.72% -9.65% -7.99%
wpMemoryUsage 12.84 MB +0% -0% 12.80 MB +0% -0% 0.28%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

07b561e Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

allows widgets to be moved between widget areas using the dropdown in the block toolbar in /test/e2e/specs/widgets/editing-widgets.spec.js, passed after 1 failed attempt.

should give the image its context menu while selected @WebKit @Firefox in /test/e2e/specs/editor/blocks/image.spec.js, passed after 1 failed attempt.
Test timeout of 100000ms exceeded.

07b561e Run

@simison
simison marked this pull request as ready for review November 30, 2026 11:05
@simison
simison requested a review from a team November 30, 2026 18:29

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

As a follow-up, could we also move the DataViews focus rings that still use --wp-admin-border-width-focus to WPDS? Ideally with the outset-ring__focus() mixin from @wordpress/base-styles, or the --wpds-border-width-focus token where the mixin doesn't fit.

Replace hard-coded 1px border widths and 1px divider lines in DataViews and
DataForm styles with --wpds-border-width-xs, which resolves to 1px.
@simison
simison force-pushed the simison/dataviews-border-width-xs-token branch from 453b807 to 07b561e Compare November 30, 2026 20:14
@simison
simison enabled auto-merge (squash) November 30, 2026 20:22
@simison
simison merged commit b834388 into trunk Nov 30, 2026
84 checks passed
@simison
simison deleted the simison/dataviews-border-width-xs-token branch November 30, 2026 20:35
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 30, 2026
@ciampo

ciampo commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Actually, I can look into the focus ring follow-up.

@ciampo

ciampo commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

#87691 (wip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] DataViews /packages/dataviews [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants