Skip to content

CSS Grid algorithm 1/N: data structures (#57459)#57459

Open
rozele wants to merge 1 commit into
react:mainfrom
rozele:export-D110780559
Open

CSS Grid algorithm 1/N: data structures (#57459)#57459
rozele wants to merge 1 commit into
react:mainfrom
rozele:export-D110780559

Conversation

@rozele

@rozele rozele commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary:

First in a series of PRs splitting the grid layout algorithm into reviewable chunks. Addresses feedback from react/yoga#1894.

Summary

  • Rename style/GridTrack.h to style/GridTrackSize.h to match the type it defines and CSS grid naming spec.
  • Remove layout state fields (baseSize, growthLimit, infinitelyGrowable) from GridTrackSize — these belong in the algorithm layer, not the style definition
  • Add algorithm/grid/GridTrack.h, wraps GridTrackSize with layout state via composition (removed inheritance)
  • Add algorithm/grid/GridItem.h, represents a grid item with its resolved position (after autoplacement algorithm) and flags used during track sizing algorithm

X-link: react/yoga#1923

Differential Revision: D110780559

Pulled By: rozele

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 7, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jul 7, 2026
@meta-codesync

meta-codesync Bot commented Jul 7, 2026

Copy link
Copy Markdown

@rozele has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110780559.

Summary:
Pull Request resolved: react#57459

  First in a series of PRs splitting the grid layout algorithm into reviewable chunks. Addresses feedback from react/yoga#1894.

  ## Summary
  - Rename `style/GridTrack.h` to `style/GridTrackSize.h` to match the type it defines and CSS grid naming spec.
  - Remove layout state fields (`baseSize`, `growthLimit`, `infinitelyGrowable`) from `GridTrackSize` — these belong in the algorithm layer, not the style definition
  - Add `algorithm/grid/GridTrack.h`, wraps `GridTrackSize` with layout state via composition (removed inheritance)
  - Add `algorithm/grid/GridItem.h`,  represents a grid item with its resolved position (after autoplacement algorithm) and flags used during track sizing algorithm

X-link: react/yoga#1923

Differential Revision: D110780559

Pulled By: rozele
@rozele rozele force-pushed the export-D110780559 branch from 1ce9208 to edab63d Compare July 8, 2026 17:56
@meta-codesync meta-codesync Bot changed the title CSS Grid algorithm 1/N: data structures CSS Grid algorithm 1/N: data structures (#57459) Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants