-
Notifications
You must be signed in to change notification settings - Fork 0
Block zoom / focus mode with breadcrumb #5
Copy link
Copy link
Open
Labels
area: navigationPage/block navigation and traversalPage/block navigation and traversalarea: renderingUI rendering, markdown, syntax highlightingUI rendering, markdown, syntax highlightingenhancementNew feature or requestNew feature or requestpriority: highCore feature, high user impactCore feature, high user impactroam parityFeature that exists in Roam web, ported to TUIFeature that exists in Roam web, ported to TUI
Metadata
Metadata
Assignees
Labels
area: navigationPage/block navigation and traversalPage/block navigation and traversalarea: renderingUI rendering, markdown, syntax highlightingUI rendering, markdown, syntax highlightingenhancementNew feature or requestNew feature or requestpriority: highCore feature, high user impactCore feature, high user impactroam parityFeature that exists in Roam web, ported to TUIFeature that exists in Roam web, ported to TUI
Summary
Implement "zoom in" on a block to see only that block and its children, hiding everything else. This is one of Roam's most used navigation features for working with deep hierarchies.
Roam web behavior: Clicking a block's bullet zooms into it. The page shows only that block's subtree with a breadcrumb trail at the top. Click any breadcrumb segment to zoom out to that level.
TUI adaptation: Use a dedicated keybinding (e.g.,
zin normal mode for vim) to zoom into the selected block. Breadcrumb displayed in the header area. A "zoom out" / "back" key (e.g.,BackspaceorZ) returns to parent level. This replaces mouse-click-on-bullet interaction.Implementation hints
State
src/app.rs:70-91— add zoom context toAppState:zoom_pathis non-empty, rendering should filter to only show the zoomed block's childrenzoom_path= normal full viewBlock resolution
src/app.rs:158—resolve_block_at_index()maps flat index to block infoui/main_area.rsshould start from the zoomed block instead of rootsrc/ui/main_area.rs:277-295— theflatten_blocks()function needs a "root block" parameterBreadcrumb rendering
src/ui/header.rs— extend header to show breadcrumb when zoomed:Graph: my-graph > Daily Note > Parent Block > Current BlockNavigation
zoom_path.push(current_block), re-renders from that subtreezoom_path.pop(), returns to parent viewzoom_pathentirelyKeybindings
src/keys/preset.rs— add new actions:ZoomIn,ZoomOutz(zoom in),ZorBackspace(zoom out)Ctrl+]/Ctrl+[Enter(zoom in),Backspace(zoom out)Acceptance criteria