Skip to content

fix(design): persist pointer-driven layer reorders - #5523

Open
steve8708 wants to merge 1 commit into
mainfrom
fix/design-layers-drag-persistence
Open

steve8708 wants to merge 1 commit into
mainfrom
fix/design-layers-drag-persistence

Conversation

@steve8708

Copy link
Copy Markdown
Contributor

Fixes Layers-panel reorder drops that arrive with an empty dataTransfer payload during pointer-driven Chromium drags.

  • fall back to the authoritative same-window drag state
  • exercise the reorder with Playwright pointer events
  • verify the reordered layers survive reload

Validation: git diff --check passed. Focused runtime tests could not run because workspace dependencies are not installed.

builder-io-integration[bot]

This comment was marked as outdated.

@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

builder-io-integration[bot]

This comment was marked as outdated.

builder-io-integration[bot]

This comment was marked as outdated.

@steve8708
steve8708 force-pushed the fix/design-layers-drag-persistence branch from 66fea9a to b27240b Compare September 21, 2026 21:43
@steve8708
steve8708 force-pushed the fix/design-layers-drag-persistence branch from b27240b to f817588 Compare September 21, 2026 21:44

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder reviewed your changes and found 1 potential issue 🔴

Review Details

Incremental Code Review

The latest commit adds templates/design/app/components/design/LayersPanel.spec.ts to unit-test the drag-state fallback. The test intent is useful, but the new file currently imports canUseActiveDragStateForDrop and LayersPanelMoveIntent from ./LayersPanel even though neither symbol is defined or exported by the current LayersPanel.tsx. This causes the new Vitest/TypeScript test to fail at module/type resolution before the assertions can run.

The previously reviewed drag/drop implementation remains unchanged, and the added test is the only new functional delta. No browser verification was run because this incremental change is test-only and the prior dev-server setup remains unavailable due to the canvas dependency build failure.

🧪 Browser testing: Skipped — PR delta only adds a unit test; dev-server setup is also unavailable.

import { describe, expect, test } from "vitest";

import {
canUseActiveDragStateForDrop,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Export the helper and type used by the new test

The new spec imports canUseActiveDragStateForDrop and LayersPanelMoveIntent from ./LayersPanel, but the current LayersPanel.tsx does not define or export either symbol. Vitest/TypeScript will fail to resolve this test before executing it; add the helper/type to LayersPanel.tsx and export them, or update the test to use symbols that actually exist.

Fix in Builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant