Skip to content

Commit 4533a94

Browse files
committed
Squashed commit of the following:
commit 6218d89 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Thu Sep 4 10:09:23 2025 -0500 Revert Project File Changes commit 46f4e36 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Tue Sep 2 14:41:03 2025 -0500 Toolbar Opacity commit 79b49b3 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 16:45:12 2025 -0500 Correct Arrow Edge in Scheme Popover commit c2e7e70 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 16:37:39 2025 -0500 fix:lint commit 9408577 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 16:36:26 2025 -0500 Remove Unified Style (and fix the rabbit hole of bugs that caused) commit 22b5b93 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 12:38:53 2025 -0500 Adjust Task Notification View commit c7c30af Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 11:58:05 2025 -0500 Update Popover Style commit bc152a0 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 11:37:46 2025 -0500 Use new WelcomeWindow Release commit 45aa64c Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Fri Aug 29 11:32:43 2025 -0500 Finish Activity Viewer Pills commit 7e50ff9 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Thu Aug 28 16:22:32 2025 -0500 Adjust Branch Picker and Scheme Dropdown commit f39c497 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Thu Aug 28 16:22:17 2025 -0500 Fix Warning commit a4c879f Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Thu Aug 28 16:22:11 2025 -0500 Add Start/Stop Task Toolbar Group commit 9d74f8a Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Thu Aug 28 16:21:33 2025 -0500 Fix Concurrency Issues commit 1d590a9 Author: Khan Winter <35942988+thecoolwinter@users.noreply.github.com> Date: Thu Aug 28 16:20:58 2025 -0500 Update Project, Use local WelcomeWindow for now
1 parent 5e9c40b commit 4533a94

29 files changed

Lines changed: 657 additions & 291 deletions

CodeEdit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CodeEdit.xcodeproj/xcshareddata/xcschemes/CodeEdit.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1640"
3+
LastUpgradeVersion = "2600"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

CodeEdit.xcodeproj/xcshareddata/xcschemes/OpenWithCodeEdit.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1620"
3+
LastUpgradeVersion = "2600"
44
wasCreatedForAppExtension = "YES"
55
version = "2.0">
66
<BuildAction

CodeEdit/CodeEditApp.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ struct CodeEditApp: App {
3737
OpenFileOrFolderButton(dismissWindow: dismissWindow)
3838
},
3939
onDrop: { url, dismissWindow in
40-
Task { CodeEditDocumentController.shared.openDocument(at: url, onCompletion: { dismissWindow() }) }
40+
Task {
41+
await CodeEditDocumentController.shared.openDocument(at: url, onCompletion: { dismissWindow() })
42+
}
4143
}
4244
)
4345

CodeEdit/Features/ActivityViewer/ActivityViewer.swift

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,41 @@ struct ActivityViewer: View {
3232
self.taskManager = taskManager
3333
}
3434
var body: some View {
35+
Group {
36+
if #available(macOS 26, *) {
37+
content
38+
.fixedSize(horizontal: false, vertical: false)
39+
.padding(5)
40+
// TaskNotificationView doesn't have it's own padding
41+
// Also this padding seems weird. However, we want the spinning circle to be padded with the same
42+
// amount from both the top and bottom, as well as the trailing edge. So despite it not being exactly
43+
// the same it *looks* correctly padded
44+
.padding(.trailing, 5)
45+
.clipShape(Capsule())
46+
.frame(minWidth: 200)
47+
} else {
48+
content
49+
.fixedSize(horizontal: false, vertical: false)
50+
.padding(.horizontal, 5)
51+
.padding(.vertical, 1.5)
52+
.frame(height: 22)
53+
.clipped()
54+
.background {
55+
if colorScheme == .dark {
56+
RoundedRectangle(cornerRadius: 5)
57+
.opacity(0.1)
58+
} else {
59+
RoundedRectangle(cornerRadius: 5)
60+
.opacity(0.1)
61+
}
62+
}
63+
}
64+
}
65+
.accessibilityElement(children: .contain)
66+
.accessibilityLabel("Activity Viewer")
67+
}
68+
69+
@ViewBuilder private var content: some View {
3570
HStack(spacing: 0) {
3671
SchemeDropDownView(
3772
workspaceSettingsManager: workspaceSettingsManager,
@@ -45,21 +80,5 @@ struct ActivityViewer: View {
4580
TaskNotificationView(taskNotificationHandler: taskNotificationHandler)
4681
.fixedSize()
4782
}
48-
.fixedSize(horizontal: false, vertical: false)
49-
.padding(.horizontal, 5)
50-
.padding(.vertical, 1.5)
51-
.frame(height: 22)
52-
.clipped()
53-
.background {
54-
if colorScheme == .dark {
55-
RoundedRectangle(cornerRadius: 5)
56-
.opacity(0.1)
57-
} else {
58-
RoundedRectangle(cornerRadius: 5)
59-
.opacity(0.1)
60-
}
61-
}
62-
.accessibilityElement(children: .contain)
63-
.accessibilityLabel("Activity Viewer")
6483
}
6584
}

CodeEdit/Features/ActivityViewer/Notifications/TaskNotificationView.swift

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,35 @@ struct TaskNotificationView: View {
1717

1818
var body: some View {
1919
ZStack {
20-
if let notification {
21-
HStack {
22-
Text(notification.title)
23-
.font(.subheadline)
24-
.transition(
25-
.asymmetric(insertion: .move(edge: .top), removal: .move(edge: .bottom))
26-
.combined(with: .opacity)
27-
)
28-
.id("NotificationTitle" + notification.title)
29-
30-
if notification.isLoading {
31-
CECircularProgressView(
32-
progress: notification.percentage,
33-
currentTaskCount: taskNotificationHandler.notifications.count
34-
)
35-
.padding(.horizontal, -1)
36-
.frame(height: 16)
37-
} else {
38-
if taskNotificationHandler.notifications.count > 1 {
39-
Text("\(taskNotificationHandler.notifications.count)")
40-
.font(.caption)
41-
.padding(5)
42-
.background(
43-
Circle()
44-
.foregroundStyle(.gray)
45-
.opacity(0.2)
46-
)
47-
.padding(-5)
48-
}
20+
HStack {
21+
if let notification {
22+
HStack {
23+
Text(notification.title)
24+
.font(.subheadline)
25+
.transition(
26+
.asymmetric(insertion: .move(edge: .top), removal: .move(edge: .bottom))
27+
.combined(with: .opacity)
28+
)
29+
.id("NotificationTitle" + notification.title)
4930
}
31+
.transition(.opacity.combined(with: .move(edge: .trailing)))
32+
33+
loaderView(notification: notification)
34+
.transition(.opacity)
35+
.id("Loader")
36+
} else {
37+
Text("")
38+
.id("Loader")
5039
}
51-
.transition(.opacity.combined(with: .move(edge: .trailing)))
52-
.opacity(activeState == .inactive ? 0.4 : 1.0)
53-
.padding(3)
54-
.padding(-3)
55-
.padding(.trailing, 3)
56-
.popover(isPresented: $isPresented, arrowEdge: .bottom) {
57-
TaskNotificationsDetailView(taskNotificationHandler: taskNotificationHandler)
58-
}
59-
.onTapGesture {
60-
self.isPresented.toggle()
61-
}
40+
}
41+
.opacity(activeState == .inactive ? 0.4 : 1.0)
42+
.padding(3)
43+
.padding(-3)
44+
.popover(isPresented: $isPresented, arrowEdge: .bottom) {
45+
TaskNotificationsDetailView(taskNotificationHandler: taskNotificationHandler)
46+
}
47+
.onTapGesture {
48+
self.isPresented.toggle()
6249
}
6350
}
6451
.animation(.easeInOut, value: notification)
@@ -69,6 +56,33 @@ struct TaskNotificationView: View {
6956
}
7057
}
7158

59+
@ViewBuilder
60+
private func loaderView(notification: TaskNotificationModel) -> some View {
61+
if notification.isLoading {
62+
CECircularProgressView(
63+
progress: notification.percentage,
64+
currentTaskCount: taskNotificationHandler.notifications.count
65+
)
66+
.if(.tahoe) {
67+
$0.padding(.leading, 1)
68+
} else: {
69+
$0.padding(.horizontal, -1)
70+
}
71+
.frame(height: 16)
72+
} else {
73+
if taskNotificationHandler.notifications.count > 1 {
74+
Text("\(taskNotificationHandler.notifications.count)")
75+
.font(.caption)
76+
.padding(5)
77+
.background(
78+
Circle()
79+
.foregroundStyle(.gray)
80+
.opacity(0.2)
81+
)
82+
.padding(-5)
83+
}
84+
}
85+
}
7286
}
7387

7488
#Preview {

CodeEdit/Features/ActivityViewer/Tasks/DropdownMenuItemStyleModifier.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,33 @@
77

88
import SwiftUI
99

10+
extension View {
11+
@ViewBuilder
12+
func dropdownItemStyle() -> some View {
13+
self.modifier(DropdownMenuItemStyleModifier())
14+
}
15+
}
16+
1017
struct DropdownMenuItemStyleModifier: ViewModifier {
1118
@State private var isHovering = false
1219

1320
func body(content: Content) -> some View {
1421
content
22+
.padding(.vertical, 4)
23+
.padding(.horizontal, 8)
1524
.background(
1625
isHovering
1726
? AnyView(EffectView(.selection, blendingMode: .withinWindow, emphasized: true))
1827
: AnyView(Color.clear)
1928
)
2029
.foregroundColor(isHovering ? Color(NSColor.white) : .primary)
30+
.if(.tahoe) {
31+
if #available(macOS 26, *) {
32+
$0.clipShape(ContainerRelativeShape())
33+
}
34+
} else: {
35+
$0.clipShape(RoundedRectangle(cornerRadius: 5))
36+
}
2137
.onHover(perform: { hovering in
2238
self.isHovering = hovering
2339
})

CodeEdit/Features/ActivityViewer/Tasks/OptionMenuItemView.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ struct OptionMenuItemView: View {
1616
Text(label)
1717
Spacer()
1818
}
19-
.padding(.vertical, 4)
20-
.padding(.horizontal, 28)
21-
.modifier(DropdownMenuItemStyleModifier())
22-
.clipShape(RoundedRectangle(cornerRadius: 5))
19+
.padding(.horizontal, 20)
20+
.dropdownItemStyle()
2321
.onTapGesture {
2422
action()
2523
}

0 commit comments

Comments
 (0)