-
-
Notifications
You must be signed in to change notification settings - Fork 142
feat(mac): new configuration and installation UI 🍎 #16304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sgschantz
wants to merge
44
commits into
epic/mac-config
Choose a base branch
from
feat/mac/config-ui
base: epic/mac-config
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
92982a4
feat(mac): revert to default accent color
sgschantz 2806b0c
Merge remote-tracking branch 'origin/epic/mac-config' into feat/mac/c…
sgschantz 9441c08
Resolved merge conflict
geschantz 8e895e8
feat(mac): refactored alert modifier bound to the
geschantz c363a21
feat(mac): created the keyboard info view
geschantz 9bb1c0b
feat(mac): added remove installed package support
geschantz cf80c88
feat(mac): removed unnecessary complexity
geschantz cbcbdab
feat(mac): layout changes to the package info view
geschantz 3f0ede2
feat(mac): clicking row toggles disclosure group
geschantz f7b7e62
feat(mac): refactored the icon button view
geschantz c5ded45
feat(mac): layout changes to the package info view
geschantz 20c9966
feat(mac): extracted label button view and binding
geschantz 47aa88b
feat(mac): toggle button and code reformatting
geschantz 0cceb76
feat(mac): multi keyboard package views
geschantz a2940f3
feat(mac): disclosure groups share state variable
geschantz f0fa17f
feat(mac): fixed package info animation
geschantz 5c59da8
feat(mac): resolved changes from applying stash
geschantz 2b2fc15
feat(mac): added tabview and webview
geschantz be3e3fc
feat(mac): created new installation views in Configuration app
ejschantz 5d0e3a6
feat(mac): Added notification support to installer
ejschantz 62f72c5
feat(mac): Added input method error screen and restart view
ejschantz fd5726f
feat(mac): First draft of integrated installer
ejschantz 3d90feb
feat(mac): Added loading screen and reformated files
ejschantz 7b531fd
feat(mac): Added an initial repair view
ejschantz cfea0a4
feat(mac): Fixed minor issues with installation flow
ejschantz 47aa28b
feat(mac): Added Form view layout to a few installation pages
ejschantz 3a19387
Update mac/Config/Config/PackageRowView.swift
geschantz f01050c
Update mac/Config/Config/PackageRowView.swift
geschantz c9915dd
feat(mac): responded to review comments
geschantz 960bf45
Merge pull request #16299 from geschantz/feat/mac/config-window
sgschantz cfb1bed
feat(mac): Responding to code review
ejschantz 5d70b5a
Merge branch 'feat/mac/config-ui' into feat/mac/install-window
sgschantz aba9ecc
Merge pull request #16252 from ejschantz/feat/mac/install-window
sgschantz 477f5c0
feat(mac): make Config Window the main window
sgschantz 25d6426
Merge remote-tracking branch 'origin/epic/mac-config' into feat/mac/c…
sgschantz 6b59fd6
feat(mac): cache qrcode image and lazily load
sgschantz 00b6712
feat(mac): clean up downloaded package when install fails
sgschantz 895151d
feat(mac): refactor to allow package removal after install
sgschantz beba554
feat(mac): load help and readme if not listed in options
sgschantz 04aa433
feat(mac): show confirm restart view correctly for state
sgschantz 7ba1081
feat(mac): remove repeated loadURL call
sgschantz 234ebe5
Merge branch 'epic/mac-config' into feat/mac/config-ui
sgschantz f262ae9
feat(mac): clarify comment
sgschantz 4b6d52a
feat(mac): replaced scaled multiple images with pdfs
sgschantz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
20 changes: 0 additions & 20 deletions
20
mac/Config/Config/Assets.xcassets/AccentColor.colorset/Contents.json
This file was deleted.
Oops, something went wrong.
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
Binary file removed
BIN
-19.4 KB
mac/Config/Config/Assets.xcassets/AppIcon.appiconset/Keyman-256.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
mac/Config/Config/Assets.xcassets/accessibility-permission.imageset/Contents.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "accessibility-permission-light.pdf", | ||
| "idiom" : "universal" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "dark" | ||
| } | ||
| ], | ||
| "filename" : "accessibility-permission-dark.pdf", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Binary file added
BIN
+32.3 KB
...onfig/Assets.xcassets/accessibility-permission.imageset/accessibility-permission-dark.pdf
Binary file not shown.
Binary file added
BIN
+31.6 KB
...nfig/Assets.xcassets/accessibility-permission.imageset/accessibility-permission-light.pdf
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
mac/Config/Config/Assets.xcassets/enable-Keyman.imageset/Contents.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "enable-keyman-light.pdf", | ||
| "idiom" : "universal" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "dark" | ||
| } | ||
| ], | ||
| "filename" : "enable-keyman-dark.pdf", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Binary file added
BIN
+39.1 KB
mac/Config/Config/Assets.xcassets/enable-Keyman.imageset/enable-keyman-dark.pdf
Binary file not shown.
Binary file added
BIN
+31.4 KB
mac/Config/Config/Assets.xcassets/enable-Keyman.imageset/enable-keyman-light.pdf
Binary file not shown.
25 changes: 25 additions & 0 deletions
25
mac/Config/Config/Assets.xcassets/keyman-logo.imageset/Contents.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "keyman-logo-light.png", | ||
| "idiom" : "universal" | ||
| }, | ||
| { | ||
| "appearances" : [ | ||
| { | ||
| "appearance" : "luminosity", | ||
| "value" : "dark" | ||
| } | ||
| ], | ||
| "filename" : "keyman-logo-dark.png", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true | ||
| } | ||
| } |
Binary file added
BIN
+24.4 KB
mac/Config/Config/Assets.xcassets/keyman-logo.imageset/keyman-logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.6 KB
mac/Config/Config/Assets.xcassets/keyman-logo.imageset/keyman-logo-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
File renamed without changes.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Keyman is copyright (C) SIL Global. MIT License. | ||
| * | ||
| * Created by Gabriel Schantz on 2026-08-03 | ||
| * | ||
| * Webview used to show help for Keyman keyboards | ||
| */ | ||
| import Foundation | ||
|
|
||
| import SwiftUI | ||
| import WebKit | ||
| import KeymanSettings | ||
|
|
||
| public struct HelpView: NSViewRepresentable { | ||
| let helpFileURL: URL | ||
|
|
||
| // create the AppKit view instance | ||
| public func makeNSView(context: Context) -> WKWebView { | ||
| let webView = WKWebView() | ||
| return webView | ||
| } | ||
|
|
||
| // update the view when SwiftUI state changes | ||
| public func updateNSView(_ nsView: WKWebView, context: Context) { | ||
| let request = URLRequest(url: helpFileURL) | ||
|
|
||
| // only load the request if it's not already loading/loaded to prevent infinite loops | ||
| if nsView.url != helpFileURL { | ||
| if let helpUrl = request.url { | ||
| nsView.loadFileURL(helpUrl, allowingReadAccessTo: helpUrl.deletingLastPathComponent()) | ||
| } | ||
| } | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Keyman is copyright (C) SIL Global. MIT License. | ||
| * | ||
| * Created by Gabriel Schantz on 2026-07-03 | ||
| * | ||
| * The view used for image-only buttons | ||
| */ | ||
|
|
||
| import SwiftUI | ||
|
|
||
| public struct IconButtonView: View { | ||
| let action: () -> Void | ||
| let systemImage: String | ||
| let font: Font | ||
| let helpText: String | ||
|
|
||
| public var body: some View { | ||
|
|
||
| Button { | ||
| action() | ||
| } label: { | ||
| Image(systemName: systemImage) | ||
| .font(font) | ||
| } | ||
| .buttonStyle(.plain) | ||
| .accessibilityLabel(helpText) | ||
| .help(helpText) | ||
|
|
||
| } | ||
| } | ||
|
|
||
| // the view for buttons with a label | ||
| public struct LabelButtonView: View { | ||
| let action: () -> Void | ||
| let label: String | ||
| let systemImage: String | ||
| let font: Font | ||
|
|
||
| public var body: some View { | ||
| Button(action: action) { | ||
| Label(label, systemImage: systemImage) | ||
| .font(font) | ||
| } | ||
| .buttonStyle(.bordered) | ||
| } | ||
| } |
44 changes: 44 additions & 0 deletions
44
mac/Config/Config/InstallationViews/CompletedInstallView.swift
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| * Keyman is copyright (C) SIL Global. MIT License. | ||
| * | ||
| * Created by Eli Schantz on 2026-07-01 | ||
| * | ||
| * View used for notifying the user that installation is complete. | ||
| */ | ||
|
|
||
| import SwiftUI | ||
|
|
||
| struct CompletedInstallView: View { | ||
| @EnvironmentObject var installation: InstallationContainer | ||
| let namespace: Namespace.ID | ||
|
|
||
| var versionText: String { | ||
| if let version = installation.installationState?.keymanVersion { | ||
| return "Version: \(version)" | ||
| } else { | ||
| return "No version to display" | ||
|
sgschantz marked this conversation as resolved.
|
||
| } | ||
| } | ||
|
|
||
| var body: some View { | ||
| VStack { | ||
|
|
||
| Spacer() | ||
|
|
||
| KeymanLogo(namespace: namespace) | ||
| Text(versionText) | ||
| .foregroundStyle(.secondary) | ||
|
|
||
| Spacer() | ||
|
|
||
| GradientDivider(namespace: namespace) | ||
| .padding(.bottom, 8) | ||
| HStack { | ||
| Text("Installation complete") | ||
| .font(.title2) | ||
| .frame(maxWidth: .infinity, alignment: .leading) | ||
| NavigationButton(action: .dismiss) | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.