-
Notifications
You must be signed in to change notification settings - Fork 2
feat: make workspace apps collapsible #143
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: ethan/sync-progress
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.
Pull Request Overview
This PR introduces collapsible workspace apps in the VPN menu along with minor test updates and UI refinements. Key changes include updating view inspector tests, replacing deprecated hover handlers, and adding new UI components (collapsible view, icons, and animated chevron) for a better user experience.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
Coder-Desktop/Coder-DesktopTests/AgentsTests.swift | Updated tests to use text-based view lookup instead of link-based lookup. |
Coder-Desktop/Coder-Desktop/Views/VPN/WorkspaceAppIcon.swift | Replaced onHoverWithPointingHand with the standard onHover handler. |
Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenuItem.swift | Added a helper function to compute the primary host and refactored MenuItemView for collapsible functionality. |
Coder-Desktop/Coder-Desktop/Views/VPN/Agents.swift | Updated to pass the expandedItem binding to MenuItemView for managing collapsible state. |
Coder-Desktop/Coder-Desktop/VPN/MenuState.swift | Minor spelling fix in a comment. |
Coder-Desktop/Coder-Desktop/Theme.swift | Introduced a new animation duration for collapsible transitions. |
@@ -4,6 +4,7 @@ struct Agents<VPN: VPNService>: View { | |||
@EnvironmentObject var vpn: VPN | |||
@EnvironmentObject var state: AppState | |||
@State private var viewAll = false | |||
@State private var expandedItem: VPNMenuItem.ID? |
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.
It seems odd to me having individual collapsible chevrons for each item, but only one item can be expanded at a time. I think we should just allow all items to be expanded independently
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.
This is just a pattern I've seen in the past that I liked. I'm pretty sure designers do it to stop the user from cluttering up the UI, or making the page too long, which is why I've done it here too. A user doesn't really need to be able to view multiple at once, and having to go close them all yourself to tidy it up is annoying.
Also the first workspace in the list should have the apps visible by default. Most people only use one workspace so it'll make the experience better |
a8affe1
to
aeca6df
Compare
Here's the algorithm for how and when to expand the first item, where
|
What would it take to put the favorite workspaces on top? |
We actually get the |
collapsibleapps.mov