Closed nickchomey closed 9 months ago
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.
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
Thanks for mentioning ColorChoice
. As I understood it, this is already Auto
(which is the default) - but only affects error messages like this:
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.
Ah, the comment describes how to do it. Seems to be a pretty recent change in clap. I'll have a look at it.
What about this: Or do you have better suggestions for the colors?
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?
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: 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
Deuteranopia
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.
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?
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
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 https://github.com/rustic-rs/rustic/discussions/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.
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.
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
Now it looks like this:
Is there any way to bring back the colours? I find them to be much easier to visually parse