Skip to content

Support tooltip arrow color in display settings and extract findElement utility#129

Merged
karngyan merged 4 commits intodevelopfrom
inapp-14297
Mar 25, 2026
Merged

Support tooltip arrow color in display settings and extract findElement utility#129
karngyan merged 4 commits intodevelopfrom
inapp-14297

Conversation

@karngyan
Copy link
Copy Markdown
Member

@karngyan karngyan commented Mar 24, 2026

Summary

Two changes in this PR:

1. Support tooltipArrowColor in display settings

Adds a tooltipArrowColor property to DisplaySettings, allowing the tooltip arrow color to be customized via the display settings API. When switching away from tooltip display type (to modal, overlay, or inline), the arrow color is cleared along with other tooltip-specific properties.

  • hasDisplayChanged detects arrow color changes so tooltips re-render when the color is updated
  • applyDisplaySettings sets the color on the message properties when the display type is tooltip, and clears it for all other display types
  • Full test coverage for setting, detecting changes, and clearing on display type switch

2. Extract shared findElement DOM utility

Consolidates duplicate element lookup logic into a single findElement utility in src/utilities/dom.ts. Both message-component-manager.ts (previously safelyFetchElement) and tooltip-position-manager.ts now use this shared function. The utility tries getElementById first, then falls back to querySelector, with a try/catch for invalid selectors.

@karngyan karngyan requested a review from a team as a code owner March 24, 2026 15:30
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@karngyan karngyan changed the title Support tooltip arrow color in display settings Support tooltip arrow color in display settings and extract findElement utility Mar 24, 2026
@karngyan karngyan merged commit 96c47e4 into develop Mar 25, 2026
2 checks passed
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.

2 participants