Skip to content

CLI: Use consistent colors - #834

Merged
roosterfish merged 12 commits into
canonical:mainfrom
roosterfish:consistent_colors
Jun 30, 2025
Merged

CLI: Use consistent colors#834
roosterfish merged 12 commits into
canonical:mainfrom
roosterfish:consistent_colors

Conversation

@roosterfish

@roosterfish roosterfish commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Fixes #797

Overview

The reason for this PR is to be more cautious with colors in the new tui.
We are using three central colors green, yellow and red to indicate:

  • green: positive security related aspects (fingerprints, steps, passphrase)
  • yellow: warning messages
  • red: error messages

Especially user provided input should not be repeated using the warning color to not confuse the user and to really make warnings and errors stand out.
The new tui styling allows highlighting input using bold text which already is enough as it stands out from regular text.

In addition the way we output errors and warnings is now consistently performed through dedicated functions.
Furthermore we use our own asker (not anymore the one from LXD) so we can influence the error message using our own styling.

Single node MicroCloud deployment

Screenshot from 2025-06-26 18-39-37

Multi node MicroCloud deployment

Screenshot from 2025-06-26 18-42-24

Standard errors

Screenshot from 2025-06-26 18-40-27

@roosterfish
roosterfish marked this pull request as ready for review June 27, 2025 08:58
Comment thread cmd/tui/style.go Outdated
markylaing
markylaing previously approved these changes Jun 27, 2025

@markylaing markylaing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM I think this will make the setup text a lot less busy 🚀

@minaelee minaelee left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tiny nit!

Comment thread cmd/microcloud/ask.go Outdated
The MicroCloud TUI uses yellow for warnings and red for errors.
Using yellow also for input highlights is confusing.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…essages

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…Warning

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
This allows influencing the error caused on wrong inputs.
To stay consistent with the other tui errors we cannot use LXD's asker as we cannot modify the yielded error.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@roosterfish
roosterfish merged commit 825f04f into canonical:main Jun 30, 2025
27 checks passed
@roosterfish
roosterfish deleted the consistent_colors branch June 30, 2025 13:28
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.

Use consistent warning messages and colors

3 participants