Skip to content

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

feat: add workspace apps #136

wants to merge 7 commits into from

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Apr 22, 2025

Closes #94.

Screenshot 2025-04-22 at 2 10 32 pm
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:
image

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):

image

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.

Copy link
Member Author

ethanndickson commented Apr 22, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson marked this pull request as ready for review April 22, 2025 04:27
.padding(.top, 10)
}
}
.task { await loadApps() }
Copy link
Member Author

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)
Copy link
Member Author

@ethanndickson ethanndickson Apr 22, 2025

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.

@ethanndickson
Copy link
Member Author

As discussed, I've filtered out the web apps:
image

@matifali
Copy link
Member

We should also filter out apps where url starts with http(s), i.e., internal wikies or links to internal developer portals. There is no point in adding external websites to Coder Desktop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button Auto-Population for External Apps
3 participants