Skip to content

Commit b8427ba

Browse files
committed
Merge remote-tracking branch 'origin/main' into test/chore-sync
# Conflicts: # packages/@dcl/inspector/src/lib/babylon/decentraland/gizmo-manager.ts
2 parents c18a4fd + 6b8517f commit b8427ba

7 files changed

Lines changed: 551 additions & 523 deletions

File tree

.github/workflows/sync-main-to-experimental.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,25 @@ jobs:
2323
run: |
2424
git config user.name "github-actions[bot]"
2525
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
26+
git config pull.rebase false # Always merge, never rebase
2627
2728
- name: Sync main into experimental branch
2829
run: |
29-
# Always use the same rolling branch
3030
BRANCH_NAME="chore/sync"
3131
git checkout -B $BRANCH_NAME origin/experimental
3232
33-
# Pull main changes into experimental branch
34-
git pull origin main
35-
36-
git checkout --theirs .
37-
git add -A .
33+
# Merge main changes into experimental, preferring main changes on conflicts
34+
git fetch origin main
35+
git merge -X theirs origin/main || echo "Merge completed (conflicts auto-resolved in favor of main)"
3836
3937
# Run required update steps
4038
make update-protocol 'experimental'
4139
make install
4240
make build
4341
make update-snapshots
4442
45-
# Add updated files
46-
git add -A .
47-
4843
# Commit if there are changes
44+
git add -A .
4945
git commit --no-edit || echo "No changes to commit"
5046
5147
# Push (force to keep PR updated)

packages/@dcl/inspector/src/hooks/editor/useGizmoAlignment.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { CoreComponents } from '../../lib/sdk/components'
33
import { useGizmoAlignment } from './useGizmoAlignment'
44

55
// gizmoManager mock
6-
import { createGizmoManager } from '../../lib/babylon/decentraland/gizmo-manager'
6+
import { createGizmoManager } from '../../lib/babylon/decentraland/GizmoManager'
77
import mitt from 'mitt'
88
import { renderHook } from '@testing-library/react'
99
import { act } from 'react-dom/test-utils'
10-
jest.mock('../../lib/babylon/decentraland/gizmo-manager')
10+
jest.mock('../../lib/babylon/decentraland/GizmoManager')
1111
const createGizmoManagerMock = createGizmoManager as jest.MockedFn<typeof createGizmoManager>
1212
const gizmoManagerEvents = mitt()
1313
const mockEntity = 0 as Entity

packages/@dcl/inspector/src/lib/babylon/decentraland/GizmoManager.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export function createGizmoManager(context: SceneContext) {
266266
}
267267
},
268268
getGizmoTypes() {
269-
return [GizmoType.POSITION, GizmoType.ROTATION, GizmoType.SCALE, GizmoType.FREE] as const
269+
return [GizmoType.FREE, GizmoType.POSITION, GizmoType.ROTATION, GizmoType.SCALE] as const
270270
},
271271
setGizmoType(type: GizmoType) {
272272
// Then disable all Babylon gizmos
@@ -385,6 +385,14 @@ export function createGizmoManager(context: SceneContext) {
385385
currentTransformer.setup()
386386
currentTransformer.setEntities(selectedEntities)
387387

388+
// Pass GizmoManager reference to FreeGizmo for centroid calculation
389+
if ('setGizmoManager' in currentTransformer) {
390+
;(currentTransformer as any).setGizmoManager({
391+
calculateCentroid,
392+
updateGizmoPosition
393+
})
394+
}
395+
388396
// Set up callbacks for ECS updates
389397
if ('setUpdateCallbacks' in currentTransformer) {
390398
currentTransformer.setUpdateCallbacks(updateEntityPosition, () => {

packages/@dcl/inspector/src/lib/babylon/decentraland/gizmo-manager.spec.ts

Lines changed: 0 additions & 211 deletions
This file was deleted.

0 commit comments

Comments
 (0)