Skip to content

feat(deck): header menu with rename and delete - #35

Merged
damarals merged 2 commits into
mainfrom
feat/31-deck-menu-rename-delete
May 10, 2026
Merged

damarals merged 2 commits into
mainfrom
feat/31-deck-menu-rename-delete

Conversation

@damarals

Copy link
Copy Markdown
Owner

Closes #31.

Summary

  • Adds a new deckLibrary.updateName(id, name) method (mirrors the existing read-modify-write pattern used by updateYearOverride, gated by the per-key write lock).
  • Adds an Ionicons ellipsis-vertical button to the unified deck page's headerRight, after the existing Export PDF button.
  • Tapping the button opens a small drop-down menu with two actions: Rename deck and Delete deck.
  • Rename opens a centered modal with a TextInput pre-filled with the current name, trims before commit, refuses empty input, and on success updates the in-screen state.deck so the header title re-renders without a full reload.
  • Delete replicates the library long-press flow exactly (Alert.alert with destructive style, same copy), then deckLibrary.delete(id) and router.replace('/').

Test plan

  • npm run typecheck — clean
  • npm run lint — clean
  • npm test — 145 pass (143 baseline + 2 new DeckLibrary.updateName tests)
  • Manual: open a deck, tap the new menu, rename — header title and subtitle update without a reload
  • Manual: open a deck, tap the menu, delete — confirmation matches library long-press, then returns to /
  • Manual: rename to whitespace only — Save remains disabled

@damarals
damarals merged commit e1a1a73 into main May 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Header ⋮ menu on deck page: Rename and Delete actions

1 participant