-
Notifications
You must be signed in to change notification settings - Fork 7
Implement Bookmarks #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Bookmarks #137
Conversation
📝 WalkthroughWalkthroughAdds persistent per-file bookmarks: gutter-click toggles bookmarks; bookmark persistence saved/loaded via EditorAPI; new BookmarksPanel and BookmarkItemPanel UI; actions for open/toggle/remove-all bookmarks; theme/assets and tests added; Signals and close action updated to clear/refresh bookmarks. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant Editor
participant EditorAPI
participant Settings
participant BookmarkPanel
User->>Editor: click gutter (line)
Editor->>Editor: _on_gutter_clicked(line,gutter)\ntoggle bookmark state
Editor->>BookmarkPanel: emit gutter_clicked / request update
Editor->>Editor: emit type_timer_timeout
Note over Editor,EditorAPI: Save flow
Editor->>EditorAPI: save_file()
EditorAPI->>EditorAPI: _save_bookmarks()
EditorAPI->>Settings: write bookmarks dict
Note over Editor,EditorAPI: Load flow
Editor->>EditorAPI: load_file()
EditorAPI->>Settings: read bookmarks dict
EditorAPI->>Editor: _load_bookmarks() (mark lines)
Editor->>BookmarkPanel: emit type_timer_timeout / request update
User->>BookmarkPanel: press goto / remove
BookmarkPanel->>Editor: navigate_to_line / clear_bookmark
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ 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 |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai generate docstrings |
✅ Actions performedInitiated docstring generation; will generate only if new commits exist. |
|
Caution Docstrings generation - FAILED No docstrings were generated. |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary of Changes
Provides a simple system to add, remove, explore and use bookmarks as described in #26. Adds custom bookmark icon and color, save and load for bookmarks in
EditorAPI, and a new Bookmarks panel.Related Items
coderabbitai)Technical Details & Testing
Uses internal bookmark support for
CodeEditin Godot, with connections to core (for unsaved changes trigger) and bookmarks panel (to show and interact with bookmarks). In panel, user can see number and text for each bookmarked line and Go To and Remove options are available for each bookmark.In #26, bookmarks could have optional labels, but we checked this and it led to many complexities and functional errors, so we decided to replace it with the line content. Now, the content of the bookmarked line is displayed as its label.
Checklist
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
Style
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.