temporalio / cli

Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal
https://docs.temporal.io/cli
MIT License
249 stars 34 forks source link

[Feature Request] Expose command line option for Day/Night UI theming for development server #643

Open SpencerC opened 3 weeks ago

SpencerC commented 3 weeks ago

Is your feature request related to a problem? Please describe.

Every time we restart the development server using start-dev, we have to click the moon/sun button in the UI to change the theme to dark mode. It would be great (and probably pretty easy) to expose this as a command line option.

Describe the solution you'd like

Perhaps something like:

temporal server start-dev --ui-theme=night

Additional context

cretz commented 3 weeks ago

The UI at https://github.com/temporalio/ui has a special environment variable for this called VITE_DARK_MODE, so you can export VITE_DARK_MODE=1 to get dark mode. Note, this has to be set before the first page view, otherwise the value is cached upon first view. We will look into documenting this variable.

Does this solve your need?

ggrebert commented 3 weeks ago

works with temporalio/ui but not the temporal cli. Same issue for TEMPORAL_UI_PUBLIC_PATH which is more blocking for me (working on a temporal extension for Quarkus)

To reproduce the issue:

docker run -it --rm --env TEMPORAL_UI_PUBLIC_PATH=/q/temporal --env VITE_DARK_MODE=1 -p 8233:8233 --entrypoint /usr/local/bin/temporal temporaliotest/auto-setup server start-dev --ip 0.0.0.0
ggrebert commented 3 weeks ago

a PR is open to solve my issue (#644), but I haven't find a way to fix this issue

SpencerC commented 1 week ago

Confirmed this is still an issue just tried setting VITE_DARK_MODE=1, and it had no effect on the CLI.

cretz commented 1 week ago

We have confirmed that the UI used in here does not expose this setting unlike if the UI is used directly. We have opened https://github.com/temporalio/ui/issues/2308 to address this.