Skip to content

CSS Grid 6/9: JavaScript bindings#1898

Open
intergalacticspacehighway wants to merge 6 commits intofacebook:mainfrom
intergalacticspacehighway:css-grid-6-javascript
Open

CSS Grid 6/9: JavaScript bindings#1898
intergalacticspacehighway wants to merge 6 commits intofacebook:mainfrom
intergalacticspacehighway:css-grid-6-javascript

Conversation

@intergalacticspacehighway
Copy link
Contributor

Summary

  • JS/WASM bindings for CSS Grid
  • Includes embind, TypeScript types (YGEnums.ts), Node wrapper updates (wrapAssembly.ts)
  • Existing generated JS tests updated to import GridTrackType

Split from #1865. Depends on #1897. Merge after 5/9.

NickGerleman and others added 6 commits February 25, 2026 16:51
Summary:
Add the foundational data types, enums, style properties, and C API for
expressing CSS Grid layouts in Yoga.

Includes:
- Grid style types (GridLine.h, GridTrack.h, GridTrackType.h)
- Updated enums (Display::Grid, Align::Start/End, Justify::Auto/Stretch/Start/End)
- Grid event (LayoutPassReason::kGridLayout)
- Style property accessors and member variables
- Public C API (YGGridTrackList.h/cpp, YGNodeStyle grid setters/getters)
- Layout helpers updated for new enum values (Align.h, AbsoluteLayout.cpp,
  CalculateLayout.cpp/h partial)
- Node.h: relativePosition made public
- React Native mirror of all C++ changes

Differential Revision: D93946262
Summary:
Add the core grid layout computation and integrate it into the layout
dispatcher.

Includes:
- AutoPlacement.h: auto-placement algorithm for grid items
- GridLayout.h/cpp: grid layout entry point
- TrackSizing.h: track sizing algorithm
- CalculateLayout.cpp: grid dispatch block and #include
- CMakeLists.txt: add algorithm/grid/*.cpp glob
- React Native mirror of all C++ changes

Differential Revision: D93946253
Summary:
Add grid layout benchmarks.

Includes:
- YGGridBenchmark.c: 14 benchmark scenarios
- benchmarkgrid: shell script to run benchmarks
- CMakeLists.txt: benchmarkgrid target

Differential Revision: D93946260
Summary:
Add hand-written C++ tests for the grid layout algorithm.

Includes:
- Hand-written tests: AutoPlacementTest.cpp, CreateGridTrackTest.cpp
- Modified existing tests: YGAlignBaselineTest.cpp (+3 grid baseline tests),
  YGHadOverflowTest.cpp (+1 grid overflow test)

Differential Revision: D93946259
Summary:
Add Java/Kotlin bindings for CSS Grid support. Includes grid API classes
(YogaGridTrackList, YogaGridTrackValue, YogaGridTrackType), JNI bridge
updates, enum changes (YogaDisplay, YogaAlign, YogaJustify).

Also includes React Native Android mirror of all Java/Kotlin changes.

Differential Revision: D93946256
Summary:
Add JavaScript/WASM bindings for CSS Grid support. Includes embind
bindings, TypeScript types (YGEnums.ts), Node wrapper updates
(wrapAssembly.ts).

Existing generated JS tests are updated to import GridTrackType.

Differential Revision: D93946255
@vercel
Copy link

vercel bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
yoga-website Ready Ready Preview, Comment Feb 25, 2026 9:34pm

Request Review

@meta-cla meta-cla bot added the CLA Signed label Feb 25, 2026
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants