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 && ( - +
- +
- +