Skip to content

Add configurable fade in/out animations#100

Draft
WaikikiGovernment with Copilot wants to merge 5 commits into
mainfrom
copilot/add-fade-animation-options
Draft

Add configurable fade in/out animations#100
WaikikiGovernment with Copilot wants to merge 5 commits into
mainfrom
copilot/add-fade-animation-options

Conversation

Copilot AI commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Implements fade transitions for the Launchpad window to match macOS Sequoia's native Launchpad behavior. Requested as a configurable option since the abrupt show/hide felt off compared to the original.

Implementation

  • Settings: Added enableFadeAnimation: Bool to LaunchpadSettings (default: true)
  • UI: Added toggle in Features settings tab with English/Hungarian localization
  • Animation: Window opacity transitions 0→1 on show, 1→0 on hide (0.3s ease-in-out)
  • Architecture: Callback pattern (AppLauncher.onExitRequested, AppDelegate.onExitRequested) decouples animation from app lifecycle
  • Performance: When disabled, uses nil animation for instant show/hide

Key Changes

LaunchpadApp.swift

  • Added @State windowOpacity for animation control
  • Fade in on initialization and app reactivation (via NSApplication.didBecomeActiveNotification)
  • handleExitRequest() fades out before hiding (delay matches animation duration)
  • Weak self capture in notification observer to prevent retain cycle

AppLauncher.swift

  • Callback mechanism allows UI layer to animate before NSApp.hide()
  • New hideImmediately() for post-animation hiding

LaunchpadConstants.swift

  • Added fadeAnimationDuration: TimeInterval = 0.3 (synced with existing fadeAnimation)

Example Flow

// Fade out sequence
private func handleExitRequest() {
   if settingsManager.settings.enableFadeAnimation && windowOpacity > 0 {
      windowOpacity = 0.0  // SwiftUI animates over 0.3s
      DispatchQueue.main.asyncAfter(deadline: .now() + LaunchpadConstants.fadeAnimationDuration) {
         AppLauncher.hideImmediately()
      }
   } else {
      AppLauncher.hideImmediately()  // Instant for disabled state
   }
}

Testing

Added FadeAnimationSettingsTests.swift with 15 test cases covering persistence, encoding/decoding, defaults, and integration.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add options for fade in/out animations</issue_title>
<issue_description># Description :
Been using it for quiet a while as its the best replacement I've found so far but something felt off about the way the interface is opened and closed so I compared it to my Mac running Sequoia which has the OG Launchpad and noticed it has a fade in an out Animation which LaunchpadPlus seems to lack.

I'd say adding that would allow it to be alot more authentic but preferably let that be a configurable option or disabled entirely who knows if everyone wants it or not.

Plattform Infos :

Host : Macbook Pro M5
OS : MacOS TheHoe 26.1 (25B78)
LaunchpadPlus Branch : main</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 4, 2025 21:51
Co-authored-by: WaikikiGovernment <93095571+WaikikiGovernment@users.noreply.github.com>
Co-authored-by: WaikikiGovernment <93095571+WaikikiGovernment@users.noreply.github.com>
Co-authored-by: WaikikiGovernment <93095571+WaikikiGovernment@users.noreply.github.com>
Co-authored-by: WaikikiGovernment <93095571+WaikikiGovernment@users.noreply.github.com>
Copilot AI changed the title [WIP] Add options for fade in/out animations Add configurable fade in/out animations Dec 4, 2025
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.

Add options for fade in/out animations

2 participants