feat(annotations): Tabbed sidebar with enhanced comment, highlight, note & bookmark UX#8
Merged
kickthemoon0817 merged 3 commits intomainfrom Mar 17, 2026
Merged
Conversation
…ote & bookmark UX ## Summary Major annotation UX overhaul before ML feature phase. Replaces monolithic annotation sidebar with a tabbed (All/Notes/Bookmarks) design and adds numerous workflow improvements across comments, highlights, sticky notes, and bookmarks. ## Key Changes ### Annotation Sidebar — Tabbed Design - Three-tab layout: All Annotations, Notes, Bookmarks - Color filter bar for highlights - Type filter + clear filters button ### Comment Workflow - Quick add/edit/delete via hover actions on rows - Dedicated comment editor popover with keyboard shortcuts - Inline tag management with quick suggestions ### Highlight UX - Fast color switch via inline color picker (click color dot) - Color filter pills in sidebar - Tag support with suggested tags (important, question, todo, etc.) ### Sticky Notes (Post-it) - Collapsible/expandable card UI with colored border - Dedicated Notes tab with new note creation - Context-aware: captures selection when creating note ### Bookmark Improvements - One-tap toggle: header icon reflects current page state - Bookmark list tab sorted by page - Editable bookmark titles, current page indicator - Quick add/remove from bottom bar ### Navigation - Click annotation row → jump to page - Page links in annotation rows are clickable ### Technical - New: Features/Reader/AnnotationSidebarView.swift (sidebar components) - Extended: Annotation model helpers (isBookmark, isNote, Paper.bookmarks, etc.) - 10 new unit tests for annotation model operations - Added CHANGELOG.md
…set filters on tab switch HIGH: BookmarksTabView.toggleBookmark() and NotesTabView.createNote()/deleteNote() now delegate to PDFReaderView callbacks that record via historyService, matching the pattern already used by PDFReaderView.toggleBookmark() and createStickyNote(). HIGH: Filter state (filterType, filterColor) is now reset when switching sidebar tabs, preventing stale invisible filters on the All tab. MEDIUM: Remove dead badgeCount(for:) function (inline dictionary already used). MEDIUM: Remove redundant .sorted() in BookmarksTabView (already sorted upstream). MEDIUM: Thread selectedText into NotesTabView so New Note pre-fills content. MEDIUM: Hoist selectedTab as @binding so createStickyNote() can switch to Notes tab.
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.
Summary
Major annotation UX overhaul before ML feature phase. Replaces monolithic annotation sidebar with a tabbed (All/Notes/Bookmarks) design and adds numerous workflow improvements across comments, highlights, sticky notes, and bookmarks.
Changes
Annotation Sidebar — Tabbed Design
Comment Workflow
Highlight UX
Sticky Notes (Post-it)
Bookmark Improvements
Navigation
Model Extensions
Annotation.isBookmark,Annotation.isNote,Annotation.annotationColorPaper.bookmarks,Paper.notes,Paper.isPageBookmarked(_:),Paper.highlightsFiles Changed (6)
CHANGELOG.md— New changelogCore/Models/Annotation.swift— Model extensions for filtering helpersFeatures/Reader/AnnotationSidebarView.swift— New — All sidebar componentsFeatures/Reader/PDFReaderView.swift— Integration, bookmark toggle, note/bookmark handlersPackage.swift— Exclude CHANGELOG.md from buildTests/PedefTests/PedefTests.swift— 10 new annotation model testsTesting
Risks
AnnotationSidebarView,AnnotationSectionHeader, andAnnotationRowwere removed from PDFReaderView.swift and replaced by the new implementations in AnnotationSidebarView.swift. If any external code referenced these by file path, it would need updating.noteContentfield for bookmark titles.Follow-up TODOs
Checklist