Add features on comments view and navigation between PDFs with left/right arrow keys.#220
Open
nathan-ed wants to merge 1 commit intoClementGre:masterfrom
Conversation
## Autocomplete Dropdown for Text Comments - Display matching remarks from favorites/lasts/onFile sections as user types - Navigate dropdown with UP/DOWN arrow keys - Insert selected remark with ENTER key or mouse click - ESC key removes focus from text area to enable app-level navigation - Preserves full text formatting (font, size, color, bold, italic) - Maintains existing left panel highlighting behavior Technical implementation: - Custom ListView cell factory with Label graphics for proper rendering - Dual event filters (KEY_PRESSED and KEY_TYPED) to handle Enter key - Dynamic text color based on selection state (white when selected, black otherwise) - Popup with autoHide behavior positioned below text area - List height: 250px preferred, 400px max for full visibility ## LEFT/RIGHT Arrow Navigation Between PDFs - LEFT arrow: Navigate to previous PDF in list - RIGHT arrow: Navigate to next PDF in list - Preserves page number across PDFs (scrolls to top of same page in next PDF) - Uses lazy keyboard shortcuts (lower priority, safe UI elements only) Technical implementation: - Added forceScrollToPage field to MainScreen for page targeting - Pass resetScrollValue=true to openFile() to prevent Edition scroll restoration - 500ms delay ensures layout operations (showPages, loadEdition, updatePaneDimensions) complete - Uses scrollToPage() method for reliable scroll positioning Known limitation: Page preservation only works reliably when at the top of a page. When scrolled within a page, navigation may jump to the next page due to viewport detection behavior of getFirstTopVisiblePage(). Files modified: - TextTab.java: Autocomplete dropdown functionality - KeyboardShortcuts.java: LEFT/RIGHT arrow handlers for PDF navigation - FileTab.java: loadPreviousFilePreservePage() and loadNextFilePreservePage() - MainScreen.java: Page targeting system with forceScrollToPage
Owner
|
Thank you for contributing to PDF4Teachers. Here is a review of your MR :
|
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.
Disclaimer
Everything was implemented using Claude Code Web and verified by the user.
Summary
Added autocomplete dropdown and insert comment when hitting ENTER to the T view (text comments) and PDF navigation improvements with left/right arrows.
Autocomplete Dropdown for Text Comments
Technical implementation:
LEFT/RIGHT Arrow Navigation Between PDFs
Technical implementation:
Known limitation: Page preservation only works reliably when at the top of a page. When scrolled within a page, navigation may jump to the next page due to viewport detection behavior of getFirstTopVisiblePage().
Files modified: