Skip to content
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

Impl: icons with support for light&dark themes #32

Merged
merged 7 commits into from
Mar 13, 2025

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Mar 11, 2025

  • LAF support in Toolbox is quite primitive, it turns out icon support for light and dark themes is enabled by a masked flag on the icons.
  • the mask flag controls whether the svg colors are inverted in light&dark themes.

Among other things we also fixed and issue with the Start button which remained active when a workspace was stopped and outdated. In order to be more consistent with the web client we renamed the button to Update and start to reflect that it also starts the workspace.

Running and outdated workspaces also received a new action button: Update and restart.

fioan89 added 3 commits March 11, 2025 22:46
- Start button is active even though it doesn't do anything when clicked when the workspace template has updates.
- resolves #31
- to `Update and start` to reflect that the it also starts the workspace
- more consistent with the web client
- LAF support in Toolbox is quite primitive, it turns out icon support
  for light and dark themes is enabled by a masked flag on the icons
- the mask flag controls whether the svg colors are inverted in light&dark themes.
@fioan89 fioan89 requested review from matifali and bcpeinhardt March 11, 2025 21:50
@@ -78,7 +78,7 @@ class CoderRemoteEnvironment(
workspace = workspace.copy(latestBuild = build)
update(workspace, agent)
},
Action(context.i18n.ptrl("Update"), enabled = { workspace.outdated }) {
Action(context.i18n.ptrl("Update and start"), enabled = { workspace.outdated }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use "Update and restart" on the web dashboard if the workspace is already in a Running state.

image

And "Update and start" if the workspace is Stopped

image

So, we need to handle both cases separately.

Also, instead of disabling, can we just hide the unavailable actions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I think we can do both though I'm not sure how do I get to have a running workspace but outdated so that I can test and play with it.

In the meantime let me write two issues to capture the requests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: unavailable actions are now hidden:
Screenshot 2025-03-12 at 22 12 53
Screenshot 2025-03-12 at 22 13 56

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how do I get to have a running workspace but outdated so that I can test and play with it.

I can help provide one. If you are an admin, you can switch your workspace to a previous template version, and that makes it "Update and restart"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an admin, that would indeed simplify my testing.

fioan89 added 3 commits March 12, 2025 22:10
- instead of disabling the env actions when they are not available we should hide them instead.
- resolves #31
- when workspace is running and is outdated
- resolves #33
@fioan89 fioan89 requested a review from matifali March 12, 2025 21:59
@fioan89 fioan89 merged commit 2b18fe4 into main Mar 13, 2025
5 checks passed
@fioan89 fioan89 deleted the impl-icons-with-support-for-themes branch March 13, 2025 08:43
@matifali matifali linked an issue Mar 14, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants