-
Notifications
You must be signed in to change notification settings - Fork 48
#296 Status should be colored for kcctl get connectors #301
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
Conversation
01fb21e
to
b829fa9
Compare
@@ -68,7 +68,7 @@ public void should_print_registered_connectors() { | |||
})) | |||
.map(String::trim) | |||
.containsExactly( | |||
"NAME TYPE STATE TASKS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we're falling prey to freva/ascii-table#21 here, where ANSI escape codes are being treated as visible non-zero-width characters by the ASCII table library when determining how to space out its headers.
Could we use the Styler
interface introduced in freva/ascii-table@0cd4887 to add color to state strings after the table's dimensions have already been determined?
I was initially tempted to suggest sticking with the current String::replace
approach, but that fails when connectors' names match state names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @harveyyue! Tested this out locally and it works pretty nicely. One thought about the implications w/r/t ASCII table dimensions but apart from that this is good to go.
Hey @harveyyue, any thoughts on Chris' comments above? |
c742184
to
afd844d
Compare
@gunnarmorling @C0urante
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @harveyyue, this looks great! Two small questions about the integration tests but apart from that everything LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @harveyyue!
Woot, woot! Thanks a lot, guys!
|
Refer #296