feat(navigation): add container navigation shortcuts (comma / shift+comma)#528
Closed
LeonarddeR wants to merge 2 commits into
Closed
feat(navigation): add container navigation shortcuts (comma / shift+comma)#528LeonarddeR wants to merge 2 commits into
LeonarddeR wants to merge 2 commits into
Conversation
Add NVDA-style browse-mode container navigation to the reader: - comma jumps to the start of the line after the current list/table - shift+comma jumps to the start of the current list/table Acts on the innermost container enclosing the caret and announces "Not in a container." when the caret is outside any container. To compute container boundaries uniformly, list markers now carry a display-unit length (recorded at the ul/ol close in the html and xml converters), mirroring how tables already store their length. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the comma / shift+comma container shortcuts to the navigation hotkey list and a changelog entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
|
You've got your paperback fork configured in a really broken way so I can't push even minor formatting tweaks to your branches. As such I just squash-merged this onto master manually, fixing your AI adding a bogus changelog entry. |
Contributor
Author
|
@trypsynth I'm sorry, it looks like filing pull requests from an organization fork behaves differently compared to a personal fork. I should probably fix that and/or file future prs from my personal one. |
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
Adds NVDA-style browse-mode container navigation to the reader:
,— jump to the start of the line after the current container (list or table)Shift+,— jump to the start of the current containerThe shortcuts act on the innermost container enclosing the caret. When the caret is not inside any container, nothing moves and "Not in a container." is announced. New Go ▸ Containers menu entries expose the same commands, and the hotkeys are documented in
doc/readme.md.Implementation
To compute container boundaries uniformly,
Listmarkers now carry a display-unitlength, recorded at the</ul>/</ol>close in both the HTML and XML converters — mirroring howTablemarkers already store their length. This removes any need to guess a list's extent at navigation time.is_container_marker/ContainerSpan/DocumentHandle::enclosing_container(innermost, start-inclusive, end-exclusive);reader_container_navigate+Session::navigate_container.to_endnormalises the list-vs-table length difference by landing on the start of the line following the container.CONTAINER_START/CONTAINER_ENDmenu ids,containers_entries+&Containerssubmenu,handle_container_navigation, command dispatch, and the Linux single-key map.Notes
Shift+,keycode handling under GTK should be verified on-device (the Linux key path isn't compiled on the Windows build); Windows uses the native menu accelerator.render_tables_inlineshifts positions but not stored list lengths. Rare; noted for follow-up.