Skip to content

Commit b44aefe

Browse files
committed
Merge branch 'main' into feat/lsp-semantic-highlighter
2 parents 2606ce6 + f52062e commit b44aefe

File tree

107 files changed

+1987
-5281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1987
-5281
lines changed

.github/scripts/test_app.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ elif [ $1 = "arm" ]; then
88
ARCH="arm64"
99
fi
1010

11+
echo "Building with Xcode: $(xcodebuild -version)"
1112
echo "Building with arch: ${ARCH}"
1213
echo "SwiftLint Version: $(swiftlint --version)"
1314

CodeEdit.xcodeproj/project.pbxproj

Lines changed: 147 additions & 4342 deletions
Large diffs are not rendered by default.

CodeEdit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

Lines changed: 0 additions & 8 deletions
This file was deleted.

CodeEdit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

Lines changed: 0 additions & 8 deletions
This file was deleted.

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 = "1540"
3+
LastUpgradeVersion = "1620"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

CodeEdit/Features/About/Views/BlurButtonStyle.swift

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ import SwiftUI
99

1010
extension ButtonStyle where Self == BlurButtonStyle {
1111
static var blur: BlurButtonStyle { BlurButtonStyle() }
12+
static var secondaryBlur: BlurButtonStyle { BlurButtonStyle(isSecondary: true) }
1213
}
1314

1415
struct BlurButtonStyle: ButtonStyle {
16+
var isSecondary: Bool = false
17+
1518
@Environment(\.controlSize)
1619
var controlSize
1720

21+
@Environment(\.colorScheme)
22+
var colorScheme
23+
1824
var height: CGFloat {
1925
switch controlSize {
2026
case .large:
@@ -24,32 +30,40 @@ struct BlurButtonStyle: ButtonStyle {
2430
}
2531
}
2632

27-
@Environment(\.colorScheme)
28-
var colorScheme
29-
3033
func makeBody(configuration: Configuration) -> some View {
3134
configuration.label
35+
.padding(.horizontal, 8)
3236
.frame(height: height)
33-
.buttonStyle(.bordered)
3437
.background {
3538
switch colorScheme {
3639
case .dark:
37-
Color
38-
.gray
39-
.opacity(0.001)
40-
.overlay(.regularMaterial.blendMode(.plusLighter))
41-
.overlay(Color.gray.opacity(0.30))
42-
.overlay(Color.white.opacity(configuration.isPressed ? 0.20 : 0.00))
40+
ZStack {
41+
Color.gray.opacity(0.001)
42+
if isSecondary {
43+
Rectangle()
44+
.fill(.regularMaterial)
45+
} else {
46+
Rectangle()
47+
.fill(.regularMaterial)
48+
.blendMode(.plusLighter)
49+
}
50+
Color.gray.opacity(isSecondary ? 0.10 : 0.30)
51+
Color.white.opacity(configuration.isPressed ? 0.10 : 0.00)
52+
}
4353
case .light:
44-
Color
45-
.gray
46-
.opacity(0.001)
47-
.overlay(.regularMaterial.blendMode(.darken))
48-
.overlay(Color.gray.opacity(0.15).blendMode(.plusDarker))
54+
ZStack {
55+
Color.gray.opacity(0.001)
56+
Rectangle()
57+
.fill(.regularMaterial)
58+
.blendMode(.darken)
59+
Color.gray.opacity(isSecondary ? 0.05 : 0.15)
60+
.blendMode(.plusDarker)
61+
Color.gray.opacity(configuration.isPressed ? 0.10 : 0.00)
62+
}
4963
@unknown default:
5064
Color.black
5165
}
5266
}
53-
.clipShape(RoundedRectangle(cornerRadius: 6))
67+
.clipShape(RoundedRectangle(cornerRadius: controlSize == .large ? 6 : 5))
5468
}
5569
}

CodeEdit/Features/ActivityViewer/Notifications/TaskNotificationHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import Combine
7676
/// "id": "uniqueTaskID",
7777
/// "action": "update",
7878
/// "title": "Updated Task Title",
79-
/// "message": "Updated Task Message"
79+
/// "message": "Updated Task Message",
8080
/// "percentage": 0.5,
8181
/// "isLoading": true
8282
/// ]

CodeEdit/Features/CEWorkspace/Models/CEWorkspaceFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ final class CEWorkspaceFile: Codable, Comparable, Hashable, Identifiable, Editor
258258
!newName.isEmpty &&
259259
newName.isValidFilename &&
260260
!FileManager.default.fileExists(
261-
atPath: self.url.deletingLastPathComponent().appendingPathComponent(newName).path
261+
atPath: self.url.deletingLastPathComponent().appending(path: newName).path
262262
) else {
263263
return false
264264
}

CodeEdit/Features/CEWorkspace/Models/CEWorkspaceFileManager+FileManagement.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ extension CEWorkspaceFileManager {
1818
func addFolder(folderName: String, toFile file: CEWorkspaceFile) throws -> CEWorkspaceFile {
1919
// Check if folder, if it is create folder under self, else create on same level.
2020
var folderUrl = (
21-
file.isFolder ? file.url.appendingPathComponent(folderName)
22-
: file.url.deletingLastPathComponent().appendingPathComponent(folderName)
21+
file.isFolder ? file.url.appending(path: folderName)
22+
: file.url.deletingLastPathComponent().appending(path: folderName)
2323
)
2424

2525
// If a file/folder with the same name exists, add a number to the end.
2626
var fileNumber = 0
2727
while fileManager.fileExists(atPath: folderUrl.path) {
2828
fileNumber += 1
29-
folderUrl = folderUrl.deletingLastPathComponent().appendingPathComponent("\(folderName)\(fileNumber)")
29+
folderUrl = folderUrl.deletingLastPathComponent().appending(path: "\(folderName)\(fileNumber)")
3030
}
3131

3232
// Create the folder
@@ -79,13 +79,13 @@ extension CEWorkspaceFileManager {
7979
}
8080
}
8181

82-
var fileUrl = file.nearestFolder.appendingPathComponent("\(fileName)\(fileExtension)")
82+
var fileUrl = file.nearestFolder.appending(path: "\(fileName)\(fileExtension)")
8383
// If a file/folder with the same name exists, add a number to the end.
8484
var fileNumber = 0
8585
while fileManager.fileExists(atPath: fileUrl.path) {
8686
fileNumber += 1
8787
fileUrl = fileUrl.deletingLastPathComponent()
88-
.appendingPathComponent("\(fileName)\(fileNumber)\(fileExtension)")
88+
.appending(path: "\(fileName)\(fileNumber)\(fileExtension)")
8989
}
9090

9191
guard fileUrl.fileName.isValidFilename else {
@@ -227,7 +227,7 @@ extension CEWorkspaceFileManager {
227227
let fileExtension = fileUrl.pathExtension.isEmpty ? "" : ".\(fileUrl.pathExtension)"
228228
let fileName = fileExtension.isEmpty ? previousName :
229229
previousName.replacingOccurrences(of: fileExtension, with: "")
230-
fileUrl = fileUrl.deletingLastPathComponent().appendingPathComponent("\(fileName) copy\(fileExtension)")
230+
fileUrl = fileUrl.deletingLastPathComponent().appending(path: "\(fileName) copy\(fileExtension)")
231231
}
232232

233233
if fileManager.fileExists(atPath: file.url.path) {

CodeEdit/Features/CEWorkspace/Models/CEWorkspaceFileManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ final class CEWorkspaceFileManager {
198198
/// - Parameter file: The parent element.
199199
/// - Returns: A child element with an associated parent.
200200
func createChild(_ url: URL, forParent file: CEWorkspaceFile) -> CEWorkspaceFile {
201-
let relativeURL = URL(filePath: file.id).appendingPathComponent(url.lastPathComponent)
201+
let relativeURL = URL(filePath: file.id).appending(path: url.lastPathComponent)
202202
let childId = relativeURL.relativePath
203203
let newFileItem = CEWorkspaceFile(id: childId, url: relativeURL)
204204
newFileItem.parent = file

0 commit comments

Comments
 (0)