com.apple.networkextension.packet-tunnel
From 15f1890fea076bc5d1ffbffb2b686496ec5e7f7e Mon Sep 17 00:00:00 2001
From: Ethan <39577870+ethanndickson@users.noreply.github.com>
Date: Wed, 9 Jul 2025 20:00:46 +1000
Subject: [PATCH 2/2] fix: correct remote file picker dropdown chevron
alignment (#192)
There appears to be a bug when a View created using `NSView` is inside a `DisclosureGroup` label - regardless of the size of the `NSView`, it breaks the alignment of the chevron that's included on the DisclosureGroup label by default:

In #184 we added an `NSView` to the spinner, causing this issue.
This is almost certainly a SwiftUI bug, and so we'll work around it by placing the spinner and error symbol to the right of the label by just setting a trailing padding on the text.
The end result (with spinners on):

---
.../Views/FileSync/FilePicker.swift | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Coder-Desktop/Coder-Desktop/Views/FileSync/FilePicker.swift b/Coder-Desktop/Coder-Desktop/Views/FileSync/FilePicker.swift
index 6f392961..9ec26231 100644
--- a/Coder-Desktop/Coder-Desktop/Views/FileSync/FilePicker.swift
+++ b/Coder-Desktop/Coder-Desktop/Views/FileSync/FilePicker.swift
@@ -123,12 +123,18 @@ struct FilePickerEntry: View {
} label: {
Label {
Text(entry.name)
- ZStack {
- CircularProgressView(value: nil, strokeWidth: 2, diameter: 10)
- .opacity(entry.isLoading && entry.error == nil ? 1 : 0)
- Image(systemName: "exclamationmark.triangle.fill")
- .opacity(entry.error != nil ? 1 : 0)
- }
+ // The NSView within the CircularProgressView breaks
+ // the chevron alignment within the DisclosureGroup view.
+ // So, we overlay the progressview with a manual offset
+ .padding(.trailing, 20)
+ .overlay(alignment: .trailing) {
+ ZStack {
+ CircularProgressView(value: nil, strokeWidth: 2, diameter: 10)
+ .opacity(entry.isLoading && entry.error == nil ? 1 : 0)
+ Image(systemName: "exclamationmark.triangle.fill")
+ .opacity(entry.error != nil ? 1 : 0)
+ }
+ }
} icon: {
Image(systemName: "folder")
}.help(entry.error != nil ? entry.error!.description : entry.absolute_path)
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy