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

Improve CLI Help Menu readability via colors and grouping of commands #1003

Closed
nickchomey opened this issue Jan 12, 2024 · 12 comments · Fixed by #1007
Closed

Improve CLI Help Menu readability via colors and grouping of commands #1003

nickchomey opened this issue Jan 12, 2024 · 12 comments · Fixed by #1007
Labels
A-cli Area: `rustic` command line interface A-ui-ux Area: Related to user interfaces and user experience

Comments

@nickchomey
Copy link

I haven't used Rustic since v4.4 and I just updated to the most recent version. At some point, it seems that the cli menus changed format.

It used to look like this
image

Now it looks like this:

image

Is there any way to bring back the colours? I find them to be much easier to visually parse

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Jan 12, 2024
@aawsome
Copy link
Member

aawsome commented Jan 13, 2024

We changed clap to v4 which should bring improvements in build time and binary size - besides the fact that v3 will stop getting fixes and improvments.

I don't know if there are possibilities to customize color behavior in clap, but I actually don't want to have rustic per default using non-default clap coloring. I also would vote against making rustic --help customizable.
So the only possibility would be to add some compile option to turn these colors on - but I doubt people will self-compile only because of help text coloring...

Note there is --help and -h which give different outputs; maybe the -h version is more pleasant to you.

@aawsome aawsome added C-wontfix Category: This will not be worked on and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Jan 13, 2024
@nickchomey
Copy link
Author

nickchomey commented Jan 13, 2024

Thanks very much for the information! It's a great shame that Clap decided to change things so dramatically, especially with so many people saying how much worse it is... But it is out of your hands.

Still, it seems like it is quite easy to implement colors - if you want to. Here's what appears to be the relevant doc. https://docs.rs/clap/latest/clap/enum.ColorChoice.html

And thanks for letting me know about the -h output - its not as good as with the colours, but is MUCH more readable than --help.

Here it is for other's reference
image

@aawsome
Copy link
Member

aawsome commented Jan 13, 2024

Thanks for mentioning ColorChoice. As I understood it, this is already Auto (which is the default) - but only affects error messages like this:
grafik

@nickchomey
Copy link
Author

Ah, I didn't see that it is the default. Its really strange and bothersome that they changed it all so dramatically.

If you are interested in restoring colors throughout the help screen, I just found these snippets that might be of use to you (I have no idea what to do with them)

I hope you'll find a way to bring colors back - the UX is considerably worse without them.

@nickchomey nickchomey changed the title cli menu colors missing Bring back colors to the cli help menu Jan 13, 2024
@aawsome
Copy link
Member

aawsome commented Jan 14, 2024

Ah, the comment describes how to do it. Seems to be a pretty recent change in clap. I'll have a look at it.

@aawsome aawsome added A-cli Area: `rustic` command line interface A-ui-ux Area: Related to user interfaces and user experience and removed C-wontfix Category: This will not be worked on labels Jan 14, 2024
@aawsome
Copy link
Member

aawsome commented Jan 14, 2024

What about this:
grafik
Or do you have better suggestions for the colors?

@nickchomey
Copy link
Author

nickchomey commented Jan 14, 2024

Looks much better! I don't have any particular suggestions for colours - anything is better than nothing. Though perhaps something a bit brighter so there's more contrast from the dark background? Or perhaps even different colors for light and dark modes? Or just one colour that works well with both?

I liked the default Clap colours from v3. But maybe you want to do some "branding" for rustic? Perhaps a Rust-inspired color pallette would make sense?

Perhaps a tool like this could be helpful?
https://coolors.co/palettes/popular/warm

And this contrast checker too.
https://coolors.co/contrast-checker/112a46-acc8e5

There's other similar tools out there too.

Was it difficult to implement?

@simonsan
Copy link
Contributor

simonsan commented Jan 15, 2024

Perhaps a Rust-inspired color pallette would make sense?

I don't think we should do that. I think there is enough Rust in rustic. There is also a style guide with colours and fonts etc. for the GUI, if so, we should use this. Though I need to say, that this issue about the colours in the CLI should be fairly low priority, as we currently have other more pressing things.

What about this: grafik Or do you have better suggestions for the colors?

I think it's fairly bad for e.g. colour-blind people: https://www.colourblindawareness.org/colour-blindness/types-of-colour-blindness/

Protanopia

2024-01-15 02_36_34-Bring back colors to the cli help menu · Issue #1003 · rustic-rs_rustic — Mozill

Deuteranopia

2024-01-15 02_37_42-Bring back colors to the cli help menu · Issue #1003 · rustic-rs_rustic — Mozill

If we chose some colours, we can choose some colours, that are less prone to be confused or not seen at all. I actually liked it, the high contrast way that clap uses currently, and found the coloured output not so helpful. More confusing overall, I found the unordered amount of commands and help texts in the CLI overview. Which I think is the reason, why coloured output might look more clear in the first place.

@simonsan
Copy link
Contributor

Furthermore, I would like to wait on a bit of input of more users regarding that topic. Maybe the majority of the users doesn't like the colours at all or prefers no coloured output there?

@nickchomey
Copy link
Author

nickchomey commented Jan 15, 2024

If we chose some colours, we can choose some colours, that are less prone to be confused or not seen at all. I actually liked it, the high contrast way that clap uses currently

I am confused by this statement... the current clap output isn't high contrast at all... Sure, it is white and black, but there is no noticeable contrast between the different types of output (command name vs headers vs description etc...). There's a slight bolding, but it is very hard to see.

Colours make it VERY high contrast between these different elements, which makes it easier to parse them all.

I think it's fairly bad for e.g. colour-blind people: https://www.colourblindawareness.org/colour-blindness/types-of-colour-blindness

Yes, agreed - it needs more contrast. I shared tools for selecting better colours.

More confusing overall, I found the unordered amount of commands and help texts in the CLI overview. Which I think is the reason, why coloured output might look more clear in the first place.

Yes, I agree. The order of the commands doesn't seem to have any rationale - they aren't alphabetical, nor are they grouped by "topic". I think they should be grouped by the same "Global", "Repository", "Snapshot" headers as are used by the options.

Or, perhaps the commands and options for each category could be included in the same header?

Still, colours are valuable and should be implemented in an pleasant, high-contrast, accessible way

There is also a style guide with colours and fonts etc. for the GUI, if so, we should use this.

Can you provide any links?

I found these:

Though I need to say, that this issue about the colours in the CLI should be fairly low priority, as we currently have other more pressing things.

It seems like it is already solved... the color palette just needs to be fixed

@nickchomey nickchomey changed the title Bring back colors to the cli help menu Improve CLI Help Menu contrast via colors and grouping of commands Jan 15, 2024
@nickchomey nickchomey changed the title Improve CLI Help Menu contrast via colors and grouping of commands Improve CLI Help Menu readability via colors and grouping of commands Jan 15, 2024
@simonsan
Copy link
Contributor

simonsan commented Jan 15, 2024

Can you provide any links?

Here is the rustic design system I started for the UI: rustic_design_system.zip, and then you would need to see, how it would look like and maybe derive CLI colours from that one.

It seems like it is already solved... the color palette just needs to be fixed

How to style the CLI I wouldn't see as a problem. I see it more as a general UI topic that we were discussing the last couple of weeks and that we should do: See #987

I see the coloured output part of the CLI redesign and IMHO that decision should be made based on the decisions taken going forward in that process.

@simonsan
Copy link
Contributor

Colours are back again, but they might change in the future and if we figure out, that it looks better after a CLI redesign without colours, it might make sense, that we remove them again. So please take it as something temporary for now, to restore the status before upgrading clap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: `rustic` command line interface A-ui-ux Area: Related to user interfaces and user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants