8000 Remove undo/redo transport buttons (keyboard-only) by johannboehme · Pull Request #147 · johannboehme/tk-1 · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions frontend/src/editor/components/TransportBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ import {
} from "../../core/arrangement-time";
import { useGlobalShortcut } from "../shortcuts/keymap";
import { useIsNarrowViewport } from "../use-is-narrow";
import {
redoEdit,
redoKeyLabel,
undoEdit,
undoKeyLabel,
} from "../history";
import { ChunkyButton } from "./ChunkyButton";
import { TransportClock } from "./TransportClock";
import {
Expand All @@ -30,12 +24,10 @@ import {
OutIcon,
PauseIcon,
PlayIcon,
RedoIcon,
SkipBackIcon,
SkipFwdIcon,
StepBackIcon,
StepFwdIcon,
UndoIcon,
} from "./icons";

type IOContextKind = "loop" | "video" | "image" | "master";
Expand Down Expand Up @@ -93,10 +85,6 @@ export function TransportBar() {
if (!clip) return "master" as const;
return clip.kind === "image" ? ("image" as const) : ("video" as const);
});
// Undo/redo affordance (#69): depths are mirrored into the store by
// the history module, so the buttons enable/disable live. The history
// object only changes reference when a depth changes.
const history = useEditorStore((s) => s.history);
// Phone-sized viewports get an aggressively compacted transport bar:
// every transport stepper + Play + IN/OUT/LOOP collapses to xs
// (h-8 ≈ 28 px wide icon-only, no min-w) so the entire 8-button
Expand Down Expand Up @@ -442,36 +430,6 @@ export function TransportBar() {
</ChunkyButton>
</div>

{/* Undo/redo (#69). Desktop-only: the phone transport row is
* budgeted to fit 8-up at 280 px and these two would break it —
* narrow layouts keep the pointer long-press flows plus the
* post-clear notice instead. */}
{!isNarrow && (
<>
<div className="hidden sm:block h-8 w-px bg-rule mx-1" />
<div className="flex items-center flex-wrap gap-1">
<ChunkyButton
variant="secondary"
size={trimSize}
=> void undoEdit()}
disabled={history.undoDepth === 0}
iconLeft={<UndoIcon />}
aria-label="Undo the last edit"
title={`Undo (${undoKeyLabel()})`}
/>
<ChunkyButton
variant="secondary"
size={trimSize}
=> void redoEdit()}
disabled={history.redoDepth === 0}
iconLeft={<RedoIcon />}
aria-label="Redo the last undone edit"
title={`Redo (${redoKeyLabel()})`}
/>
</div>
</>
)}

{/* Clock: hidden on phones — the timeline ruler shows the same
* master time, and the bezel here was eating an entire row.
* Desktop still floats it to the right of the IN/OUT/LOOP group. */}
Expand Down
111 changes: 0 additions & 111 deletions frontend/src/editor/components/TransportBar.undo.test.tsx

This file was deleted.

Loading
0