feat: highlight + comment annotations with right-click context menu#11
Open
abdullah4tech wants to merge 2 commits into
Open
feat: highlight + comment annotations with right-click context menu#11abdullah4tech wants to merge 2 commits into
abdullah4tech wants to merge 2 commits into
Conversation
user-select:none on body lacked the -webkit- prefix WebKitGTK needs, so UI chrome (buttons, menus, window controls) was selectable and Ctrl+A would select-all the whole page instead of just the note.
Adds a per-note highlight system where the user selects text, right-clicks (or presses Ctrl+H) to assign a colour and an optional comment, and the text receives a coloured background overlay directly in the editor. - SQLite: new `highlights` table (sel_text, color, comment, off_start) - Backend: GetHighlights / AddHighlight / DeleteHighlight Wails methods - Editor: transparent-background textarea + mirror overlay div renders <mark> spans with 5 preset colours (yellow/green/blue/pink/orange); scroll-synced, word-wrap-aware, re-renders on every keystroke - Context menu: right-click on selected text shows Copy / Cut / Paste + "Highlight…" — opening the colour-picker dialog - Highlight picker: floating dialog with colour swatches + comment field; Save on Enter, dismiss on Esc or outside click - Highlights panel: right-side drawer (toolbar button) listing all highlights for the open note; click to jump & select, trash to remove - Highlights load on note open and clear on note delete - Ctrl+H shortcut retained for keyboard users
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
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
highlightstable and survive app restartsWhat changed
db.goHighlightstructhighlightstable ininitDBdbGetHighlights,dbAddHighlight,dbDeleteHighlightquery helpersapp.goGetHighlights,AddHighlight,DeleteHighlightWails-bound methodsfrontend/dist/index.html#hl-overlaymirror div renders<mark>spans with coloured backgrounds; scroll-synced and word-wrap-awareCtrl+Hkeyboard shortcut retained for power usersTest plan
Ctrl+Hwith selected text opens the same picker🤖 Generated with Claude Code