Skip to content

refactor(macos): rebuild the editor tab bar on AppKit to match the system tab bar - #4323

Merged
datlechin merged 4 commits into
mainfrom
refactor/editor-tab-bar-native
Nov 19, 2026
Merged

datlechin merged 4 commits into
mainfrom
refactor/editor-tab-bar-native

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Rebuilds the editor tab bar on AppKit: NSScrollView, stock buttons and labels, one NSDraggingSession, one NSMenu.
  • Geometry and motion measured off the system tab bar on macOS 27: equal share, 120pt minimum, tabs narrowing at the edges when they overflow.
  • The close button shows only under the pointer, on the selected tab too.
  • A dragged tab follows the pointer, its neighbours slide, and Escape cancels.
  • A tab can be dropped on another window of the same connection, or on empty space to open its own window at that point.
  • Opening and closing tabs animates, and stops under Reduce Motion.
  • Scrolling has momentum and elastic edges.
  • VoiceOver reads each tab as a tab button in a tab group.
  • Removes the When tabs stop fitting setting: the bar is always one row, like the system's.

Tests changed on purpose: EditorTabStripChromeTests, EditorTabRunLayoutTests, EditorTabStripLayoutTests, EditorTabMiddleClickTests, EditorTabStripWindowDragTests, EditorTabStripSurfacesTests, EditorTabStripTrackThemeTests, EditorTabContextMenuBuilderTests. EditorTabStripInteractionTests is replaced by EditorTabStripViewTests and EditorTabStripSnapshotTests.

Test plan

  • 164 tab and window unit tests pass.
  • Full Unit plan: 31,822 of 31,825 pass. AppearancePaneListTests and TeamLibraryConflictSheetTests fail the same 3 cases on main on this Mac.
  • New UI flow: testDraggingATabOutOfTheStripOpensItInItsOwnWindow. UI tests run on CI only: the installed app was running locally.

Not verified on a running app:

  • The window could not be made key here, so every screenshot shows an inactive window. Title colors in a key window, the hover close button and live dragging were not seen.
  • In an inactive window the selected title is lighter than before (brightness 197 against 146 in light). The text color is correct, and the cause is not established.
  • Dropping a tab on another window has no automated test.
  • macOS 13 to 26 were not run.
Light Dark
Before Before light Before dark
After After light After dark

Overflow:

After, 16 tabs

@datlechin
datlechin merged commit 411c5b6 into main Nov 19, 2026
46 checks passed
@datlechin
datlechin deleted the refactor/editor-tab-bar-native branch November 19, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant