Skip to content

[Console] Allow console listing to be with/without space #14174

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
wants to merge 1 commit into from
Closed

[Console] Allow console listing to be with/without space #14174

wants to merge 1 commit into from

Conversation

94noni
Copy link
Contributor

@94noni 94noni commented Apr 2, 2015

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR *#14057

#14057 is full of new ideas; when testing I thought that a list without space could be useful.

$output->listing(array('A', 'B', 'C'));
 * A

 * B

 * C
$output->listing(array('1', '2', '3',), false);
 * 1
 * 2
 * 3

@javiereguiluz
Copy link
Member

I don't think it's a good idea to add this feature ... but I think it may be a good idea your underlying proposal.

If we want to provide a consistent interface for console commands, we shouldn't define these options that can change the output style. However, if you think that the current listing style is ugly and we should add/remove the space between list elements, that's something that we should definitely consider.

Could you please paste some screenshot of a command with an ugly output because of the use of the new listing output style? Thanks.

@94noni
Copy link
Contributor Author

94noni commented Apr 2, 2015

@javiereguiluz

here are screenshots before/after:

before
after

For me the space is to big for CLI :)

@javiereguiluz
Copy link
Member

@94noni obviously the new legend is awful. Fortunately, in #13874 we discussed a way to get rid of the legend. Maybe we could test the new command output with the new command style?

@94noni
Copy link
Contributor Author

94noni commented Apr 2, 2015

@javiereguiluz My bad I've not seen that issue before
Of course I can change and set the data inside the table
Anyway, the list will still contains this space and for me its to huge (imagine a table with space between each lines) :s

@kbond
Copy link
Member

kbond commented Apr 2, 2015

I agree there should not be a space between the list elements.

@94noni
Copy link
Contributor Author

94noni commented Apr 2, 2015

ok so lets revert the code and only have "\n" for the glue
ping @kbond @javiereguiluz

@javiereguiluz
Copy link
Member

@94noni please see #14196 Thanks!

@94noni
Copy link
Contributor Author

94noni commented Apr 3, 2015

Thank you
I close this one :)

@94noni 94noni closed this Apr 3, 2015
@94noni 94noni deleted the console_style_listing branch April 3, 2015 10:26
fabpot added a commit that referenced this pull request Apr 3, 2015
This PR was squashed before being merged into the 2.7 branch (closes #14196).

Discussion
----------

Tweaked some console command styles

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14174
| License       | MIT
| Doc PR        | -

As discussed, after updating the first console commands to the new style guide, we were going to introduce the needed tweaks. This PR is the first one with those tweaks.

### Tables

Headers now are displayed in the usual green color used frequently by Symfony commands:

![table_header](https://cloud.githubusercontent.com/assets/73419/6980286/a126e8cc-d9ef-11e4-8d1e-9a5be21564eb.png)

### Command tiles and section titles

I see these titles in a beautiful blue color ... but lots of people use color schemes which make them almost unreadable. Now they use the yellow color frequently used by Symfony commands:

![command_section_titles](https://cloud.githubusercontent.com/assets/73419/6980292/b499627c-d9ef-11e4-9940-e134ee0eb02f.png)

### Listings

Elements in a listing no longer add an extra blank line. See #14174 for the rationale.

Commits
-------

dcf1801 Tweaked some console command styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants