Skip to content

[codex] fix ignoreMarginInRow item sizing#987

Open
nexiumbiz-debug wants to merge 1 commit into
tiberiuzuld:masterfrom
nexiumbiz-debug:codex/fix-ignore-margin-row-height
Open

[codex] fix ignoreMarginInRow item sizing#987
nexiumbiz-debug wants to merge 1 commit into
tiberiuzuld:masterfrom
nexiumbiz-debug:codex/fix-ignore-margin-row-height

Conversation

@nexiumbiz-debug

Copy link
Copy Markdown
Contributor

Fixes #977.

What changed

  • Centralizes the trailing item margin calculation for fixed-size axes.
  • Stops subtracting a trailing row margin when ignoreMarginInRow makes the fixed row height the raw row size.
  • Applies the same calculation to rendered item styles, cached item dimensions, and display-grid row/column styles.
  • Adds regression coverage for the issue config: VerticalFixed, margin: 20, fixedRowHeight: 20, ignoreMarginInRow: true, and an item with rows: 6 now renders at 120px instead of 100px.

Root cause

updateGridster() already respects ignoreMarginInRow by not adding margin to the fixed row height for fixed and verticalFixed grids. Item sizing still subtracted margin unconditionally afterward, so 6 * 20px became 100px instead of 120px.

Validation

  • npm run test-lib -- --watch=false
  • npm run build-lib

@nexiumbiz-debug nexiumbiz-debug marked this pull request as ready for review June 14, 2026 06:54
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.

Bug: Wrong row calculation when using ignoreMarginInRow: true

1 participant