From 14dc9bd8a2ac7e4118a659ce904339381b6a8653 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Sat, 7 Nov 2026 17:10:23 -0800 Subject: [PATCH] rm execessive tooltip --- docs/styleguide/components.md | 2 +- src/renderer/src/App.tsx | 2 +- .../src/component-fixtures/ComponentFixtureFrame.tsx | 2 +- src/renderer/src/components/StateIndicatorTooltip.tsx | 2 +- .../browser-pane/annotate/MarkupToolbar.tsx | 2 +- .../components/dashboard-popout/AgentKanbanBoard.tsx | 2 +- .../diff-comments/diff-comment-zone-card.tsx | 4 ++-- .../src/components/editor/EditorPanelHeader.tsx | 8 ++++---- .../components/editor/view-mode/EditorViewToggle.tsx | 2 +- .../src/components/onboarding/OnboardingFlow.tsx | 2 +- .../content-search/SearchResultItems.tsx | 2 +- .../provider-actions/HostedReviewActions.tsx | 2 +- src/renderer/src/components/right-sidebar/index.tsx | 4 ++-- .../src/components/right-sidebar/local-port-row.tsx | 2 +- .../right-sidebar/right-sidebar-top-activity-bar.tsx | 6 +++--- .../source-control/commit/commit-area.tsx | 11 +++++++++-- .../source-control/listing/conflict-badge.tsx | 2 +- .../source-control/notes/notes-shelf.tsx | 4 ++-- .../src/components/settings/advanced/AdvancedPane.tsx | 2 +- .../settings/browser/use/BrowserUseExamples.tsx | 2 +- .../components/settings/cli/install/CliSection.tsx | 2 +- .../settings/cli/install/WslCliRegistration.tsx | 2 +- .../mobile/emulator/MobileEmulatorExamples.tsx | 2 +- src/renderer/src/components/sidebar/index.tsx | 2 +- .../rows/RepoScanUnavailableIndicator.tsx | 2 +- .../rows/RepoWslDistroStoppedIndicator.tsx | 2 +- .../skills/SkillInstallWorkspaceCombobox.tsx | 2 +- .../src/components/stats/ClaudeUsageDailyChart.tsx | 2 +- .../src/components/stats/CodexUsageDailyChart.tsx | 2 +- src/renderer/src/components/stats/GrokUsagePane.tsx | 2 +- .../src/components/stats/ShareUsageButton.tsx | 2 +- .../src/components/stats/UsageTrackingPaneShell.tsx | 4 ++-- .../src/components/status-bar/PortsStatusSegment.tsx | 2 +- .../status-bar/ports-status-popover-rows.tsx | 4 ++-- .../status-bar/resource-usage-popover-summary.tsx | 4 ++-- .../status-bar/resource-usage-session-rows.tsx | 2 +- .../status-bar/resource-usage-status-trigger.tsx | 2 +- .../components/tab-bar/TabStripTooltipProvider.tsx | 2 +- src/renderer/src/components/ui/tooltip.tsx | 4 +++- .../worktree-jump/worktree-jump-palette-surface.tsx | 2 +- src/renderer/src/space.tsx | 2 +- 41 files changed, 62 insertions(+), 53 deletions(-) diff --git a/docs/styleguide/components.md b/docs/styleguide/components.md index 24e304a519b..46dbd89f118 100644 --- a/docs/styleguide/components.md +++ b/docs/styleguide/components.md @@ -51,7 +51,7 @@ Tooltips exist to _name_ a control whose meaning isn't obvious from its appearan - **Use a tooltip when:** an icon-only button or compact chip needs a label. Toolbar icons, badges with abbreviations, truncated paths. - **Don't use a tooltip when:** the control already has a visible label, the content is interactive (links, buttons), or the message is critical (errors, blocking warnings — those go inline). -- **Mounting:** the global `` lives at the App root. Don't nest a second `TooltipProvider` unless you need a different delay for a tightly-scoped surface. +- **Mounting:** the global `` lives at the App root. Tooltips wait 600 ms on each hover; don't nest a second `TooltipProvider` unless a tightly-scoped surface needs a longer delay. - **Trigger pattern:** wrap the trigger element with `` so the tooltip's accessibility props attach to the button (not a wrapper span). This is required for keyboard focus to surface the tooltip. - **Placement:** default `side="top" sideOffset={4}` — match the toolbar pattern in `sidebar/SidebarToolbar.tsx`. Pick a different side only when the default would clip against the viewport. - **Shortcut chips inside tooltips:** if the action has a keyboard shortcut, append `` rather than baking the keys into the label string. The chips render correctly per platform; baked-in strings drift. diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index ec6963440dd..2962535ef3b 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -103,7 +103,7 @@ function App(): React.JSX.Element { } as React.CSSProperties } > - + diff --git a/src/renderer/src/component-fixtures/ComponentFixtureFrame.tsx b/src/renderer/src/component-fixtures/ComponentFixtureFrame.tsx index d2deb364371..1f2ced183f6 100644 --- a/src/renderer/src/component-fixtures/ComponentFixtureFrame.tsx +++ b/src/renderer/src/component-fixtures/ComponentFixtureFrame.tsx @@ -114,7 +114,7 @@ export function ComponentFixtureFrame({ }): React.JSX.Element { return ( - +
['side'] export function StateIndicatorTooltip({ diff --git a/src/renderer/src/components/browser-pane/annotate/MarkupToolbar.tsx b/src/renderer/src/components/browser-pane/annotate/MarkupToolbar.tsx index b2813f2b449..aaa1dc4cc09 100644 --- a/src/renderer/src/components/browser-pane/annotate/MarkupToolbar.tsx +++ b/src/renderer/src/components/browser-pane/annotate/MarkupToolbar.tsx @@ -105,7 +105,7 @@ export const MarkupToolbar = React.memo(function MarkupToolbar({ const t = useTranslate() useUiLanguageRevision() return ( - +
{toolItems(t).map((item) => ( +
diff --git a/src/renderer/src/components/diff-comments/diff-comment-zone-card.tsx b/src/renderer/src/components/diff-comments/diff-comment-zone-card.tsx index debf3c34233..d33f6df6661 100644 --- a/src/renderer/src/components/diff-comments/diff-comment-zone-card.tsx +++ b/src/renderer/src/components/diff-comments/diff-comment-zone-card.tsx @@ -84,7 +84,7 @@ export function renderDiffCommentZoneCard( root.render( // View zones are separate React roots outside the app root, so App.tsx context providers don't reach them. - + - + {canOpenPreview && ( - +
- +
- +