feat: add gap, aspectRatio, flex, direction and boxSizing to UiTransform - #1528
Draft
cyaiox wants to merge 1 commit into
Draft
feat: add gap, aspectRatio, flex, direction and boxSizing to UiTransform#1528cyaiox wants to merge 1 commit into
cyaiox wants to merge 1 commit into
Conversation
Deploying js-sdk-toolchain with
|
| Latest commit: |
d32c26c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f63bf955.js-sdk-toolchain.pages.dev |
| Branch Preview URL: | https://cyaiox-feat-react-ecs.js-sdk-toolchain.pages.dev |
Contributor
Test this pull request
|
Contributor
|
cyaiox
marked this pull request as draft
August 6, 2026 16:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the remaining "easy" Yoga layout properties to
UiTransformPropsin@dcl/react-ecs:gap/rowGap/columnGap— flexbox gutters with CSS-like semantics.gapaccepts a single value (both axes) or a two-value shorthand ('10px 5%'→ row then column); supportspx,%,vw,vhand bare numbers via the existingparsePositionUnitpipeline. Longhands win over the shorthand on their axis.aspectRatio— locks the element's width/height ratio.flex— the Yoga flex shorthand. The prop already existed inUiTransformPropsbut was silently dropped at serialization becausePBUiTransformhad no such field; it now works.direction— layout direction ('inherit' | 'ltr' | 'rtl').boxSizing—'border-box' | 'content-box'.Protocol dependency
Built on decentraland/protocol#460 (fields 78–87 +
YGDirection/YGBoxSizingenums on component 1050). Both@dcl/protocolpins currently point at that PR's CI package — they must be repointed to the published version once the protocol PR merges, before this lands (make update-protocol).Notes
YGDIR_INHERIT,YGBS_BORDER_BOX), so proto3 default-omission and the reconciler's falsy-diff behavior are both safe..crdtdiffs are bundle-size/malloc counters from the enlarged generated protobuf code. NoERR!lines.box_sizingneeds Yoga ≥ 3.2). Until then the fields serialize and are ignored.Testing
UiComponent.spec.ts.make test: 155 suites / 1159 tests green,@dcl/ecs100% coverage gate passing.