-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] setColumnMaxWidth does not wrap header cells nicely #45520
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
Comments
hey, i can atleast help you with the borders:
the easiest way is to work around the multi-line-headers bug from symfony alltogether, as this would seem to require a lot of refactoring. i had a go at it, but that will get really messy really fast. there seems to be another a bug during the wrapping or somewhere here:
which breaks the styling on multiline headers :| maybe there is an easy way to fix this, but i dont have enough experience with the console component ¯\_(ツ)_/¯ and cheers to all your effort with phpstan, maybe this helps a little. |
This PR was merged into the 4.4 branch. Discussion ---------- Fix table header seperator wrapping | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45520 | License | MIT | Doc PR | Before PR, a new seperator is added foreach split line in header ```php $table = new Table(); $table ->setHeaders([ [ 'Publication', 'Very long header with a lot of information', ], ]) ->setRows([ [ '1954', 'The Lord of the Rings, by J.R.R. Tolkien', ], ]) ->setColumnMaxWidth(1, 30); ``` Before PR:  After PR  (Fabbot cannot be green (break unit tests)) Commits ------- ebf38b1 [Console] Header with column max width is now well wrap with separator
Symfony version(s) affected
5.4.3, 6.x possibly too
Description
I'd like setColumnMaxWidth to also wrap headers nicely. Currently it adds an extra border between the header lines.
This is how the output currently looks like:
This is how I'd like it to look like:
How to reproduce
In context of SymfonyStyle child class:
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: