Remove the FILE-menu Save/Load Local Storage dialogs - #439
Merged
Conversation
With Recents autosaving everything (#435), rows renaming inline and deleting with Restore (#434), the dialogs' remaining jobs get direct homes and the dialogs go: - "Save under a different name" becomes a per-row Duplicate action: copies an entry under a fresh ID as "name (2)" with fresh timestamps (so it appears on top), sharing the original's cached media — and delete is now refcounted so shared media survives until the last referencing entry goes. - The one remaining never-saved document (the intro demo — it fires no hyperaudioInit) is covered by auto-create on first edit: editing a document with no active entry saves it as a new one, EXCEPT while a Restore offer is pending — recreating a just-deleted doc on the next keystroke would fight the delete; dismissing the offer makes it an ordinary unsaved doc again, so edits then re-enter Recents. The FILE menu loses its Local Storage section (continuing #428's shortening), index.html loses both modals, and storage.js loses the save-dialog prefill plumbing.
…ions off-screen The daisyUI menu wraps with flex-shrink:0 items, so a long name sized the row to its content — the rename/duplicate/delete icons ended up past the card edge. max-width:100% on the row lets the name's existing ellipsis absorb the difference, Claude-app style.
…ds carry created=now, so they outrank the seeded updated:9999 and the first row was a short name
Three inline icons reserved ~90px of every row even when invisible (they fade, not collapse), truncating names early — and read as a toolbar rather than quick actions. A single kebab opens a shared menu with Rename / Duplicate / Delete; delete keeps its two-step arm inside the menu, and closing the menu by any route disarms it. The menu is fixed-position and anchored to the kebab's rect rather than a dropdown inside the list: the Recents list scrolls, so an absolutely-positioned dropdown would clip at the card edge for rows near the bottom. It flips upward near the viewport bottom and closes on outside click, Escape, any scroll (the anchor moves), or a list re-render. The actions span also sheds daisyUI's menu-item treatment (every direct child of a menu li gets item padding + hover fill), which was painting a pill around the kebab's own hover — one affordance now.
Member
Author
|
Design revision after manual review: the three per-row icons (rename/duplicate/delete) are now a single kebab (⋯) opening a shared menu — three icons reserved ~90px of every row even when faded out, truncating names early, and read as a toolbar. The menu is fixed-position (anchored to the kebab) so it never clips against the Recents scroll container, flips upward near the viewport bottom, and closes on outside click / Escape / scroll / re-render. Two-step delete lives inside the menu. Also fixed en route: rows now clamp to the list width so long names ellipsis instead of pushing actions off-screen, and the actions span sheds daisyUI's menu-item hover treatment (it was painting a pill around the kebab's own hover). |
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.
Closes #436. Builds on #438.
Summary
With Recents autosaving everything (#435) and rows offering rename/delete + Restore (#434), the save/load dialogs had two remaining jobs — both now have direct homes, so the dialogs are removed outright:
name (2)with fresh timestamps (appears on top), sharing the original's cached media. Media deletion is now refcounted — a shared blob survives until the last referencing entry is deleted.hyperaudioInit): editing a document with no active entry saves it as a new one. Exception: while a Restore offer is pending, auto-create is suppressed — silently recreating a just-deleted document would fight the delete; dismissing the offer makes it an ordinary unsaved doc, so edits then re-enter Recents.The FILE menu loses its "Local Storage" section (continuing #428's shortening), index.html loses both modals, and the save-dialog prefill plumbing goes from storage.js.
Testing