-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add workspace apps #136
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
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
.padding(.top, 10) | ||
} | ||
} | ||
.task { await loadApps() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.task
on a view ensures for each instance of the view, only one copy of the task is running at any given time, and if the view re-renders (such as a workspace going offline), the existing task will be cancelled, and a new one created, which is exactly what we want.
@@ -66,6 +68,9 @@ class AppDelegate: NSObject, NSApplicationDelegate { | |||
} | |||
|
|||
func applicationDidFinishLaunching(_: Notification) { | |||
// Init SVG loader | |||
SDImageCodersManager.shared.addCoder(SDImageSVGCoder.shared) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SwiftUI has a great AsyncImage
View, but it doesn't support svgs. FWICT there's not even a public macOS API for rendering them.
I also found this https://gist.github.com/erezhod/6e8e6af3c940d88a706a9d936c8838e6, but it doesn't have a license attached, and I didn't feel like reaching out to the two separate authors to ask.
We should also filter out apps where |
Closes #94.
workspaceappsdemo.mov
The cursor does not change to a pointing hand as it should when screen-recording, and the display name of the app is also shown on hover:

As per the linked issue, this only shows the first five apps. If there's less than 5 apps, they won't be centered (I think this looks a bit better):
Later designs will likely include a Workspace window where all the apps can be viewed, and potentially reordered to control what is shown on the tray.
EDIT: Web apps have been filtered out of the above examples, as we don't currently have a way to determine whether they will work properly via Coder Connect.