Skip to content

Bring back non-floating sidebar - #6

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Jul 2, 2026
Merged

Bring back non-floating sidebar#6
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

Apple introduced "floating sidebar" in macOS 26 and deprecated that in macOS 27, disable manually to keep the experience consistent.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to restore consistent split-view sidebar behavior on newer macOS versions by disabling the system “floating sidebar” appearance and adjusting window/sidebar styling in the main split-view UI.

Changes:

  • Adds an explicit main.swift entry point to set NSSplitViewItemSidebarDefaultsToFloatingAppearance = false before app initialization.
  • Simplifies the sidebar view hierarchy (removes the custom visual-effect wrapper) and introduces runtime window/detail-pane styling updates.
  • Adds AppKit extensions to support layer-backed background colors and appearance-resolved colors.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
WhatCopiedMac/Sources/Controllers/MainVC+UI.swift Removes the custom effect-view sidebar wrapper and adds updateSidebarStyle() to tweak window/background styling.
WhatCopiedMac/Sources/Controllers/MainVC.swift Observes main-window state changes and triggers sidebar/window style updates during layout and window-main transitions.
WhatCopiedMac/Sources/AppDesign.swift Removes the modernEffectView selection logic (no longer used by the sidebar).
WhatCopiedMac/Sources/AppDelegate.swift Removes @main usage and moves the NSMenu swizzle out of launch to the new entry point.
WhatCopiedMac/Modules/Sources/AppKitExtensions/NSView+Extension.swift Adds helpers for layer background color and descendant traversal.
WhatCopiedMac/Modules/Sources/AppKitExtensions/NSColor+Extension.swift Adds a helper intended to resolve dynamic colors for appearance (currently conflicts with AppKit API).
WhatCopiedMac/main.swift New app entry point that sets the sidebar-floating default and applies the NSMenu crash workaround before launch.
WhatCopied.xcodeproj/project.pbxproj Adds main.swift to the app target’s sources.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread WhatCopiedMac/main.swift
Comment thread WhatCopiedMac/Sources/Controllers/MainVC+UI.swift Outdated
@cyanzhong
cyanzhong merged commit 3c54f44 into main Jul 2, 2026
1 check passed
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.

2 participants