Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Improve console header line #19095

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

Closed
ro0NL opened this issue Jun 18, 2016 · 14 comments
Closed

[FrameworkBundle] Improve console header line #19095

ro0NL opened this issue Jun 18, 2016 · 14 comments

Comments

@ro0NL
Copy link
Contributor

ro0NL commented Jun 18, 2016

Hi,

Imho the current header line for the console application is a bit circus-like and misleading.

image

Circus like as in; Green, white and yellow for the name/version part.
Misleading as in app/dev/debug looking like a working directory or at least some sort of path.

Im not proposing a big fat ascii header here, but just some formatting improvements. What about formatting the individual parts (version, kernel name, dev yes/no, debug yes/no) as labels, a bit like the webprofiler toolbar is doing.

@xabbuh
Copy link
Member

xabbuh commented Jun 21, 2016

At least for the app/dev/debug part I agree with you. Especially for newcomers this part might not be really clear.

@ro0NL
Copy link
Contributor Author

ro0NL commented Jun 29, 2016

@xabbuh any thoughts?

image

Im just playing around with it.. not sure if this is it though. Some things i like (kernel@env format, better signal colors), some things i dont (colors 😅, brackets i guess =/)

edit:
image

Trick/ugly part is the debug thingy imo, but i kinda like this till that.

@javiereguiluz
Copy link
Member

In my opinion the latest proposal is more confusing than the existing line.

We could go for the explicit way:

Symfony 3.2.0-DEV (kernel: app) (env: dev) (debug: true)

@ro0NL
Copy link
Contributor Author

ro0NL commented Jun 29, 2016

Makes sense =/ :+1: for removing "version"

What about colors?

edit:
image

Maybe use on/off for debug?

@jvasseur
Copy link
Contributor

I think debug: false shouldn't be red, red means an error and disabling debug is a totally valid thing.

@ro0NL
Copy link
Contributor Author

ro0NL commented Jun 30, 2016

I know.. therefore i proposed on/off instead of true/false. Imho red/green also signals on/off. But maybe keeping it simple is a good thing, ie plain text except for the version.

edit:
Do we want UTF8 chars? I.e. we could als play with ✓ & ✗

@wouterj
Copy link
Member

wouterj commented Jun 30, 2016

Do we want UTF8 chars? I.e. we could als play with ✓ & ✗

This is not supported by Windows terminals.

@javiereguiluz
Copy link
Member

javiereguiluz commented Jun 30, 2016

What if we don't use color at all?

If not possible, please don't try to convey the information with colors. Color blindness, specially for green/red, is very common for humans: ~8% of males suffer it (but only 0.5% of females) see reference

@ro0NL
Copy link
Contributor Author

ro0NL commented Jun 30, 2016

Globally? The whole console is pretty colorful right now and can be controlled by --[no-]ansi anyway.

Or do you propose
Symfony 3.2.0-DEV (kernel: app) (env: dev) (debug: true) literally?

If not possible, please don't try to convey the information with colors.

You mean "If possible" right?

@xabbuh
Copy link
Member

xabbuh commented Jun 30, 2016

I you really want to use colours here, I would use them to distinguish keys and values, but I would not use a colour that is dependent on the actual value.

@HeahDude
Copy link
Contributor

Agreed with @xabbuh since using colors this way can make parentheses needless

@ro0NL
Copy link
Contributor Author

ro0NL commented Jul 1, 2016

image

Imo we need some form of separation..

  • separating metadata from the version (e.g. v3 with parentheses)
  • separating key/value pairs (e.g. v3 with comma)

@javiereguiluz
Copy link
Member

My preference would be the third option.

@ro0NL
Copy link
Contributor Author

ro0NL commented Jul 1, 2016

Mine too :)

Btw, would it make sense to let it interact with output verbosity? I.e. bin/console -V vs. bin/console -V --verbose

fabpot added a commit that referenced this issue Jul 29, 2016
…ting (ro0NL)

This PR was squashed before being merged into the 3.2-dev branch (closes #19275).

Discussion
----------

[Console][FrameworkBundle] Revised console header formatting

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | yes (ui change)
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not yet
| Fixed tickets | #19095
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Before/After
![image](https://cloud.githubusercontent.com/assets/1047696/16983804/e36c95e0-4e76-11e6-854d-dfa22c634b39.png)

Commits
-------

fcddb3a [Console][FrameworkBundle] Revised console header formatting
@fabpot fabpot closed this as completed Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants