Skip to content

[WC-3547]: Data Grid 2 Stack top bar in narrow containers - #2389

Open
yordan-st wants to merge 2 commits into
mainfrom
fix/datagrid-narrow-top-bar-stacking
Open

[WC-3547]: Data Grid 2 Stack top bar in narrow containers#2389
yordan-st wants to merge 2 commits into
mainfrom
fix/datagrid-narrow-top-bar-stacking

Conversation

@yordan-st

@yordan-st yordan-st commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

_datagrid.scss's top-bar container query targets #{$root}-padding-top, which no element ever carries — the class is widget-datagrid-paging-top. The footer counterpart directly above it is spelled correctly, so this looks like a typo from when the two blocks were written.

Effect: Data Grid 2's top bar has never stacked its content vertically in containers narrower than 500px, while the footer always has. One word changed.

Worth reviewing with care despite the size: because the rule has never applied, fixing it changes narrow-width layout for the first time. Below 500px the top bar now switches to column-reverse and centres its zones, matching the footer's behaviour and the original intent.

Found while investigating WC-3505; split out so Gallery and Data Grid 2 changes stay separately reviewable. Ticket created.

What should be covered while testing?

  1. Place a Data Grid 2 with pagination Above grid and multi selection with Show selection count = Top.
  2. Put it in a container narrower than 500px, or shrink the browser until the grid container crosses that width.
  3. The top bar should stack vertically (pagination above the selection count, column-reverse) with both zones full width and centred — the same way the footer already behaves.
  4. Above 500px, nothing should change from current behaviour.

@yordan-st yordan-st changed the title fix(data-widgets): stack Data Grid 2 top bar in narrow containers [WC-3547] Data Grid 2: Stack top bar in narrow containers Aug 17, 2026
@yordan-st
yordan-st force-pushed the fix/datagrid-narrow-top-bar-stacking branch from ed6cf3f to 22cfe17 Compare August 18, 2026 09:36
@yordan-st
yordan-st marked this pull request as ready for review August 18, 2026 09:36
@yordan-st
yordan-st requested a review from a team as a code owner August 18, 2026 09:36
@github-actions

This comment has been minimized.

@yordan-st yordan-st changed the title [WC-3547] Data Grid 2: Stack top bar in narrow containers [WC-3547]: Data Grid 2 Stack top bar in narrow containers Aug 19, 2026
@yordan-st
yordan-st force-pushed the fix/datagrid-narrow-top-bar-stacking branch from 22cfe17 to 7d4f572 Compare August 20, 2026 08:48
@github-actions

This comment has been minimized.

The top bar container query targeted $root-padding-top instead of
$root-paging-top, so the narrow-width rule has never applied and the top bar
never stacked below 500px. Its footer counterpart is spelled correctly.
@yordan-st
yordan-st force-pushed the fix/datagrid-narrow-top-bar-stacking branch from 7d4f572 to 388fca9 Compare August 20, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant