[WC-3505]: Gallery pagination design properties are not applied - #2388
Open
yordan-st wants to merge 12 commits into
Open
[WC-3505]: Gallery pagination design properties are not applied#2388yordan-st wants to merge 12 commits into
yordan-st wants to merge 12 commits into
Conversation
yordan-st
force-pushed
the
fix/WC-3505_gallery-design-properties-not-updated
branch
from
August 18, 2026 09:28
267ca2a to
b97098c
Compare
yordan-st
marked this pull request as ready for review
August 18, 2026 09:28
iobuhov
reviewed
Aug 18, 2026
iobuhov
requested changes
Aug 18, 2026
iobuhov
left a comment
Collaborator
There was a problem hiding this comment.
One of the biggest changes I need is to replace word "zone" with "slot". Slot is more known term in frontend to denote areas where you can put your elements.
Please rewrite spec, comments, variables and other identifiers. Word "zone" is bit too alien.
yordan-st
force-pushed
the
fix/WC-3505_gallery-design-properties-not-updated
branch
from
August 21, 2026 13:53
bd1edd0 to
8060d99
Compare
This comment has been minimized.
This comment has been minimized.
gjulivan
previously approved these changes
Aug 31, 2026
yordan-st
force-pushed
the
fix/WC-3505_gallery-design-properties-not-updated
branch
from
September 7, 2026 13:05
8060d99 to
4ea9fb2
Compare
This comment has been minimized.
This comment has been minimized.
yordan-st
force-pushed
the
fix/WC-3505_gallery-design-properties-not-updated
branch
from
September 8, 2026 14:55
595eb63 to
86ccbf4
Compare
This comment has been minimized.
This comment has been minimized.
yordan-st
force-pushed
the
fix/WC-3505_gallery-design-properties-not-updated
branch
from
September 9, 2026 09:46
86ccbf4 to
351ec06
Compare
leonardomendix
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
Gallery's
Paginationdesign property (Left / Center) has done nothing since the pagination overhaul. Its CSS keyed off a.widget-gallery-paginationwrapper that the overhaul deleted, so pagination was always right-aligned regardless of the setting.Restoring it is not a CSS change. Pagination now lives in a three-zone flex bar (
*-start/*-middle/*-end) where the zone, not the bar, decides position, and those zones are already used by the selection counter and the load more button. Overridingjustify-contentinside the end zone would centre pagination at ~83% of the bar width, and doing it with CSSorderor grid placement would reorder visually while leaving DOM order fixed — a WCAG 2.4.3 (Focus Order) and 1.3.2 (Meaningful Sequence) defect for a paging control.So placement is decided in markup by a pure function,
resolveZones:*-start*-middle*-middle*-start*-endThe rule is total: at most three occupants, three zones, and custom pagination replaces the built-in bar rather than adding to it, so at most one occupant is ever displaced. Displacement was chosen over wrapping to a second row because the counter appears dynamically at
selected > 0— wrapping would shift the page the moment a user selects their first item.The same result drives the footer, the top bar and the editor preview, so they cannot drift apart. That drift is what produced the second and third fixes below.
Also fixed here
Position of paginationat runtime — it always rendered below the gallery.Above gridnow renders it in the top bar.Bothrenders it once in the footer, because awidgetsplaceholder rendered twice would duplicate widget instances, DOM ids and state;check()now surfaces a warning explaining that.Design property changes (
data-widgets)Paginationis now a toggle button group with Atlas align icons, matching every other alignment control in Studio Pro, and gains an explicitRightoption.CE6083andCE6087in every existing app until a developer runs "Update all renamed design properties in project". Verified in Studio Pro during development..widget-gallery-paginationrules removed;fc-middle/tb-middleare now real flex zones so Center is centred by construction rather than incidentally.Accessibility note, intended: DOM order stays start → middle → end, so alignment now also determines tab and reading order —
Leftputs the paging controls before the Clear selection button. Visual and focus order stay in agreement, which the CSS-only alternatives could not achieve.Not in this PR: DataGrid 2's
-padding-topcontainer-query typo and its identical custom-pagination position bug ship separately so Gallery and DataGrid 2 changes stay reviewable apart. [WC-3547 Data Grid 2: Stack top bar in narrow containers](#2389 (comment))Tests: 145 unit tests pass (was 131).
resolveZonesis covered by an exhaustive 24-combination invariant pass; the bar components are asserted against real rendered DOM per zone.Planning artifacts:
packages/pluggableWidgets/gallery-web/openspec/changes/fix-gallery-pagination-placement/.What should be covered while testing?
Build both packages into a test project:
Pagination= Paging buttons. For each of Left / Center / Right, checkPosition of pagination= Below grid, Above grid, Both. Pagination should sit hard left, truly centred on the bar, or hard right, in both bars.Show selection count= Bottom. Select an item. With Left, pagination takes the left slot and the count moves right; with Center, the count stays left. Repeat withShow selection count= Top against the top bar.Pagination= Load more,Show total counton, selection active. Center should give: count left, paging status centred, Load more right.Above grid(renders in the top bar),Below grid(footer),Both(footer only, plus a warning on the widget in Studio Pro). Confirm alignment moves the custom widgets too.