feat: add first-launch onboarding window and reopen handler - #43
Open
bebricoOOOOOOf wants to merge 1 commit into
Open
feat: add first-launch onboarding window and reopen handler#43bebricoOOOOOOf wants to merge 1 commit into
bebricoOOOOOOf wants to merge 1 commit into
Conversation
This change introduces a standalone onboarding window on first launch to guide users to the macOS menu bar, and handles app relaunch events: - Show a standalone Welcome window centered on screen on the first launch on a device (tracked via UserDefaults). - Display a simulated macOS menu bar with a visual pointer pointing to the status item (displaying live free disk space) so users know where ClearDisk lives. - Provide advice for users with crowded menu bars or MacBooks with a camera notch. - Provide a 'Got it! Go to Menu Bar' button that transitions the app to .accessory mode and opens the menu bar popover. - Implement applicationShouldHandleReopen in AppDelegate to toggle the popover/interface whenever the app is reopened from Finder or Spotlight. - Add Turkish translations for the onboarding strings. - Stage code signing in a clean temporary directory in build_app.sh to avoid iCloud Drive com.apple.provenance detritus errors.
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.
Motivation & Problem
ClearDisk is configured as a menu-bar-only application (
LSUIElement = true, activation policy.accessory). When users launch the app for the very first time from Finder, Launchpad, or Spotlight, no window appears and no icon is placed in the Dock.On MacBooks with a notch or systems with crowded menu bars, the status item can easily be hidden behind the camera notch or lost among other icons, leading users to believe the app crashed or failed to launch. Furthermore, subsequent launches from Finder or Spotlight do nothing when the app is already running.
Proposed Changes
First-Launch Welcome Window (
WelcomeWindow.swift):UserDefaults), the app temporarily uses.regularactivation policy and displays a centered, standalone Welcome window..accessorypolicy and reveals the status popover.Relaunch Handling (
ClearDiskApp.swift):applicationShouldHandleReopen(_:hasVisibleWindows:)inAppDelegate.Translations (
Localizable.strings):Build Script Improvement (
scripts/build_app.sh):com.apple.provenanceextended attribute errors when building inside iCloud-synced directories (e.g.~/Documents).Verification
open /Applications/ClearDisk.app: popover opens reliably.build_app.sh.