Skip to content

add a ton of e2e tests for design, ux improvements and fixes - #2690

Open
sidmohanty11 wants to merge 5 commits into
mainfrom
test-design
Open

add a ton of e2e tests for design, ux improvements and fixes#2690
sidmohanty11 wants to merge 5 commits into
mainfrom
test-design

Conversation

@sidmohanty11

Copy link
Copy Markdown
Contributor

No description provided.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@sidmohanty11
sidmohanty11 marked this pull request as ready for review August 7, 2026 18:49
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@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 5 potential issues 🟡

Review Details

Code Review Summary

This large incremental update adds broad Playwright coverage for the Design editor and adjusts canvas insertion, selection chrome, auto-layout, breakpoint handling, drag/drop persistence, and inspector geometry. The overall direction is sound: the tests encode useful direct-manipulation invariants, frame-vs-rectangle semantics are made explicit, and the new tracing/debug hooks are bounded and disabled outside development. I also verified the design dev server is running cleanly for browser verification.

Risk: Standard (shared editor behavior and stateful UI logic, with no auth/payment/schema changes).

Key findings

  • 🔴 Functional: nested frame insertion uses local offsets as document coordinates, so nested primitives can be adopted by the wrong frame or rendered at the wrong position.
  • 🟡 Medium: SVG primitives bypass the new frame-host insertion path.
  • 🟡 Medium: inspector fallback can measure a matching node from the wrong screen iframe.
  • 🟡 Medium: constraints are hidden for absolutely positioned children of flex parents.
  • 🟡 Medium: host-driven layer selection does not reposition the combined multi-selection bounds overlay.

🧪 Browser testing: Will run after this review (PR touches UI code)

}

doc.body.appendChild(element);
const host = deepestFrameContaining(doc.body, left, top, width, height);

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.

🟡 Resolve nested frame bounds in document coordinates

deepestFrameContaining compares each frame's inline left/top directly with document-space primitive coordinates, but nested frame offsets are relative to their positioned parent. Once a frame is nested, primitives can miss the deepest containing frame or be rebased against the wrong origin. Accumulate positioned ancestor offsets (and add nested-frame coverage) before containment and local coordinate conversion.

Additional Info
Reported by 2 of 4 reviewers; one reviewer classified it high.

Fix in Builder

}

doc.body.appendChild(element);
const host = deepestFrameContaining(doc.body, left, top, width, height);

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.

🟡 Nest SVG primitives inside containing frames

The frame-host lookup runs only in the div-based branch. path, line, arrow, polygon, and star return after appending directly to doc.body, so drawing those tools inside a frame produces a sibling while text/rectangle/frame use nesting. Move host resolution and coordinate rebasing into the shared insertion path, and cover an SVG primitive in a frame.

Additional Info
Reported by 1 of 4 reviewers; confirmed by the branch returns before the host lookup.

Fix in Builder

if (typeof document === "undefined") return info;
const selector = info.runtimeSelector ?? info.selector;
if (!selector) return info;
for (const frame of Array.from(

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.

🟡 Measure the selected screen instead of the first matching iframe

The geometry fallback scans every preview iframe and returns the first matching selector. Selectors and stamped node IDs are scoped per screen, so identical markup on another screen can supply the wrong X/Y/W/H for the selected layer. Restrict the lookup to the selected target's owning screen/iframe (or pass its file ID through this helper).

Additional Info
Reported by 2 of 4 reviewers.

Fix in Builder

</Tooltip>
{/* Figma: constraints cannot apply to a child of an auto layout
frame — the parent's layout owns the position. */}
{element.isFlexChild ? null : (

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.

🟡 Keep constraints available for absolutely positioned flex children

The new isFlexChild gate is based only on the parent's flex display, so an absolutely positioned or fixed descendant is treated as a flex item and loses the Constraints control. Absolute-positioned descendants are not in the flex layout and still need anchoring/resize constraints; exclude them from this suppression.

Additional Info
Reported by 1 of 4 reviewers; clear regression for absolute children.

Fix in Builder

passiveSelectionOverlays.push(overlay);
positionOverlay(overlay, el);
});
// Selection changes do not go through refreshOverlays, so the combined

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.

🟡 Reposition multi-selection bounds after host selection changes

When a Layers-panel select-element message changes selectedEl, the handler updates the single-element overlay but does not call positionMultiSelectionBounds(). With passive selections still present, the combined bounds box remains at the previous selection's geometry. Recompute the combined bounds whenever host-driven selection changes (or clear passive selections consistently).

Additional Info
Reported by 1 of 4 reviewers; the existing comment here identifies the missing refresh path.

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