Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Table vertical rendering#41676

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@yoannrenard
Copy link
Contributor

@yoannrenardyoannrenard commentedJun 11, 2021
edited
Loading

QA
Branch?6.1
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#41595
LicenseMIT
Doc PR

This PR adds a way to render Console Tables vertically. This is inspired by the way MySQL and PostgreSQL do with the '\G' command terminator.
For example, if we use this vertical rendering for the commanddebug:validator, the command would show something like:

App\Entity\Foo-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+| Property: bar||     Name: Symfony\Component\Validator\Constraints\Length||   Groups: Default, Foo||  Options: [||"maxMessage"=>"This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.",||"minMessage"=>"This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.",||"exactMessage"=>"This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.",||"charsetMessage"=>"This value does not match the expected {{ charset }} charset.",||"max"=> 75,||"min"=> 2,||"charset"=>"UTF-8",||"normalizer"=> null,||"allowEmptyString"=> false,||"payload"=> null|| ]||---------------------------------------------------------------------------------------------------------------------------------------------------------------------|| ...|+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Instead of :

App\Entity\Foo-------------------+----------+------------------------------------------------+------------------------------------------------+----------------------------------------------------------------------------------+| Property| Name| Groups| Options|+----------+------------------------------------------------+------------------------------------------------+----------------------------------------------------------------------------------+| bar| Symfony\Component\Validator\Constraints\Length| Default, Foo| [|||||"maxMessage"=>"This value                                                    ||          |                                                |                                                | is too long. It should have {{ limit }} character or less.|This value is too lon ||          |                                                |                                                | g. It should have {{ limit }} characters or less.",|||||"minMessage"=>"This value                                                    ||          |                                                |                                                | is too short. It should have {{ limit }} character or more.|This value is too sh ||          |                                                |                                                | ort. It should have {{ limit }} characters or more.",|||||"exactMessage"=>"This valu                                                   ||          |                                                |                                                | e should have exactly {{ limit }} character.|This value should have exactly {{ l ||          |                                                |                                                | imit }} characters.",|||||"charsetMessage"=>"This va                                                   ||          |                                                |                                                | lue does not match the expected {{ charset }} charset.",|||||"max"=> 75,|||||"min"=> 2,|||||"charset"=>"UTF-8                                                   ||          |                                                |                                                | 208m",|||||"normalizer"=> null|||||;208m,|||||"allowEmptyString"=>false||||| [0;38;5;208m,|||||"payload"=> null||||| 8m||||| ]|...+----------+------------------------------------------------+------------------------------------------------+----------------------------------------------------------------------------------+

Which is hard to read.

IndraGunawan, cjhaas, GromNaN, and ro0NL reacted with thumbs up emoji
@stof
Copy link
Member

Having 2 booleans namedhorizontal andvertical looks confusing to me.

ro0NL reacted with thumbs up emoji

@yoannrenard
Copy link
ContributorAuthor

I agree with you@stof
I was thinking of a parameter like$orientation, or$direction maybe, that could beneutral,horizontal orvertical. But I didn't like it either

@nicolas-grekasnicolas-grekas added this to the5.4 milestoneJun 12, 2021
@yoannrenardyoannrenardforce-pushed theconsole_table_inline_render branch from15e9ab8 toa37528eCompareJune 12, 2021 10:12
@yoannrenardyoannrenardforce-pushed theconsole_table_inline_render branch fromd4a17b9 to69b28e8CompareJuly 20, 2021 17:06
Copy link
Contributor

@94noni94noni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Would love to have it in v5.4 :)

@yoannrenardyoannrenardforce-pushed theconsole_table_inline_render branch from69b28e8 to1221afeCompareAugust 26, 2021 18:32
@fabpotfabpot modified the milestones:5.4,6.1Nov 16, 2021
Copy link
Member

@GromNaNGromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That's a cool feature. Can you rebase it on 6.1 and adapt the syntax with PHP 8.1 capabilities?

@yoannrenard
Copy link
ContributorAuthor

Thanks for your review@GromNaN

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice feature! Thanks Yoann.

@chalasr
Copy link
Member

@yoannrenard Can you please rebase again on 6.1?

@yoannrenardyoannrenardforce-pushed theconsole_table_inline_render branch from1ed9549 todefd326CompareMay 2, 2022 08:58
Using an enum instead of 2 separated booleansRephrase changelog for better consistency
@GromNaN
Copy link
Member

Thank you@yoannrenard.

@GromNaNGromNaN merged commit8d5dd1b intosymfony:6.1May 9, 2022
@yoannrenardyoannrenard deleted the console_table_inline_render branchMay 10, 2022 08:09
@yoannrenard
Copy link
ContributorAuthor

You are welcome@GromNaN

nicolas-grekas added a commit that referenced this pull requestMay 14, 2022
…ering (nicolas-grekas)This PR was merged into the 6.1 branch.Discussion----------[Console] fix CS for code related to Table vertical rendering| Q             | A| ------------- | ---| Branch?       | 6.1| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -A quick review of#41676 made me submit this.Commits-------41ff71e [Console] fix CS for code related to Table vertical rendering
@fabpotfabpot mentioned this pull requestMay 14, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GromNaNGromNaNGromNaN approved these changes

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

@nicolas-grekasnicolas-grekasAwaiting requested review from nicolas-grekas

+1 more reviewer

@94noni94noni94noni approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

[Console] Table helper vertical rendering

9 participants

@yoannrenard@stof@chalasr@GromNaN@javiereguiluz@nicolas-grekas@94noni@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp