Skip to content

[codex] Preserve mobile item order - #1002

Open
nexiumbiz-debug wants to merge 1 commit into
tiberiuzuld:masterfrom
nexiumbiz-debug:codex/preserve-mobile-item-order-924
Open

nexiumbiz-debug wants to merge 1 commit into
tiberiuzuld:masterfrom
nexiumbiz-debug:codex/preserve-mobile-item-order-924

Conversation

@nexiumbiz-debug

Copy link
Copy Markdown
Contributor

Summary

  • stack mobile gridster items in a flex column so CSS ordering applies in mobile layout
  • assign each mobile item a stable order from its desktop grid row/column position
  • clear the order style when returning to the normal positioned grid layout
  • add renderer coverage for row/column-derived mobile ordering

Fixes #924.

Root cause

Mobile mode clears the absolute grid position and makes items relative, so the visible order falls back to dashboard array / DOM order. That can differ from the row/column order users see on desktop.

Validation

  • npm run test-lib -- --watch=false
  • npm run build-lib
  • npx eslint projects/angular-gridster2/src/lib/gridsterRenderer.ts projects/angular-gridster2/src/lib/tests/gridsterRenderer.spec.ts
  • git diff --check (only the repo's LF/CRLF warning)

legrottagliegionata pushed a commit to legrottagliegionata/angular-gridster2-plus that referenced this pull request Sep 13, 2026
tiberiuzuld#1002)

The mobile layout is now a flex column and each item gets an order derived from
its grid row and column, so stacked items no longer follow the DOM order.

Compared to the upstream patch, mobile items also get flex-shrink: 0.
gridster-item is a scroll container (overflow: hidden), so without it the
column squashed every item to fit the grid height: checked in the demo at
375px, 174px items shrank to 68px.

Fixes upstream tiberiuzuld#924.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gridster2 Items Not Ordering in Mobile View as in Desktop View

1 participant