fix: review round 2 — Clear watch progress clears only the resume point, big view focus by the way it arrived, dialog name, reason tooltip, backfill locks
This commit is contained in:
@@ -11,18 +11,22 @@ type Side = "top" | "bottom" | "left" | "right";
|
||||
* is never clipped by an overflow/stacking ancestor, flips when the preferred side runs out of room
|
||||
* and slides back inside the viewport near an edge.
|
||||
* `always` bypasses the hints toggle (for a label that IS the primary affordance, e.g. the slim nav
|
||||
* rail's flyout names); `openDelay` waits before showing (a rest-on-the-icon feel). */
|
||||
* rail's flyout names); `openDelay` waits before showing (a rest-on-the-icon feel); `stable` keeps
|
||||
* the wrapper with no hint to show, so a hint that comes and goes does not remount the element and
|
||||
* cost it the focus. */
|
||||
export default function Tooltip({
|
||||
hint,
|
||||
side = "top",
|
||||
always = false,
|
||||
openDelay = 0,
|
||||
stable = false,
|
||||
children,
|
||||
}: {
|
||||
hint: string;
|
||||
side?: Side;
|
||||
always?: boolean;
|
||||
openDelay?: number;
|
||||
stable?: boolean;
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const hintsOn = useSyncExternalStore(subscribeHints, hintsEnabled, hintsEnabled);
|
||||
@@ -42,7 +46,7 @@ export default function Tooltip({
|
||||
});
|
||||
const { setReference } = pop.refs;
|
||||
|
||||
if (!enabled || !hint) return <>{children}</>;
|
||||
if ((!enabled || !hint) && !stable) return <>{children}</>;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user