Skip to content

fix(layout): prevent view holder container flattening - #2400

Open
wanxiankai wants to merge 1 commit into
Shopify:mainfrom
wanxiankai:fix/view-holder-container-flattening
Open

fix(layout): prevent view holder container flattening#2400
wanxiankai wants to merge 1 commit into
Shopify:mainfrom
wanxiankai:fix/view-holder-container-flattening

Conversation

@wanxiankai

Copy link
Copy Markdown

Description

Fixes #2399

Prevent React Native view flattening from removing the ViewHolderCollection
container. This view provides the coordinate system and scroll extent for the
absolutely positioned item views, so flattening it can make rows lose content
padding and header offsets.

This change:

  • marks the collection container as collapsable={false}, matching the outer
    RecyclerView container
  • adds a focused component test that protects the native layout constraint

Reviewers’ hat-rack 🎩

  • Confirm the collection container should remain a native coordinate anchor
  • Verify the regression test covers the view-flattening contract

Screenshots or videos (if needed)

Not included. The failure depends on Fabric's native view-flattening decision;
the regression test verifies the required native view prop directly.

Testing

  • yarn test --runInBand --watchman=false (15 suites, 188 tests)
  • yarn type-check
  • yarn lint
  • yarn build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant