Skip to content

fix: resolve zIndexMap collisions between hover outlines and control buttons - #254

Open
Priyanshubhartistm wants to merge 1 commit into
tscircuit:mainfrom
Priyanshubhartistm:fix-zindex-collisions
Open

fix: resolve zIndexMap collisions between hover outlines and control buttons#254
Priyanshubhartistm wants to merge 1 commit into
tscircuit:mainfrom
Priyanshubhartistm:fix-zindex-collisions

Conversation

@Priyanshubhartistm

Copy link
Copy Markdown

Summary

  • schematicComponentHoverOutline / schematicPortHoverOutline collided with viewMenuIcon (both 48), and the derived schematicPortHoverOutline + 1 (the port hover tooltip) collided with schematicGridIcon (49).
  • Lowered schematicComponentHoverOutline to 45 and schematicPortHoverOutline to 46, so the derived + 1 tooltip value (47) stays clear of every fixed control button.
  • Added tests/z-index-map.test.ts asserting every zIndexMap value (and the derived port-tooltip value) is unique, so this can't silently regress again.

Impact

When a schematic port renders near the view-menu icon or grid-icon button, the hover outline/tooltip no longer shares a stacking layer with a fixed control button, so which one wins is determined by design instead of DOM order.

Validation

  • bun run format:check
  • bunx tsc --noEmit
  • bun test (6 pass, 0 fail)
  • Verified visually in Cosmos with Playwright: hovered a port in example17-schematic-ports and read its computed z-index back from the DOM (46, matching the new value), and confirmed example4-reset-edit-events's edit icon still renders correctly. Zero page errors.

…buttons

Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-viewer Ready Ready Preview Aug 15, 2026 7:49pm

Request Review

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