-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
SymfonyStyle better aligning multi-line blocks? #18564
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
👍 and not only that: this technique should be applied to everything (that was the original intention). For example, a long comment should not be displayed like this:
But like this:
|
👍 Great idea! |
I think that this should be the result for any block:
I have a WIP that is OK for typed block (warning, success, ...) using this solution. Example: Is it correct or is there another one of the proposed solutions that should be used instead? Comments would also become blocks using |
@chalasr This is Off-Topic - but may be interesting not just for me. How did you do the awesome color backgrounds for "INSERT" and "dev" branch left from the cursor? Your solution looks great! 👍 |
@JHGitty Glad to hear that. I use the ohmyzsh budspencer theme, nothing more (background colors are the default ones). It is marked as obsolete so you should look at the new one depending on your needs. |
…ocks (chalasr) This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #18879). Discussion ---------- [Console] SymfonyStyle: Align multi-line/very-long-line blocks | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #18564 | License | MIT | Doc PR | n/a This PR makes all lines aligned in multi-line blocks. Very-long-line block: ```php SymfonyStyle::warning('Lorem ipsum...'); ``` Before:  After:  Multi-line block: ```php SymfonyStyle::success(['Lorem ipsum...', 'Lorem ipsum...', 'Lorem ipsum...']); ``` Before:  After:  Also @javiereguiluz pointed the case of `SymfonyStyle::comment()` in #18564, I needed to make it calling `SymfonyStyle::block()` with ` // ` as prefix to fit the first intention of this one. So if this one is merged I'll propose the changes for comments in a second PR (out of this scope). Commits ------- 963fe1d [Console] SymfonyStyle: Align multi-line/very-long-line blocks
…ine comments (chalasr) This PR was merged into the 2.8 branch. Discussion ---------- [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Pointed in #18564 (comment). Very-long-line comment: ```php SymfonyStyle::comment('Lorem ipsum ...'); ``` Before:  After:  Multi-line comment: ```php SymfonyStyle::comment(['Lorem ipsum...', 'Lorem ipsum...']); ``` Before:  After:  Commits ------- 1c94fea [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
Uh oh!
There was an error while loading. Please reload this page.
Description
Currently, a multiline warning block looks like:
It's not very clear that the second line is part of the warning block.
Proposed Solutions
I propose to change this to:
Or:
Or indent the complete block:
The text was updated successfully, but these errors were encountered: