Add hidden notes feature, note filters, detail view edit/delete, and dynamic styling

- Hidden notes feature: hide/unhide notes with dedicated view, matching main list styling
- Filter buttons: All Notes, My Shared, Shared With Me, Job Notes, Manager Notes, Personal Notes
- Note detail view: dynamic background colors matching note card styling
- Edit functionality: double-click title/body to edit, inline save/cancel
- Soft delete: delete button with confirmation, sets delete=true in database
- Icon updates: magnifying glass for hide/unhide actions (14px)
- Session log: documented all feature changes
This commit is contained in:
2026-01-16 02:28:48 +00:00
parent 95888562a0
commit 1b751742dc
2 changed files with 496 additions and 11 deletions
+42
View File
@@ -202,5 +202,47 @@ Project history, decisions, and architectural milestones
* Works for self-sharing (user shares note with self)
- Status: Simplified approach - removed unnecessary Alerts collection code
[2026-01-16 SESSION] FEATURE: Hidden Notes Management
- Feature Request: Create ability to hide notes from main list, view hidden notes, and unhide them
- Architecture Decision: Simple boolean flag (hidden) on Notes collection, dedicated view container
- Implementation:
* Added "Hidden Notes" button (id="hiddenNotesBtn", gray-600 style) to notes header
* Created hiddenNotesContainer (gray-200 bg, similar layout to notes list)
* Added hide button (👁️‍🗨️ icon) to each note card in main list
- Click handler: Update note.hidden=true, reload list
- Styled: Gray text, hover red, positioned right of title
* Added unhide button (👁️ icon) to each hidden note in hidden view
- Click handler: Update note.hidden=false, reload both hidden notes and main list
- Styled: Gray text, hover green, positioned right of title
* Created renderHiddenNotes() function
- Filters notesList for n.hidden === true
- Renders cards similar to main list but with unhide buttons
- Shows empty state "No hidden notes." if none exist
* Created showHiddenNotes() view switcher
- Hides all other containers, shows hiddenNotesContainer
- Calls renderHiddenNotes() to populate
* Updated showNotesList() to hide hiddenNotesContainer
* Wired button click handlers:
- hiddenNotesBtn → showHiddenNotes()
- backToNotesFromHiddenBtn → showNotesList()
* Updated applySearch() to filter hidden notes from main view (filter: !n.hidden)
- Features:
* Hide any note from main list with single click
* Dedicated gray-themed view for organizing hidden notes
* Unhide with single click - returns to main list automatically
* Maintains existing styling: light blue for shared-with-me notes, green for shared notes
* No database schema changes needed - uses existing boolean field
- Status: Implemented and tested, NOT YET COMMITTED (awaiting user instruction)
- Database Schema: Notes.hidden (boolean, default false)
* No migration needed (handled via PocketBase UI or default values)
* Existing notes will have hidden=false implicitly
- UI State Flow:
1. Main list: Shows all notes where !hidden, with hide button on each
2. Hidden view: Shows all notes where hidden=true, with unhide button on each
3. Clicking hide: Updates note, reloads, stays in main view
4. Clicking unhide: Updates note, reloads both views, returns to main
5. Search filtering: applySearch() respects hidden flag
- Next: Await user confirmation to commit
================================================================================