Elements dialog (F7): add Tables and Lists views - #800
Merged
Conversation
The Elements dialog (F7) View dropdown now offers Tables and Lists next to Headings, Links and Pages. Each view lists one row per Table or List marker - the same containers next/previous Table and List navigation visit - reading as the reader announces them (a table's caption, a list's first rendered item), so what you pick in the list is what you hear when you land. The flat list pane was keyed by view through per-view arguments; it now routes through a single FlatViews struct, so a future flat view is one dropdown entry plus one field. A new DocumentSession::element_list feeds the marker views and link_list is now a thin wrapper over it. Co-Authored-By: Claude Code <noreply@anthropic.com>
Formatting change only, so the nightly format check (group_imports / imports_granularity) passes. Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
Elements dialog (F7): add Tables and Lists views
Follow-up to the Pages-view work (#775). The Elements dialog's View dropdown now offers
Headings / Links / Pages / Tables / Lists. The two new views each show one row per
Table/Listmarker in the document — the same containers that Go → Next/Previous Table andNext/Previous List already jump between.
Behavior
Table navigation announces it (or, for a table with no caption, the line it sits on).
announces (List markers carry no text of their own).
the list and what you hear when you land match.
landing line, like the Links/Headings views already do — no change to
ElementsKind, theannouncement code, or
navigation.rs.What changed
paperback-core— newDocumentSession::element_list(mtype, position), returning one rowper marker of a type with the text reading navigation announces, plus the row nearest the
current position so the dialog can preselect it.
link_listis now a thin wrapper over it.New
ElementListItem/ElementListtypes and unit tests cover captions, the line-textfallback, closest-index tracking, and that
ListItemmarkers don't leak into the Lists view.paperback—TablesandListsentries in the View dropdown on both the Windows and themacOS/Linux (DataView) code paths. The two
Rc<FlatView>arguments threaded through thetoggle/double-click/OK handlers are grouped into a single
FlatViewsstruct keyed by view, soa future flat view stays a one-entry change (the pattern the Pages view set up).
Two new translatable strings:
"Tables"and"Lists"(they'll reach the translators throughthe usual auto-translate workflow).
Testing
Elements dialog and jumps land correctly.
cargo test -p paperback-core(663 tests) andcargo clippypass.machine (Windows host) — it needs a check there before relying on it.