Repository navigation
feat(notes): badge Save with the note count on the selected verses - #303
Draft
Dustin-Kelley wants to merge 1 commit into
Draft
Dustin-Kelley wants to merge 1 commit into
Dustin-Kelley wants to merge 1 commit into
Conversation
The verse action sheet's Save tile carries a round badge with the number of saved notes on the selection. A note across several selected verses counts once, deleted notes drop out at once, and counts past 99 read 99+. Save's accessibility label speaks the count; the badge stays silent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H78afR7NqjJQVotevDP43N
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.
Stacked on #301 (
dk/note-edit-delete). Merge that first; this PR's diff is only the badge.What
When you tap a verse, the action sheet's Save tile now shows a small round badge on its bookmark icon with the number of notes already saved on that selection.
Spec
read_notes, there are no notes loaded, so no badge.99+. A circle at one digit, widening to a pill. It hangs off the icon's top-trailing corner, so the tile does not change size.How
lib/note-passages.ts: new pure helpercountNotesOnVerses(notes, scope, verses, excludeIds).BibleReadercounts the current selection against the chapter notes it already loads. No new fetch.BibleVerseActionSheetgets an optionalsaveNoteCountprop and renders the badge.Open questions
noteIndicator), which links the badge to the markers in the text but has weaker contrast for white numerals (about 3:1).Testing
countNotesOnVerseswith one verse, overlapping selections (counted once), excluded IDs, other version or chapter, and an empty selection.99+; label text; badge hidden from screen readers; only Save is badged.3; a note outside the selection shows no badge.pnpm lint,pnpm typecheck, andpnpm testpass (core 882, ui 1465).Generated by Claude Code