mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-20 20:38:34 +00:00
fix(studio): drop em-dashes from timeline tooltip and blocked-edit copy
House style is a comma, colon, or full stop. It usually shortens the sentence, which is the real win in a tooltip read at a glance mid-gesture. Slip's hint gets rewritten rather than repunctuated. "Change which part of the source plays" describes the mechanism and left readers guessing what moves; "slide the media behind it" names the thing being dragged and says outright that the clip stays put. The two thumbnail tooltips and the razor tooltip predate this branch but are the same copy on the same toolbar, so they change with it.
This commit is contained in:
@@ -63,7 +63,7 @@ describe("TimelineToolbar — adaptive thumbnails", () => {
|
||||
it("keeps a user-controlled hidden mode as the rollback path", () => {
|
||||
const { host, root } = renderToolbar();
|
||||
const button = host.querySelector<HTMLButtonElement>(
|
||||
'button[aria-label="Hide thumbnails — labels only"]',
|
||||
'button[aria-label="Hide thumbnails, labels only"]',
|
||||
);
|
||||
if (!button) throw new Error("thumbnail toggle not rendered");
|
||||
|
||||
@@ -71,7 +71,7 @@ describe("TimelineToolbar — adaptive thumbnails", () => {
|
||||
|
||||
expect(usePlayerStore.getState().thumbnailMode).toBe("hidden");
|
||||
expect(button.getAttribute("aria-label")).toBe(
|
||||
"Show thumbnails — posters stay visible; richer previews appear on interaction",
|
||||
"Show thumbnails: posters stay visible, richer previews appear on interaction",
|
||||
);
|
||||
act(() => root.unmount());
|
||||
});
|
||||
|
||||
@@ -206,7 +206,7 @@ export function TimelineToolbar({ domEditSession, onSplitElement }: TimelineTool
|
||||
</svg>
|
||||
</button>
|
||||
</Tooltip>
|
||||
<Tooltip label="Razor tool (B) — Shift+click splits all tracks">
|
||||
<Tooltip label="Razor tool (B): Shift+click splits all tracks">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setActiveTool("razor")}
|
||||
@@ -223,7 +223,7 @@ export function TimelineToolbar({ domEditSession, onSplitElement }: TimelineTool
|
||||
const Icon = TRIM_TOOL_ICONS[tool.mode];
|
||||
const active = activeTool === tool.mode;
|
||||
return (
|
||||
<Tooltip key={tool.mode} label={`${tool.label} (${tool.shortcut}) — ${tool.hint}`}>
|
||||
<Tooltip key={tool.mode} label={`${tool.label} (${tool.shortcut}): ${tool.hint}`}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setActiveTool(active ? "select" : tool.mode)}
|
||||
@@ -447,16 +447,16 @@ export function TimelineToolbar({ domEditSession, onSplitElement }: TimelineTool
|
||||
<Tooltip
|
||||
label={
|
||||
thumbnailsVisible
|
||||
? "Hide thumbnails — labels only"
|
||||
: "Show thumbnails — posters stay visible; richer previews appear on interaction"
|
||||
? "Hide thumbnails, labels only"
|
||||
: "Show thumbnails: posters stay visible, richer previews appear on interaction"
|
||||
}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={
|
||||
thumbnailsVisible
|
||||
? "Hide thumbnails — labels only"
|
||||
: "Show thumbnails — posters stay visible; richer previews appear on interaction"
|
||||
? "Hide thumbnails, labels only"
|
||||
: "Show thumbnails: posters stay visible, richer previews appear on interaction"
|
||||
}
|
||||
aria-pressed={thumbnailsVisible}
|
||||
onClick={() => setThumbnailMode(thumbnailsVisible ? "hidden" : "adaptive")}
|
||||
|
||||
@@ -15,13 +15,13 @@ export type BlockedTimelineEditIntent = "move" | "resize-start" | "resize-end" |
|
||||
export function blockedTimelineEditMessage(intent: BlockedTimelineEditIntent): string {
|
||||
switch (intent) {
|
||||
case "ripple":
|
||||
return "This clip can't be ripple-trimmed — it or a clip after it is locked.";
|
||||
return "This clip can't be ripple-trimmed: it or a clip after it is locked.";
|
||||
case "roll":
|
||||
return "Rolling needs a clip butted against this edit point.";
|
||||
case "slip":
|
||||
return "Only clips with source media can be slipped.";
|
||||
case "slide":
|
||||
return "This clip can't be slid — it or a neighbour is locked.";
|
||||
return "This clip can't be slid: it or a neighbour is locked.";
|
||||
default:
|
||||
return "This clip can't be moved or resized from the timeline yet.";
|
||||
}
|
||||
|
||||
@@ -31,25 +31,25 @@ export const TIMELINE_TRIM_TOOLS: readonly TimelineTrimToolSpec[] = [
|
||||
mode: "ripple",
|
||||
label: "Ripple trim",
|
||||
shortcut: "T",
|
||||
hint: "Drag a clip edge — every later clip on the track follows, so no gap opens.",
|
||||
hint: "Drag a clip edge. Every later clip on the track follows, so no gap opens.",
|
||||
},
|
||||
{
|
||||
mode: "roll",
|
||||
label: "Roll edit",
|
||||
shortcut: "⇧T",
|
||||
hint: "Drag the cut between two clips — one grows by exactly what the other gives up.",
|
||||
hint: "Drag the cut between two clips. One grows by exactly what the other gives up.",
|
||||
},
|
||||
{
|
||||
mode: "slip",
|
||||
label: "Slip",
|
||||
shortcut: "Y",
|
||||
hint: "Drag inside a clip to change which part of the source plays. Nothing moves.",
|
||||
hint: "Drag inside a clip to slide the media behind it. The clip stays put, a different part of the source plays.",
|
||||
},
|
||||
{
|
||||
mode: "slide",
|
||||
label: "Slide",
|
||||
shortcut: "⇧Y",
|
||||
hint: "Drag a clip along the track — its neighbours absorb the move.",
|
||||
hint: "Drag a clip along the track. Its neighbours absorb the move.",
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user