Description
As part of #440 I'm in need of text styles for error, warning, info and debug messages. Today, only error and info are defined. Considering Cleo is inspired by Symphony Console, I went to their docs to see what they implemented.
They have implemented the following default styles
symphony:
success: "fg=black;bg=green"
error: "fg=white;bg=red"
warning: "fg=black;bg=yellow"
note: "fg=yellow"
info: "fg=green"
caution: "fg=white;bg=red"
As you can see there are a few differences w.r.t. what is currently implemented in Cleo:
currently in Cleo:
error: "fg=red;options=bold" # Symphony has "fg=white;bg=red"
info: "fg=blue" # Symphony has "fg=green"
comment: "fg=green" # Symphony just prepends "//" without altering colour
question: "fg=cyan"
c1: "fg=cyan"
c2: "fg=default;options=bold"
b: "fg=default;options=bold"
Do we want to align Cleo with what Symphony is doing, or will that be too big of change for Poetry?
I'd still suggest adding corresponding styles in order to keep parity with them. I suggest the following
proposed for Cleo v3:
success: "fg=green;options=bold" # new, for parity with Symphony
error: "fg=red;options=bold"
warning: "fg=yellow;bg=bold" # new, for parity with Symphony
note: "fg=yellow" # new, for parity with Symphony
info: "fg=blue"
caution: "fg=white;bg=red" # new, for parity with Symphony
comment: "fg=green"
question: "fg=cyan"
debug: "fg=dark_gray" # new, suggested for use with logging
c1: "fg=cyan"
c2: "fg=default;options=bold"
b: "fg=default;options=bold"
Also, I get b
being a useful shorthand for bold, but shouldn't c1
and c2
have some more descriptive names..?
Additionally, Symphony offer some interesting helper methods for creating titles, subtitles, bullet lists and various types of tables. cleo.ui
currently only has the type of table, I can implement the others based on what Symphony propose if you'd like.
Shall I start working on these points and open a PR?
Activity