Skip to content

fix: Flex group offsets in reverse directions and size of an empty container - #650

Draft
MatiPl01 wants to merge 2 commits into
mainfrom
fix/flex-layout-edge-cases
Draft

MatiPl01 wants to merge 2 commits into
mainfrom
fix/flex-layout-edge-cases

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Description

Two errors in the Sortable.Flex layout calculation:

  • for row-reverse and column-reverse the cross axis offsets of lines used the bottom / right padding, while items are placed with the top / left one. With different paddings, the positions at which a dragged item moves to another line were shifted by their difference,
  • an empty container with a gap was one gap smaller than its paddings on the cross axis, and had no paddings at all on the main axis. As a side effect, a container whose maximum size is smaller than its paddings is now as big as the paddings on the main axis, as in the native layout.

Testing

New jest tests, fail on main.

Evidence
Tests on main before-test-on-main.txt
Tests with the fix after-test-with-fix.txt

@MatiPl01 MatiPl01 self-assigned this Nov 25, 2026
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
react-native-sortables-docs Ignored Ignored Preview Nov 26, 2026 1:52pm UTC

This branch has not been deployed

No deployments
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