Repository navigation
feat(editor): add optional vertical tab layout - #1647
Conversation
Adds an Appearance setting, Tab layout (Horizontal | Vertical). Vertical shows the editor's open tabs as a list down the left of the editor, to the right of the explorer, with full names. Horizontal stays the default. Switching, closing, renaming, pinning, the context menu, loading and transaction indicators, the connection accent color and drag-to-reorder all work in both layouts. Translated into every locale. Refs TabularisDB#1646 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge I read the incremental diff only. I did not run the tests or the app. The changes since the last review are a small Tailwind class addition in Files Reviewed (2 files)
Previous Review Summary (commit a573cc7)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit a573cc7)Status: No Issues Found | Recommendation: Merge I read the diff only. I did not run the tests or the app. Files Reviewed (22 files)
Reviewed by claude-sonnet-5.5 · Input: 3.6K · Output: 1.5K · Cached: 178.9K Review guidance: REVIEW.md from base branch |
debba
left a comment
There was a problem hiding this comment.
Thanks for this, vertical tabs come up from time to time and it's nice to have them as an option! What I liked most is that drag-to-reorder really works on both axes: tabGapOffset, the before/after check, the edge auto-scroll and the drop indicator all switch on verticalTabs, and the useCallback deps were updated with them. The default path is handled carefully too: in horizontal mode the classes match main, the action buttons sit in a display: contents wrapper, the existing Editor tab tests pass unchanged, and resolveTabLayout turns any unknown stored value into horizontal.
Approving. I'll test it in the app before merging. A few things for a follow-up:
- The "full tab names" point in the description is a bit optimistic: the vertical column is
w-56(224px), and horizontal tabs already grow tomax-w-[220px], so long names get cut at roughly the same width (thetitletooltip still has the full name). A wider or resizable column would deliver that, otherwise I'd just tweak the description. - In split view each pane renders its own
Editor, so each one gets its own 224px column. With three panes that might get tight. I'll check it, but keep it in mind. - There's no render test for vertical mode, only the resolver and the settings switch are covered. A small Editor test with
tabLayout: 'vertical'would protect the axis switch in drag and drop. - Cosmetic: in vertical mode the first action button keeps its
border-lat the column edge.
Also a heads-up: this PR and #1645 add their settings at the same spots (AppearanceTab.tsx, SettingsContext.ts, config.rs, persistence.rs and the locales), so the second one to land will need a rebase.
… border Add an Editor render test for tabLayout 'vertical': the tab column, and drag-to-reorder picking the gap from the vertical axis (the same drag lands on a different gap horizontally). In vertical mode the first action button no longer draws a left border at the column edge. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Feature Merge Risk:
|
|
Thanks for the review! Follow-ups in 2efb156:
|
|
Tested this in the app with about a dozen tabs, a few with very long names. Names truncate and the full name is in the tooltip. Dragging up and down reorders on the right side of the target, and the column scrolls at the edge. Split view gives each pane its own column, and the setting survives a server restart. Horizontal tabs look the same as before. Merging, thanks! |
…classes #1647 added Tailwind classes that the plugin guest stylesheet includes, so the build:plugin-guest check failed on main and every open PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #1646
Change
Adds an Appearance setting, Editor tabs → Tab layout: Horizontal | Vertical.
Everything the horizontal bar does works in both layouts: switching, closing (including middle-click), renaming, pinning, the context menu, loading and transaction indicators, the connection accent tint, and drag-to-reorder (the drop indicator, gap detection and edge auto-scroll now follow the active axis).
Implementation notes
Editor.tsx, the editor root getsrelativeplus left padding in vertical mode and the tab bar is positioned into that padding, rather than restructuring the page layout.display: contentscontainer in horizontal mode, so that layout is unchanged.Editor, so each pane gets its own tab column.tabLayoutsetting inSettingsContext.tsand the RustAppConfig(plus its merge list), normalised byresolveTabLayout(unknown values fall back to horizontal).Testing
Editorrender test for vertical mode (the tab column, and drag-to-reorder picking the gap from the vertical axis), unit tests forresolveTabLayout, anAppearanceTabtest for the layout switch, and the persistence round-trip test extended withtabLayout.pnpm lint,tsc -b,pnpm test(all pass), the Rust persistence test andcargo check --no-default-features.pnpm tauri dev.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit