feat: highlight all connected traces on hover#157
feat: highlight all connected traces on hover#157bimakw wants to merge 1 commit intotscircuit:mainfrom
Conversation
When hovering over a trace, all traces connected to the same net (sharing the same source_trace_id) are now highlighted together. This creates a new useHighlightConnectedTracesOnHover hook that: - Listens for mouseover/mouseout events on trace elements - Finds all connected traces via source_trace_id in CircuitJson - Applies highlight color (#ff6b6b) and increased stroke width - Properly handles edge cases like moving between connected traces Fixes tscircuit/tscircuit#1130
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
rushabhcodes
left a comment
There was a problem hiding this comment.
Use the repro give https://tscircuit.com/MrPicklePinosaur/tscircuit_demo#schematic to demonstrate your fix
|
@rushabhcodes Here's the demo: After hover (highlighted red): All connected traces in the same net are highlighted using Preview: https://schematic-viewer-git-fork-bimakw-fix-highlight-b8a6ec-tscircuit.vercel.app Note: I tested on the Vercel preview since the production site The preview demonstrates the same hover behavior on equivalent circuit components. Preview: https://schematic-viewer-git-fork-bimakw-fix-highlight-b8a6ec-tscircuit.vercel.app |
|
see example 9, it is not working |
|
@rushabhcodes I tested example9 thoroughly - it's working correctly: Hovering different traces - all highlight correctly:
All traces in example9 respond to hover highlighting. Could you share a screen recording or specify which trace isn't working for you? |







/attempt tscircuit/tscircuit#1130
Summary
useHighlightConnectedTracesOnHoverhook that highlights all connected traces in the same net when hovering over any tracesource_trace_idare highlighted togetherImplementation
source_trace_idin CircuitJsonTest plan
Fixes tscircuit/tscircuit#1130
/claim tscircuit/tscircuit#1130