Skip to content

DataViews: Fade the table's scroll edges with CSS - #86829

Merged
oandregal merged 34 commits into
trunkfrom
try/dataviews-table-css-scroll-fade
Nov 19, 2026
Merged

oandregal merged 34 commits into
trunkfrom
try/dataviews-table-css-scroll-fade

Conversation

@oandregal

@oandregal oandregal commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What?

Closes #85898

Alternative to #85949: fades both edges of the table while there are more columns to scroll to on that side. Following the suggestions in the issue, it matches the approach of the wp-admin list tables (WordPress/wordpress-develop#13866): a fade at the leading and trailing edges. The divider before the sticky actions column stays as on trunk.

Use case Before After
With actions, scrolled to the middle: the columns and the lines between rows fade at both edges, and the divider sets the actions apart Pages table scrolled to the middle on trunk: the columns are cut off at the start of the table and under the actions column Pages table scrolled to the middle with this PR: the columns and the lines between rows fade out at the start of the table and before the actions column, with a 1px divider before the actions
With actions, scrolled to the end: only the leading edge fades, and the divider is hidden Pages table scrolled to the end on trunk: the first visible column is cut off at the start of the table Pages table scrolled to the end with this PR: the leading edge fades, the Parent column is shown whole, and there is no divider before the actions
Without horizontal scroll: nothing fades, there is no divider, and the actions column is 24px wider Templates table without horizontal scroll on trunk Templates table without horizontal scroll with this PR: no fades or divider, the lines between rows reach the edges of the table, and the Author column sits 24px further from the actions
Without actions, scrolled to the middle (Storybook, "Minimal UI" story, with the Moon description shortened for the screenshot) Table without actions on trunk: the Title and Categories columns are cut off at the edges Table without actions with this PR: the Title and Categories columns and the lines between rows fade out at the edges

While there are more columns to scroll to, the cell at each edge covers the 24px padding at the end of the rows, and the columns next to it fade out over another 24px. Without actions, the trailing cell is 32px wide, so a vertical overlay scrollbar does not cut the columns off before they fade.

Recordings

Chrome

Screen.Recording.2026-11-19.at.12.35.10.mov

Safari

Screen.Recording.2026-11-19.at.12.36.20.mov

Firefox

Screen.Recording.2026-11-19.at.12.51.56.mov

Why?

Today only the trailing edge has a cue, and only in tables with actions. The fades are drawn in CSS, so each row fades into its own background, including selected rows, and RTL needs no extra rules. JS only reports whether there are columns before and after the visible ones, which works the same in every browser.

How?

  • useScrollState now always tracks both horizontal edges, and the table gets has-columns-before and has-columns-after classes from it (plus has-actions). It handles RTL's negative scrollLeft, and a ResizeObserver on the container and the table replaces the window resize listener, since showing, hiding or loading columns changes the scroll range without firing scroll.
  • Leading edge: a sticky tr::before cell at the start of each row, with its own column in the colgroup. It takes the place of the first column's start padding, so the first column does not move. The header button of the first column pulls back by its own padding, so its label stays lined up with the cells.
  • Trailing edge, with actions: a ::before strip at the start of the sticky actions column covers the columns that scroll under it and fades out the ones next to it. The actions column paints the row's background.
  • Trailing edge, without actions: a sticky tr::after cell at the end of each row, taking the place of the last column's end padding. tbody now inherits the table's background, so rows without their own background have a color to fade into.
  • While active, an edge cell is scaled to twice its width from the edge of the row with a transform: its outer half covers its own space in the row's background, and its inner half holds the 24px gradient over the next columns. This avoids masks, which Firefox misplaces on sticky cells while scrolling, and box shadows, which Chrome does not paint on table cells. The rows carry their background in a custom property, since the fades cannot inherit it beyond their own box.
  • At rest, the edge cells are transparent and only keep their share of the line between rows, so they cover nothing, including the focus ring of the first column's checkbox.
  • The lines between rows are now drawn by each cell rather than by the row border, so a fade hides its share of the line and the lines fade out with the content. The rows keep a transparent border, so their height does not change.
  • The divider before the actions column is the 1px line from trunk. Like on trunk, it shows while there are more columns to scroll to, and is hidden at the end of the scroll range and when nothing scrolls.
  • The gradient directions and transform origins are set once per writing direction with custom properties, and the padding rules use logical properties.
  • The actions column is 24px wider to make room for the fade, also when nothing scrolls.

Adds browser tests (table-scroll-fade.browser.test.tsx) for the fades, the divider and the alignment, in both directions.

Breaking changes

The dataviews-view-table__actions-column--stuck and dataviews-view-table__actions-column--sticky classes are removed. --sticky was applied everywhere dataviews-view-table__actions-column was, so custom styles should target that class instead.

Testing Instructions

  1. Open a DataViews table with actions (e.g. Pages in the site editor, table layout), narrow enough to scroll horizontally.
  2. Scroll to the middle: the columns and the lines between rows fade at the start of the table and before the actions column, and a 1px divider sets the actions apart.
  3. Scroll to the end: only the leading edge fades, and the divider is hidden. Scroll back to the start: only the trailing edge fades, and the divider shows.
  4. Widen the window until nothing scrolls: no fades, no divider, and the lines between rows reach both edges.
  5. Select a row and check that the fades use the selected row's background.
  6. Tab to the first row's checkbox while scrolled to the start and check that its focus ring is not clipped.
  7. Use a table without actions (e.g. the "Minimal UI" Storybook story) and check that both edges fade the same way. With an overlay scrollbar, check that the columns fade out before reaching it.
  8. In the table without actions, set the last column to end alignment and check that its header lines up with its values.
  9. Group the table without actions and check the group header rows.
  10. Hide or show columns from the view options and check that the fades update without scrolling.
  11. Repeat in RTL and with compact density, and in Chrome, Safari and Firefox.

Use of AI Tools

Claude Code (Claude Opus 5.5) wrote the implementation and tests, which I reviewed.

@github-actions github-actions Bot added the [Package] DataViews /packages/dataviews label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @lucasmendes-design.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Unlinked contributors: lucasmendes-design.

Co-authored-by: oandregal <oandregal@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: verofasulo <veronicafasulo@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: mattmiklic <mattmiklic@git.wordpress.org>
Co-authored-by: yashwin <yashwinpoojary@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: +3.72 kB (+0.04%)

Total Size: 8.68 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 556 kB -31 B (-0.01%)
build/scripts/edit-site/index.min.js 382 kB +33 B (+0.01%)
build/scripts/editor/index.min.js 572 kB +27 B (0%)
build/scripts/media-utils/index.min.js 238 kB -2 B (0%)
build/styles/edit-site/style-rtl.css 21.3 kB +543 B (+2.62%)
build/styles/edit-site/style-rtl.min.css 17.2 kB +385 B (+2.29%)
build/styles/edit-site/style.css 21.3 kB +543 B (+2.62%)
build/styles/edit-site/style.min.css 17.2 kB +379 B (+2.26%)
build/styles/editor/style-rtl.css 32.2 kB +539 B (+1.7%)
build/styles/editor/style-rtl.min.css 27.9 kB +386 B (+1.4%)
build/styles/editor/style.css 32.3 kB +538 B (+1.69%)
build/styles/editor/style.min.css 27.8 kB +379 B (+1.38%)

08eef5d Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric c722687 trunk % Change
timeToFirstByte 55.15 ms +8.16% -1.81% 56.4 ms +3.81% -2.48% -2.22%
largestContentfulPaint 92 ms +8.7% -8.7% 84 ms +11.9% -0% 9.52%
lcpMinusTtfb 35.65 ms +5.05% -17.95% 29 ms +26.38% -6.9% 22.93%
wpBeforeTemplate 29.1 ms +15.6% -1.27% 29.26 ms +6.39% -2.12% -0.55%
wpTemplate 22.12 ms +2.98% -3.53% 22.7 ms +3.48% -5.95% -2.56%
wpTotal 51.35 ms +8.47% -1.81% 52.39 ms +3.8% -2.16% -1.99%
wpMemoryUsage 7.75 MB +0% -0% 7.71 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric c722687 trunk % Change
timeToFirstByte 46.45 ms +8.18% -3.12% 46.4 ms +6.47% -2.26% 0.11%
largestContentfulPaint 80 ms +10% -0% 80 ms +5% -0% 0%
lcpMinusTtfb 35.4 ms +6.07% -1.69% 34.95 ms +3.86% -3.72% 1.29%
wpBeforeTemplate 26.45 ms +4.61% -1.74% 26.43 ms +13.02% -2.65% 0.08%
wpTemplate 16.35 ms +6.79% -3.61% 16.35 ms +2.81% -2.69% 0%
wpTotal 43.2 ms +6.13% -3.26% 43.24 ms +7.22% -1.92% -0.09%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric c722687 trunk % Change
mediaProcessingJpeg 403.64 ms +0.77% -1.22% 404.25 ms +0.42% -1.07% -0.15%
mediaProcessingAvif 6146.82 ms +0.53% -0.56% 6175.81 ms +0.45% -0.63% -0.47%
mediaProcessingJpegToAvif 4227.14 ms +0.13% -0.22% 4239.16 ms +0.38% -0.26% -0.28%

media-upload

Metric c722687 trunk % Change
jpegUploadProcessing 2007.36 ms +2.32% -1.48% 1767.68 ms +11.66% -14.56% 13.56%
pngUploadProcessing 268 ms +4.49% -2.26% 277.79 ms +2.3% -2.15% -3.52%
largeJpegUploadProcessing 1975.39 ms +0.8% -23.39% 1519.02 ms +28.67% -0.96% 30.04%
multipleImageUploadProcessing 2143.48 ms +0.71% -1.95% 2117.72 ms +2.11% -5.2% 1.22%

post-editor

Metric c722687 trunk % Change
serverResponse 464.79 ms +6.11% -4.92% 466.94 ms +5.03% -6.88% -0.46%
firstPaint 457.87 ms +4.36% -7.4% 434.63 ms +3.31% -3.93% 5.35%
domContentLoaded 847.18 ms +2.37% -1.16% 826.1 ms +1.16% -1.31% 2.55%
loaded 848.51 ms +2.38% -1.15% 827.06 ms +1.19% -1.28% 2.59%
firstContentfulPaint 479.09 ms +1.4% -1.41% 462.75 ms +0.96% -2.91% 3.53%
firstBlock 2284.76 ms +0.94% -1.95% 2208.23 ms +0.65% -1.55% 3.47%
type 18.85 ms +6.95% -3.66% 18.25 ms +3.62% -4.6% 3.29%
typeWithoutInspector 19.47 ms +7.6% -8.47% 18.06 ms +4.87% -8.08% 7.81%
typeWithTopToolbar 27.3 ms +5.97% -16.23% 24.38 ms +2.3% -5.7% 11.98%
typeContainer 8.64 ms +12.96% -11.34% 8.92 ms +7.17% -15.92% -3.14%
focus 125.61 ms +4.74% -4.95% 121.54 ms +6.32% -5.94% 3.35%
firstFocus 270.14 ms +0% -0% 269.89 ms +0% -0% 0.09%
selectAll 440.82 ms +0.04% -8.09% 418.36 ms +0.05% -2.83% 5.37%
undo 32.18 ms +1.65% -8.92% 30.38 ms +6.42% -3.72% 5.92%
listViewOpen 80.16 ms +12.33% -5.84% 82.81 ms +9.14% -5.91% -3.2%
inserterOpen 44.52 ms +21.16% -8.51% 43.27 ms +12.46% -9.61% 2.89%
inserterHover 11.96 ms +5.52% -6.02% 11.46 ms +16.14% -5.58% 4.36%
inserterSearch 9.06 ms +6.95% -3.64% 8.17 ms +10.28% -5.14% 10.89%
loadPatterns 658.76 ms +5.75% -4.9% 679.44 ms +4.79% -3.84% -3.04%
wpTotal 454.92 ms +6.25% -5.08% 456.71 ms +5.23% -6.92% -0.39%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric c722687 trunk % Change
serverResponse 313.44 ms +1.32% -8.71% 306.92 ms +3.77% -4.66% 2.12%
firstPaint 357.35 ms +5.05% -12.29% 348.05 ms +9.05% -10.94% 2.67%
domContentLoaded 643.26 ms +2.31% -0.41% 663.77 ms +1.42% -0.95% -3.09%
loaded 644.02 ms +2.31% -0.41% 664.61 ms +1.43% -0.95% -3.1%
firstContentfulPaint 364.45 ms +3% -1.6% 369.53 ms +3.64% -0.78% -1.37%
firstBlock 2001.78 ms +0.73% -1.49% 2026.6 ms +0.37% -0.98% -1.22%
type 15.44 ms +2.4% -10.1% 15.32 ms +2.42% -11.36% 0.78%
navigate 88.87 ms +6.13% -2.51% 107.6 ms +1.08% -11.16% -17.41%
loadPatterns 1131.4 ms +4.67% -7.43% 1013.61 ms +10.98% -4.59% 11.62%
loadPages 999.01 ms +2.81% -1.24% 990.61 ms +2.18% -5.41% 0.85%
wpTotal 305.19 ms +1.34% -8.98% 298.58 ms +3.87% -4.81% 2.21%
wpMemoryUsage 12.82 MB +0% -0% 12.79 MB +0% -0% 0.25%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

08eef5d Run

@oandregal oandregal added the [Type] Enhancement A suggestion for improvement. label Nov 13, 2026
@oandregal

Copy link
Copy Markdown
Member Author

cc @verofasulo

@oandregal
oandregal marked this pull request as ready for review November 13, 2026 16:59
Copilot AI balanced review requested due to automatic review settings November 13, 2026 16:59

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jasmussen

Copy link
Copy Markdown
Contributor

In general, seems fine to me, but I appreciate you making a connection to the effort here, which is conceptually the same, so I defer to Miklic on details.

@verofasulo

Copy link
Copy Markdown
Contributor

Thanks for the ping, @oandregal!

I like the idea, but I'm not sure it fully solves the issue. This is a good example where I have many columns enabled, but I don't have any visual clues that they are hidden.

image image image

It seems like a mix of issues: 3 primary actions appearing on hover, weird column width/spacing, and a fading effect that is nice and subtle but not always effective.

Looping in @lucasmendes-design since I know he's explored this. 🙂

@oandregal

Copy link
Copy Markdown
Member Author

In this PR, I'd like to focus on using fading as I understand that's the direction we want to pursue (see wp-admin's approach and the design system reserves shadow for elevation, if I understand the rational correctly). Happy to explore shadow separately if that's the agreed upon direction we want to follow.

I've pushed a change so the divider is visible when there's horizontal scroll which addresses Veronica's point (what happens when there's no actual content to fade but there's still horizontal scroll?). The divider is hidden when there's no h scroll.

How does it look now?

Screen.Recording.2026-11-16.at.10.36.12.mov

@oandregal oandregal self-assigned this Nov 16, 2026
@oandregal

Copy link
Copy Markdown
Member Author

I've done a few changes as per @mattmiklic suggestions: reduced the fade width and added a leading edge fade as well.

This PR is using 24px for fading (both leading and trailing) while wp-admin approach uses 32px. 24 is the amount of padding we have at the leading edge and so it was a natural fit (the column is faded away when it is scrolled out of view, if that makes sense). Using 32px was also a bit tricky/complex. Happy to take another look at this if design folks think 32 is a better fit.

Screen.Recording.2026-11-16.at.11.07.33.mov

@oandregal oandregal changed the title DataViews: Fade the table's trailing edge with CSS DataViews: Fade the table's scroll edges with CSS Nov 16, 2026
@jameskoster

Copy link
Copy Markdown
Contributor

@verofasulo you should see a stroke on the actions column when the table scrolls. It's not perfect, but as @oandregal says shadows should be reserved for elevation and not applied arbitrarily.

@lucasmendes-design

Copy link
Copy Markdown

There are many cases where we don't have the Action column and the table scroll is impossible to notice. The worst case is when the card ends exactly between two columns. The table looks complete and the user never finds the rest.

@lucasmendes-design

Copy link
Copy Markdown

I'd suggest the fade treatment here since it is an elevation. The action column is above the others. But I defer to you and design system folks to tackle that.

@lucasmendes-design

Copy link
Copy Markdown

For inspiration, the hover effect on Gmail is an elevation.

image

@jameskoster

Copy link
Copy Markdown
Contributor

The action column is above the others

This is debatable imo. If we applied elevation here then why not also to the table header and footer which are also sticky, the page header as well? If we follow this logic we're going to introduce a lot of shadows which may not be beneficial.

Elevation should ideally be reserved for clearly discrete surfaces, IE dialogs, menus, tooltips, popovers, etc.

The way I see it, conceptually the actions column (and the header/footer) is a part of the same surface as the rest of the table. It doesn't exist on a separate layer meaning the other columns don't scroll beneath it, the actions column is outside of the scroll region altogether. Appreciate that's not how it works in the code, but that's a different matter :)

There are many cases where we don't have the Action column and the table scroll is impossible to notice

Agree this is a problem. It might help if the fade covered the dividing strokes as well. And we might try a more prominent separator for the actions column:

Screenshot 2026-11-16 at 18 22 40

@oandregal
oandregal force-pushed the try/dataviews-table-css-scroll-fade branch from a03d3be to cca887c Compare November 17, 2026 12:05
@oandregal

Copy link
Copy Markdown
Member Author

It might help if the fade covered the dividing strokes as well. And we might try a more prominent separator for the actions column:

This is what I have now:

  • table with actions
Screen.Recording.2026-11-17.at.14.00.03.mov
  • table without actions
Screen.Recording.2026-11-17.at.13.58.00.mov

@jameskoster

Copy link
Copy Markdown
Contributor

Thanks for trying that. I think fading the row strokes helps. Less sure about the double-column-stroke. Let's see what others think.

One small tweak worth considering; when you reach the end of the scroll I wonder if the actions column stroke should disappear to resemble the appearance when there's no scrolling.

@jasmussen

Copy link
Copy Markdown
Contributor

I think fading the row strokes helps. Less sure about the double-column-stroke. Let's see what others think.

Echoing this, the double-column stroke looks off, but the fade helps. Possibly the fade is slightly aggressive, but not a strong opinion..

I want to note I like the white fade because for me it makes the table a single surface. Nevertheless I wanted to note that in some cases, @mattmiklic has preferred a shadow instead. I think the broader context is the zebra striping that list tables have, but I also think he solved it in his patch.

Zebra stripes or not is a conversation to have at some point, by the way. Here's an experiment of slight CSS-only changes to classic list tables that I've made: not to distract from the current work, but simply to connect some dots with future explorations I'd like to make:

image

oandregal and others added 21 commits November 19, 2026 12:55
Set the padding of the first and last columns to zero where it is defined, since the fade cells take its place, instead of overriding it later with selectors repeated only to win on specificity. The sticky actions column, which ends the row in place of the trailing fade cell, now sets its own 24px end padding. Moving these rules to logical properties also fixes RTL tables with actions, where the physical end padding of the last column gave the actions 12px at their end and no gap after the fade divider.

Point the three fade gradients at custom properties for the start and end directions, flipped once for RTL, instead of a `:dir(rtl)` rule per fade.

Drop the tests that repeated the stylesheet as computed values, keeping one for the direction of the fades in both writing directions, and check the actions column's padding in RTL too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the 1px divider before the sticky actions column with a double rule, and show it whenever the columns scroll, including at the end of the scroll range. The actions column sits outside the scroll region, and the rule marks that edge like a frozen pane, without a shadow.

The rule also covers the space of the line between rows, so it is not broken at each row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lines between rows ran solid through the scroll fades, so the fades read as washed-out patches rather than edges. Each cell now draws its share of the line, and a fade hides its own share while it is active, so the lines of the columns scrolling under it fade out with their content.

The fades are now active only while there are more columns to scroll to on their side, using the same scroll-driven animations as the divider. At rest a fade cell covers only its own space, so it stays opaque and keeps its line, and the lines still reach the edges of the table. Browsers without scroll-driven animations always fade, as before.

The rows keep a transparent border, so their height does not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vertical scrollbar over the end of the table, as overlay scrollbars are, covered the outer part of the end fade, where it is most opaque, so the columns looked cut off rather than faded. Without actions, the end fade is now 32px wide and opaque over its outer 16px, so the columns have faded out before they reach the scrollbar.

The start fade stays 24px, so the first column keeps lining up with the components above the table. With actions, the scrollbar covers the end padding of the actions column instead, so its fade is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fades sat in the 24px padding at the edges of the rows, and their linear gradient left most of it see-through: text 12px from the edge was still half visible, so the fade only read over the last few pixels.

While there are more columns to scroll to, the cells at the edges now cover their whole padding, and an outline in the row's background reaches 24px over the columns next to them, fading those out instead. The mask is sized to the row and stops at its edge, so only that part of the outline shows, and at rest it hides the outline, so the columns do not move or get covered. The outline stands in for a box shadow, which Chrome does not paint on these cells.

The rows carry their background in a custom property, which the outline uses, since it cannot inherit it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At rest, the cells at the edges of the rows were opaque, and the one at the start sits above the columns, so it covered the part of the first column's focus ring that reaches into the padding, like the checkbox's.

At rest these cells only need to draw their share of the row line, so their mask now keeps just that line, intersecting it with the mask that hides the outline. While the columns scroll under them, they still cover them as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the double rule before the sticky actions column with the 1px divider from trunk, as light as the lines between rows and hidden at the end of the scroll range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fade by default, and switch to the rest mask only where a scroll timeline drives the fade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row background property already follows selection, so the rules that repainted the actions column for selected and hovered rows are no longer needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firefox and iOS Safari 18 do not support scroll timelines, so the fades and the divider before the actions always showed there, covering the start of the first column at rest. The fades now rest by default, and where the browser has no scroll timeline the table sets `has-columns-before` and `has-columns-after` from its scroll position, which apply the same styles as the animations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test

Firefox lists a `mask-composite` value once when it repeats for every mask layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Safari clips a mask to the element's box even with `mask-clip: no-clip`, so
the outline that fades the columns next to a covering cell was hidden, and the
columns were cut off at its edge. Chrome and Safari now mask the outline with a
mask border whose outset reaches over the columns; Firefox keeps the mask that
is not clipped to the box.

The outline is now only there while a fade is active, so nothing needs to hide
it at rest: the covering cells have no mask at rest, and the cells that only
keep the row line mask everything else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…croll range in Safari

Safari keeps a scroll-driven animation applied at the end of the scroll range,
past the end of its own range, so the fade before the actions stayed active
there: the row lines stopped short of the actions, and the divider stayed.
A second animation, over the last pixel of the range, puts the fades and the
divider back at rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While scrolling, Firefox moves the mask of the sticky actions column behind
the column, so it cut off the end of the actions, or let the columns show
through its start. The actions column now has no mask: a pseudo-element covers
the strip at its start, with its share of the row line, and fades out the
columns next to it with a gradient in the row's background. It shows while
there are columns to scroll to, like the divider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd end

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry browser

The table already set its `has-columns-before` and `has-columns-after`
classes from the scroll position where scroll-driven animations are not
supported. Use them in every browser, so the cues have a single code path,
and drop the scroll-driven animations along with the reset animations that
worked around Safari keeping them applied at the end of the scroll range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fade cells are stuck to the edges of the scroll container, which
clips anything beyond them, so a mask that fades out on both sides of the
cell works for either edge in either direction. This drops the per-side
and right-to-left mask variables and the mixins that picked between them,
and the row line no longer needs a position, as it spans the whole cell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mask

Firefox misplaces the mask of a sticky cell while scrolling with a
trackpad, so the fade at the start of the rows showed the columns under
it, or none of its fade. The fade cells now paint the row's background
and its ramp in a gradient, doubled in width from the edge of the row
while they are active, so they reach over the columns without a mask or
an outline. At rest they are transparent apart from their share of the
row line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oandregal
oandregal force-pushed the try/dataviews-table-css-scroll-fade branch from 3e1e612 to db07651 Compare November 19, 2026 11:56
@oandregal

Copy link
Copy Markdown
Member Author

Pushed a new version that keeps the existing scroll hook in place (for browser support) and simplifies a bit everything. It's now working nicely across browsers:

Chrome

Screen.Recording.2026-11-19.at.12.35.10.mov

Safari

Screen.Recording.2026-11-19.at.12.36.20.mov

Firefox

Screen.Recording.2026-11-19.at.12.51.56.mov

@oandregal

oandregal commented Nov 19, 2026 •

Copy link
Copy Markdown
Member Author

I read this is ready: it has design support and we're aligned with wp-admin tables work as well, so in lieu of more feedback, I'll merge once tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oandregal
oandregal merged commit 34cc65c into trunk Nov 19, 2026
130 of 139 checks passed
@oandregal
oandregal deleted the try/dataviews-table-css-scroll-fade branch November 19, 2026 13:36
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] DataViews /packages/dataviews [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataViews: Show that a table has more columns to scroll

7 participants