Skip to content

feat: 4088 add z-index support for ui elements #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
"dependencies": {
"@actions/core": "^1.10.0",
"@dcl/protocol": "1.0.0-15216214787.commit-b85a860",
"@dcl/protocol": "1.0.0-15560497739.commit-8e03daa",
"@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1",
"@dcl/ts-proto": "1.153.0",
"@types/fs-extra": "^9.0.12",
Expand Down
4 changes: 4 additions & 0 deletions packages/@dcl/playground-assets/etc/playground-assets.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,7 @@ export interface PBUiTransform {
// (undocumented)
minWidth: number;
minWidthUnit: YGUnit;
opacity?: number | undefined;
overflow: YGOverflow;
// (undocumented)
paddingBottom: number;
Expand Down Expand Up @@ -3215,6 +3216,7 @@ export interface PBUiTransform {
// (undocumented)
width: number;
widthUnit: YGUnit;
zIndex?: number | undefined;
}

// @public (undocumented)
Expand Down Expand Up @@ -4365,12 +4367,14 @@ export interface UiTransformProps {
maxWidth?: PositionUnit;
minHeight?: PositionUnit;
minWidth?: PositionUnit;
opacity?: number;
overflow?: OverflowType;
padding?: Partial<Position> | PositionShorthand;
pointerFilter?: PointerFilterType;
position?: Partial<Position> | PositionShorthand;
positionType?: PositionType;
width?: PositionUnit | 'auto';
zIndex?: number;
}

// @public (undocumented)
Expand Down
4 changes: 3 additions & 1 deletion packages/@dcl/react-ecs/src/components/uiTransform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ const defaultUiTransform: PBUiTransform = {
flexBasisUnit: YGUnit.YGU_UNDEFINED,
widthUnit: YGUnit.YGU_AUTO,
heightUnit: YGUnit.YGU_UNDEFINED,
pointerFilter: PointerFilterMode.PFM_NONE
pointerFilter: PointerFilterMode.PFM_NONE,
opacity: 1,
zIndex: 0
}

/**
Expand Down
5 changes: 5 additions & 0 deletions packages/@dcl/react-ecs/src/components/uiTransform/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,9 @@ export interface UiTransformProps {
borderColor?: Record<keyof Partial<Position>, Color4> | Color4 | undefined
borderRadius?: Partial<BorderRadius> | PositionUnit
borderWidth?: Partial<Position> | PositionUnit

/** The opacity property sets the opacity level for an element, it's accumulated across children @defaultValue 1 */
opacity?: number
/** default 0 */
zIndex?: number
}
80 changes: 69 additions & 11 deletions packages/@dcl/sdk-commands/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@dcl/sdk-commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@dcl/inspector": "file:../inspector",
"@dcl/linker-dapp": "^0.14.2",
"@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be",
"@dcl/protocol": "1.0.0-15216214787.commit-b85a860",
"@dcl/protocol": "1.0.0-15560497739.commit-8e03daa",
"@dcl/quests-client": "^1.0.3",
"@dcl/quests-manager": "^0.1.4",
"@dcl/rpc": "^1.1.1",
Expand Down
4 changes: 3 additions & 1 deletion test/ecs/components/UiComponent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ describe('UiTransform component', () => {
borderTopColor: undefined,
borderBottomColor: undefined,
borderLeftColor: undefined,
borderRightColor: undefined
borderRightColor: undefined,
opacity: undefined,
zIndex: undefined
})
})
})
Loading