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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- **F toggles full screen from the contact sheet.** Issue #83: on the sheet F did nothing and the full-screen button was disabled, because `sheetUi()` disabled `#fs` with the navigator and `sheetKey()` swallowed every key it did not handle. Full screen changes how the deck is shown, not which slide is current, so the button stays live on the sheet and a bare F (no meta, ctrl or alt) calls `fs()` there. Presenting starts from the picked slide (the first selected thumbnail), by key or by button; presenting with the sheet open, F leaves full screen straight from the sheet. Previous and next stay disabled there. The shortcuts popover and `docs/editor.md` say so. Deck and library html rebuilt. Gate: test/hud.test.mjs (Chromium and WebKit), test/gate.test.mjs.
- **⌘C and ⌘V copy and paste the rows selected on the canvas.** Issue #79: the only clipboard was the contact sheet's, which holds slides, and the canvas keydown returned on any modifier before a clipboard branch, so ⌘C and ⌘V on a selection did nothing. ⌘C now copies the selected rows to a clipboard of their own (the sheet's slide clipboard is unchanged) and ⌘V pastes them onto the current slide: 16px down and right on the slide they came from (16px more on each paste), where they sat on any other slide, which is how a row moves between slides. The copies become the selection and ⌘Z takes the paste back. Pasted rows drop their ids and are stamped fresh where they land. A master row, an override or a slot row copies as the row you see, so a slide that hides the master still shows the copy. A connector keeps an end only on a row copied with it, pointed at the copy; a routed connector without both of its rows stays behind. While text is being edited, and in an input, the keys stay the browser's own copy and paste. decklet has no groups (test/group.test.mjs holds that), so there is no group to keep together. `docs/editor.md` and the shortcuts popover say so. The template's added comments are kept short: `library.html` sits within 200 bytes of its 752 KB budget. Deck and library html rebuilt. Gate: test/editor.test.mjs (Chromium and WebKit), test/gate.test.mjs.
- **The text toolbar fits a phone and stays off the rows around the one you edit.** A toolbar review at 82d0e8d found three defects at 375px with a coarse pointer: the role segment did not wrap, so Label and Stat sat past the screen edge; the 44px button floor stretched the 16px swatches into 16x44 ovals; and the toolbar always sat above the edited row, over the Title and Supertitle. Under 480px wide the toolbar's segments wrap. Under `(pointer: coarse)` a swatch is a 44x44 tap target around a round 20px dot. `placeTb()` places the toolbar above the row unless that covers another text row or leaves the viewport, and then places it below; the same rule stops a Body edit on the desktop from hiding a two-line Title's second line. Deck and library html rebuilt. Gate: test/touch.test.mjs. Fixes #170.
- **The duplicate button duplicates slides only.** Issue #80: with rows selected on the canvas the button duplicated those rows, offset 16px, and otherwise the slide, so 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, as before. Its tooltip and aria-label read "Duplicate slide". Rows are copied with ⌘C and ⌘V (#79), which also works across slides. There is no ⌘D: the key was retired for this button, and the contact sheet paragraph in `docs/editor.md` no longer lists it. Deck and library html rebuilt. Gate: test/hud.test.mjs, test/gate.test.mjs.

## 0.14.0
### Fork C — templates, media, entities and assets (K21–K26)
Expand Down
7 changes: 3 additions & 4 deletions deck.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
<button id="sadd">+ Slide</button>
</div>
</div>
<button id="dup" class="mi mi-copy" data-ms="900" data-tip="Duplicate selection or slide" aria-label="Duplicate selection or slide"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" class="copy-rect" data-mi="animate"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" class="copy-path" data-mi="animate"/><path d="M12 15h6"/><path d="M15 12v6"/></svg></button>
<button id="dup" class="mi mi-copy" data-ms="900" data-tip="Duplicate slide" aria-label="Duplicate slide"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" class="copy-rect" data-mi="animate"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" class="copy-path" data-mi="animate"/><path d="M12 15h6"/><path d="M15 12v6"/></svg></button>
<button id="undobtn" class="mi mi-undo-2" data-ms="500" data-tip="Undo · ⌘Z" aria-label="Undo · ⌘Z"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-mi="animate"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/></svg></button>
<button id="delbtn" class="mi mi-trash-2" data-ms="400" data-tip="Delete selection · ⌫" aria-label="Delete selection · ⌫"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><g class="lid" data-mi="animate"><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></g><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg></button>
<button id="snap" class="mi mi-grip" data-ms="600" data-tip="Guides + snap · off · G" aria-label="Guides + snap · off · G" aria-pressed="false"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><g class="dots" data-mi="animate"><circle cx="5" cy="5" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="19" cy="5" r="1"/><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="19" r="1"/><circle cx="12" cy="19" r="1"/><circle cx="19" cy="19" r="1"/></g></svg></button>
Expand Down Expand Up @@ -1614,12 +1614,11 @@
helpbtn.onclick=()=>help(!helpmenu.classList.contains('open'));
helpbtn.onmouseenter=()=>{helpT=setTimeout(()=>help(true),350)};helpbtn.onmouseleave=()=>clearTimeout(helpT);
document.addEventListener('mousedown',e=>{if(!e.target.closest('#addwrap'))menu(false);if(!e.target.closest('#helpwrap'))help(false);if(!e.target.closest('#spellmenu,#spellwrap'))spellClose()});
// duplicate: selected rows (offset 16px, the copies become the selection) · else the slide, after itself · in the sheet, the selected slides
// duplicate: slides only (rows copy with ⌘C ⌘V): the current slide, after itself · in the sheet, the selected slides
$('dup').onclick=()=>{commitEdit();menu(false);
if(!sheet.hidden){snap();const src=[...gsel].sort((a,b)=>a-b);if(!src.length)return;const at=src[src.length-1]+1;const cp=src.map(n=>{const c=dup(deck.slides[n]);delete c.id;return c});deck.slides.splice(at,0,...cp);gsel=new Set(cp.map((_,x)=>at+x));ganchor=i=at;save();sheetRender();return}
snap();const s=slide();
if(sel.size){const ns=[...sel].map(k=>typeof k==='number'?k:fork(k.slice(2)));const cp=ns.map(n=>{const o=s.els[n],c=dup(o);delete c.id;moveBy(c,o,16,16);return c});const at=s.els.length;s.els.push(...cp);sel.clear();cp.forEach((_,x)=>sel.add(at+x));save();render();return}
const c=dup(s);delete c.id;deck.slides.splice(i+1,0,c);i=i+1;save();render()};
const c=dup(s);delete c.id;deck.slides.splice(i+1,0,c);i=i+1;sel.clear();save();render()};
// undo · delete as buttons (#167): a phone has no ⌘Z or ⌫, so each button runs what its key runs in the same place: the browser's
// own text undo / delete while a row is being edited (mousedown keeps its focus, as the toolbar does), sheetKey() in the sheet,
// undo() / delSel() on the canvas. hudEd() disables each exactly when its key would do nothing; never in the present-mode pill.
Expand Down
Loading
Loading