Repository navigation
feat: polish panel UX with scrolling, flip placement, and unified keys - #22
Merged
Merged
Conversation
- Formatter panel scrolls overflowing rows instead of dropping them, keeping every formatter reachable on long lists - Cursor-anchored floats (rename, code actions) flip above the cursor when there is not enough screen space below, clamped to the editor - Unify panel keymaps: Tab/S-Tab move, Enter/Space act, q/Esc close; formatter toggle moves from Tab to Enter/Space - Add in-buffer key-hint footer to the code actions panel Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolved conflicts: - window.lua: kept both branch cursor-placement helpers and main's border/panel helpers - formatters/ui/render.lua: adopted main's resolve_border/panel_size refactor, kept branch scrolling (dropped main's overflow truncation) - codeactions/ui/init.lua: kept branch origin_win/placement fields with main's no-arg ensure_namespace Co-Authored-By: Claude Fable 5 <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.
Summary
Three UX polish changes to the floating panels:
...and filtered out of the selectable set — formatters past the fold could not be toggled at all. The panel now keeps every row in the buffer and scrolls the viewport with the selection.window.cursor_placement()/window.cursor_float_config()helpers capture the cursor's screen cell at trigger time and choose below/above placement, clamping height to the chosen side and the column to the editor width. The code actions panel re-evaluates placement on every render, so a panel that grows after its loading state flips correctly; the rename prompt uses the same logic unless the caller overrideswindow.relative/anchor/row/col. Placement is computed from window position +winline()/wincol()becausescreenrow()is unreliable in headless Neovim.Tab/S-Tabmove,Enter/Spaceperform the primary action (apply / toggle),q/Escclose. The code actions panel gains aqbinding and an in-buffer hint footer (Enter:apply q:close).Breaking / behavior changes
Tabchanges from toggle to move selection;Enterchanges from close to toggle. Worth a changelog entry for muscle memory.codeactions/ui/init.lua) if the minimal look is preferred.Tests
tests/window_spec.luaSWanchor near the bottom of the screenmake check(stylua + full plenary suite) andmake smoke(headless LSP integration) pass🤖 Generated with Claude Code