From 5275f2ba383a84a61eafdba82ab8e3b20b7893db Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 5 Oct 2026 11:36:14 -0400 Subject: [PATCH] feat(web): note editing at the reader slider and book banner; Deleted rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Objective 8a (web half). Reader notes-drawer rows gain an inline editor (mirroring the bookmark-rename pattern) that PUTs the new content — the stored position rides along because the server's note PUT hard-sets the position column (a probe note proved an omitted position NULLs the anchor). Book-detail banner rows gain Edit/Delete for location notes and Edit-note/Add-note for the note ATTACHED to a highlight (full-replace highlight PUT; empty content clears the note; the highlight itself is never edited from the banner). The edit dialog is centered with the markdown caption. The book-detail 'Notes' button becomes 'Deleted' (badge = deleted-annotation count) and the modal title becomes 'Deleted annotations' — that modal only ever showed removed annotations. Verified live in Brave: drawer inline edit round-trips content and position; banner note edit, highlight-note edit, and delete (tombstone appears in the Deleted modal); rename renders with the count badge. --- templates/annotations_banner.templ | 55 +++++++++++++++- templates/annotations_banner_templ.go | 2 +- templates/book_detail.templ | 8 +-- templates/book_detail_modals.templ | 4 +- templates/book_detail_modals_templ.go | 4 +- templates/book_detail_templ.go | 10 +-- templates/reader.templ | 60 +++++++++++++----- templates/reader_templ.go | 2 +- web/src/annotations-banner.ts | 5 ++ web/src/book-detail.ts | 91 +++++++++++++++++++++++++++ web/src/reader/reader.ts | 46 ++++++++++++++ 11 files changed, 257 insertions(+), 30 deletions(-) diff --git a/templates/annotations_banner.templ b/templates/annotations_banner.templ index 756c170d..cedbc94d 100644 --- a/templates/annotations_banner.templ +++ b/templates/annotations_banner.templ @@ -78,15 +78,33 @@ templ AnnotationsBanner(book handlers.MediaDetail) { - +
Open reader here ↗ +
+ + +
@@ -96,6 +114,41 @@ templ AnnotationsBanner(book handlers.MediaDetail) { + + +

Loading…