Repository navigation
Duplicate button for slides only - #190
Merged
Merged
Conversation
With rows selected on the canvas the button duplicated those rows, offset 16px; otherwise it duplicated the slide. The same click meant two things depending on the selection. It now duplicates the current slide on the canvas whatever rows are selected (the selection clears) and the selected slides in the contact sheet. Its tooltip and aria-label read "Duplicate slide". Rows are copied with ⌘C and ⌘V. ⌘D has no handler (retired for this button, which the gate asserts); the contact sheet paragraph in docs/editor.md no longer lists it. Gate: test/hud.test.mjs, test/gate.test.mjs. Deck and library html rebuilt. Fixes #80 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # deck.html # docs/editor.md # library.html # template.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
$('dup').onclickloses the branch that duplicated the selected rows (offset 16px, copies selected). On the canvas the button now always duplicates the current slide, after itself, and clears the row selection; in the contact sheet it duplicates the selected slides, unchanged.data-tipandaria-labelread "Duplicate slide" (were "Duplicate selection or slide").docs/editor.md: the HUD line describes the button as slides only and points rows at ⌘C / ⌘V; the contact sheet paragraph no longer lists ⌘D.CHANGELOG.mdentry. Deck and library html rebuilt.Why
Issue #80: the same click duplicated a slide or a set of rows depending on what happened to be selected, with no way to tell which without looking at the canvas first. Rows now copy with ⌘C / ⌘V (#79, PR #187), which also moves them across slides and translates a line connector's both ends through the same
moveBy()path the old row branch used.⌘D
No keyboard shortcut shares this handler.
test/gate.test.mjsalready asserts there is nomod&&k==='d'branch ("⌘D is gone: the duplicate button is the door"), the shortcuts popover says ⌘D is not a shortcut, and the HUD line indocs/editor.mdsays the same. Only the contact sheet paragraph still listed ⌘D, which contradicted the rest; this PR removes it there. The lease guard still swallows ⌘D under an agent checkout, which is harmless and unchanged.Test
test/hud.test.mjs, "hud: the duplicate button is named for the slide" (source) and "hud: duplicate copies the slide whatever rows are selected; in the sheet it copies the selected slides" (Chromium). Before the fix both failed: the label was "Duplicate selection or slide", and with two rows selected the click added rows instead of a slide. Both pass now. The old test that asserted the row branch is removed.test/gate.test.mjscounts threemoveBy(callers (drag, nudge, row paste).Verification
Full local suite on the pre-merge branch: 680 of 680 pass. After merging main (which added the Undo and Delete HUD buttons, PR #181): the full suite passes 693 of 693. The first CI run failed one Firefox test, "two windows (firefox)" in test/autosave.test.mjs (the store had not converged on both windows' edits); it touches no duplicate code and passes locally on Firefox, so the branch was re-pushed after merging main.
Fixes #80
🤖 Generated with Claude Code