Skip to content

feat(elements-registry): highlight control on row hover#359

Merged
NakataCode merged 2 commits into
masterfrom
elements-registry-hover-highlight
Jul 2, 2026
Merged

feat(elements-registry): highlight control on row hover#359
NakataCode merged 2 commits into
masterfrom
elements-registry-hover-highlight

Conversation

@NakataCode

Copy link
Copy Markdown
Contributor

Previously, hovering over elements in the Control Tree tab would highlight the corresponding DOM
element on the inspected page, but the Elements Registry tab had no such behavior.

This change adds hover-highlight support to the Elements Registry table by wiring
mouseover/mouseleave handlers on the DataGrid element. When the user hovers a row, the control's
ID is extracted via the DataGrid's internal _dataGridNode reference and sent to the content
script using the existing on-control-tree-hover message action, which triggers the highLighter
to render a blue overlay over the matching DOM element. When the mouse leaves the table,
on-hide-highlight is sent to clear the overlay.

The entire highlight infrastructure (highLighter.ts, content script message handlers, port
messaging) is reused without modification. The implementation follows the same callback pattern
used by ControlTree (onHoverChanged/onHoverHide options passed at construction time), keeping
the UI component decoupled from the messaging layer.

Guards are in place to skip highlighting when the hovered row has no valid element ID (e.g.
unrendered or anonymous controls), and the DOM walk-up is bounded to the DataGrid container to
avoid traversing into panel chrome on header-row hover.

@NakataCode
NakataCode merged commit 0fbafcb into master Jul 2, 2026
2 checks passed
@NakataCode
NakataCode deleted the elements-registry-hover-highlight branch July 2, 2026 08:26
dobrinyonkov added a commit that referenced this pull request Jul 2, 2026
Two incoming commits from master:
  0fbafcb feat(elements-registry): highlight control on row hover (#359) — clean auto-merge
  e6f9e4b fix: improve copy button UX in AI assistant responses (#358) — resolved manually

The AIChat.js and AIChat.spec.js conflicts were resolved by taking HEAD, since
those files were substantially restructured by this refactor branch: the
message rendering, streaming, and copy-button logic now live in
AssistantTranscript, driven by AssistantController.

The two behaviour deltas from PR #358 were then ported into AssistantTranscript:
  - Attach the copy-response button to the message element (not the header),
    matching the new AIChat.less layout (display: block on its own line).
  - Skip the copy-response button when the assistant message is a single code
    or JSON block, since those blocks already carry their own copy affordance.
    New helper: _isOnlyCodeOrJsonBlock.

grunt test: 582 passing, lint clean.
dobrinyonkov added a commit that referenced this pull request Jul 2, 2026
Two incoming commits from master:
  0fbafcb feat(elements-registry): highlight control on row hover (#359) — clean auto-merge
  e6f9e4b fix: improve copy button UX in AI assistant responses (#358) — resolved manually

The AIChat.js and AIChat.spec.js conflicts were resolved by taking HEAD, since
those files were substantially restructured by this refactor branch: the
message rendering, streaming, and copy-button logic now live in
AssistantTranscript, driven by AssistantController.

The two behaviour deltas from PR #358 were then ported into AssistantTranscript:
  - Attach the copy-response button to the message element (not the header),
    matching the new AIChat.less layout (display: block on its own line).
  - Skip the copy-response button when the assistant message is a single code
    or JSON block, since those blocks already carry their own copy affordance.
    New helper: _isOnlyCodeOrJsonBlock.

grunt test: 487 passing, lint clean.
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants