Skip to content

Conversation

@fabpot
Copy link
Member

@fabpot fabpot commented Oct 31, 2016

Q A
Branch? 2.8
Bug fix? no yes (even if the output is "better" with this PR)
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Instead of adding blank character for shorter lines and having to keep the max length of messages, I propose to clear the line via an ANSI sequence like done in the progress bar.

Code is cleaner and output is better as currently, then cursor can be "away" from the last character which is unexpected.

Actually, this is a bug fix as the current code does not work well when using styles in the indicator message.

@fabpot fabpot merged commit 0aca9bf into symfony:2.8 Oct 31, 2016
fabpot added a commit that referenced this pull request Oct 31, 2016
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] simplified code

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | ~no~ yes (even if the output is "better" with this PR)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Instead of adding blank character for shorter lines and having to keep the max length of messages, I propose to clear the line via an ANSI sequence like done in the progress bar.

Code is cleaner and output is better as currently, then cursor can be "away" from the last character which is unexpected.

Actually, this is a bug fix as the current code does not work well when using styles in the indicator message.

Commits
-------

0aca9bf [Console] simplified code
This was referenced Nov 17, 2016
@fabpot fabpot deleted the progress-indicator-simplification branch January 7, 2017 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants