-
Notifications
You must be signed in to change notification settings - Fork 546
feat: color and plain modes for --progress flag #899
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
base: main
Are you sure you want to change the base?
Conversation
345bf01 to
c59d4d2
Compare
|
I don't see anything out of the ordinary on these changes, but I also don't have permissions to approve PRs. You will have to wait for a maintainer to come back to this for a ✅ . |
Signed-off-by: Karan <[email protected]>
c59d4d2 to
9e1b44b
Compare
| /// The flag indicating whether to use colors. | ||
| public let color: Bool | ||
| /// The flag indicating whether to use plain output (no ANSI codes, one line per update). | ||
| public let plain: Bool |
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.
Could we use an enum instead of these booleans to indicate the type of the output?
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.
i was avoiding that since that would involve changing a widely used api would touch a lot unrelated lines but it does seem to make this a little bit more cleaner overall
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.
refactored.
Signed-off-by: Karan <[email protected]>
|
@katiewasnothere @saehejkang what do you guys think about making color mode the default mode instead of ansi since it visually looks a lot more appealing? |
Type of Change
Motivation and Context
relevant issue: #641
Adds two new modes to
--progress: plain and color.plain: Produces simple, line-by-line text output with no ANSI escape codes. Ideal for writing to log files or environments that don’t support terminal control sequences.
color: Similar to the existing ANSI mode but with enhanced color usage. This mode provides a more expressive visual display. If it sounds good, we could consider making it the default in this or a follow up pr.
Testing