Skip to content

[Console] simplified code #20372

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

Merged
merged 1 commit into from
Oct 31, 2016
Merged

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