Skip to content

feat: move TOC to left, add visibility toggle and focus keybinds#276

Open
harshafaik wants to merge 1 commit intoBuilditluc:mainfrom
harshafaik:feature/ui-overhaul
Open

feat: move TOC to left, add visibility toggle and focus keybinds#276
harshafaik wants to merge 1 commit intoBuilditluc:mainfrom
harshafaik:feature/ui-overhaul

Conversation

@harshafaik
Copy link
Copy Markdown

In order to accurately replicate the infobox displayed on wiki pages in the future, I've shifted the table of contents UX to the left, while adding a keybind for toggling it. With this:

Key Action
e Toggle TOC visibility (show/hide)
Tab / BackTab Switch focus between article and TOC

Tab respects TOC visibility, if it is hidden, Tab does nothing until TOC is shown again.

Introduced pending_anchor to defer the heading jump until after the render cycle completes with the correct layout width, ensuring pixel-perfect navigation and fixing a race condition wherein the TOC visibility could cause incorrect scroll position.

swappy-20260305_194204 _TOC on left, visible_ swappy-20260305_194517 _TOC hidden_

My first PR, let me know if there are corrections to be made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant