Skip to content

Highlight connected schematic traces on hover#188

Open
DevvoZA wants to merge 10 commits into
tscircuit:mainfrom
DevvoZA:codex/highlight-connected-traces
Open

Highlight connected schematic traces on hover#188
DevvoZA wants to merge 10 commits into
tscircuit:mainfrom
DevvoZA:codex/highlight-connected-traces

Conversation

@DevvoZA
Copy link
Copy Markdown

@DevvoZA DevvoZA commented May 11, 2026

Fixes tscircuit/tscircuit#1130

/claim tscircuit/tscircuit#1130
/fixes tscircuit/tscircuit#1130

Summary

  • Add a hook that tracks hovered schematic traces and applies hover styling to every trace connected to the same source net.
  • Group traces using source trace, source net, source port, and connectivity-map metadata so same-net traces are highlighted together across Circuit JSON variants.
  • Add focused tests for source-net, source-port, and subcircuit connectivity-key trace grouping.
  • Add a same-net hover fixture so the behavior can be checked in the preview.
  • Reuse the existing hover visual behavior by applying the same invert filter and crossing-outline opacity styling.

Validation

  • npm exec -- biome format --write examples/example21-same-net-trace-hover.fixture.tsx lib/components/SchematicViewer.tsx lib/hooks/useHighlightConnectedSchematicTraces.ts tests/useHighlightConnectedSchematicTraces.test.ts
  • npx -y bun test tests/useHighlightConnectedSchematicTraces.test.ts
  • npx -y -p typescript@5.9.3 tsc --noEmit
  • npm exec -- tsup --config tsup-webworker.config.ts && npx -y tsx scripts/build-worker-blob-url.ts && npm exec -- tsup-node ./lib/index.ts --dts --format esm --sourcemap

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

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

Project Deployment Actions Updated (UTC)
schematic-viewer Ready Ready Preview, Comment May 11, 2026 10:12pm

Request Review

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change of color on hover for traces are missing

1 participant