-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Fix table cell styling #22217
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
Conversation
👍 nice catch Status: reviewed |
applies to rowspan as well.. looking at it. |
too bad.. the trick doesnt seem to work in that case ie this one still fails; $table = new Table($output);
$table->setRow(0, array(new TableCell('f<error>o'."\n".'o</error>o', array('rowspan' => 2)), 'a'));
$table->setRow(1, array('b'));
$table->render(); edit: the same trick does work at first sight.. but breaks tests (e.g. edit2: all good now :) |
Status: needs review |
Agree. Had to add a tiny new feature as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Status: Reviewed |
Thank you @ro0NL. |
This PR was merged into the 2.7 branch. Discussion ---------- [Console] Fix table cell styling | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | tiny one | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> Fixes an issue with newlines and table cells. Remembered this little trick from @chalasr as we had it before with style blocks i believe.. ```php $table = new Table($output); $table->setRows(array( array(new TableCell('<error>Dont break'."\n".'here</error>', array('colspan' => 2))), new TableSeparator(), array('foo', new TableCell('<error>Dont break'."\n".'here</error>', array('rowspan' => 2))), array('bar'), )); $table->render(); ``` Before  After  Commits ------- 53ecf83 [Console] Fix table cell styling
@ro0NL It looks like merging this up to master broken tests with high deps, see e.g. https://travis-ci.org/symfony/symfony/jobs/218357015#L2631. Maybe the merge went wrong? |
I do think the descriptors failures are related to this one though :/ (frameworkbundle, see https://ci.appveyor.com/project/fabpot/symfony/build/1.0.20617#L598). Quite hard to fix for me right now |
👍 gonna have a look at it asap. For now im clueless about the failure... -| Options | compiler_class: Symfony\Component\Routing\RouteCompiler |
-| | opt1: val1 |
-| | opt2: val2 |
+| Options | compiler_class: Symfony\Component\Routing\RouteCompiler |
+| | opt1: val1 |
+| | opt2: val2 | Seems whitespace related.. not sure :) |
Break-line and/or whitespaces, pretty sure :) Broken from 2.8 btw |
OK.. figured it out. The thing is we're replacing In above example (the route options) contain 2 new lines.. meaning with this replacement the fixture changes as well. Visually you dont see it :) Will prepare a PR for 2.8 👍 |
You rock! |
See #22278 |
This PR was squashed before being merged into the 3.2 branch (closes #22270). Discussion ---------- [Console] Fix render exception test | Q | A | ------------- | --- | Branch? | 3.2 and up | Bug fix? | yes (regression from #22188 in master) | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22217 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> As pointed out by @chalasr tests are mysteriously broken.. not sure what i missed but this is apparently needed now.. cc @fabpot Commits ------- 6b71722 [Console] Fix render exception test
…ro0NL) This PR was squashed before being merged into the 2.8 branch (closes #22278). Discussion ---------- [FrameworkBundle] Update console fixtures after #22217 | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes (regression from #22217) | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22217 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> cc @fabpot Sorry for the inconvenience :) Commits ------- 6e1cee6 [FrameworkBundle] Update console fixtures after #22217
…ro0NL) This PR was squashed before being merged into the 2.8 branch (closes #22278). Discussion ---------- [FrameworkBundle] Update console fixtures after #22217 | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes (regression from #22217) | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#22217 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> cc @fabpot Sorry for the inconvenience :) Commits ------- 6e1cee6 [FrameworkBundle] Update console fixtures after #22217
* 2.8: [FrameworkBundle] Update console fixtures after #22217
* 3.2: [FrameworkBundle] Update console fixtures after #22217 Allow Upper Case property names fix some risky tests bumped Symfony version to 2.7.27 updated VERSION for 2.7.26 update CONTRIBUTORS for 2.7.26 updated CHANGELOG for 2.7.26
Fixes an issue with newlines and table cells. Remembered this little trick from @chalasr as we had it before with style blocks i believe..
Before
After