8000 [Profiler] Fix code excerpt wrapping by ogizanagi · Pull Request #22971 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Profiler] Fix code excerpt wrapping #22971

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

Merged
merged 1 commit into from
Jun 3, 2017
Merged

[Profiler] Fix code excerpt wrapping #22971

merged 1 commit into from
Jun 3, 2017

Conversation

ogizanagi
Copy link
Contributor
Q A
Branch? 3.3
Bug fix? yesish
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A
Before After
screenshot 2017-05-30 a 19 09 03 screenshot 2017-05-30 a 19 09 35

However, I think my own preference for code excerpts would be to never wrap, at the risk of scrolling horizontally. 1024px is enough to read most of the code excerpt without scrolling, and it feels less messy (to me) when a line is too long. WDYT?

@yceruto
Copy link
Member
yceruto commented May 30, 2017

👍 to never wrap! it feels less messy (to me too)

@ro0NL
Copy link
Contributor
ro0NL commented May 30, 2017

Looking at it, i think the line-height really needs a patch as well (part of discussion in #22439, but perhaps we can do it here already). The space between } and throw intuitively looks like 2 line breaks (based on the font size).

@ogizanagi
Copy link
Contributor Author

Hmmm. I guess we can close this one if we can accept #22439 as a "bug fix".
Or we can merge this one instead, just fixing the code wrapping and keep the nowrap suggestion for 3.4 in #22439, but I guess it'd be better to have something consistent between 3.3 and 3.4 about this...

@nicolas-grekas
Copy link
Member

I like how github does. Wrapping code is a bad idea I think.

@ogizanagi
Copy link
Contributor Author
ogizanagi commented Jun 2, 2017

Great! So it seems we have a consensus about this currently (at least no opponent right now).

Either I update this PR to always prevent wrapping and allow horizontal scrolling with minimal changes, either we reconsider #22439 to target 3.3 as a bug fix and we close this one.
IMHO, I'd love to see #22439 merged in 3.3, because (despite I didn't check it out yet), it seems @sustmi did great and it's not DX but UI/UX fixes to me. Also, I clearly think having 2 different UI/UX on 3.3 and 3.4+ will only complicate maintenance.

@nicolas-grekas
Copy link
Member

prevent wrapping and allow horizontal scrolling with minimal changes

if it's a few css lines+classes, let's do that - it wouldn't prevent considering #22439 afterwards

@ogizanagi
Copy link
Contributor Author

Done.

Before After
juin-03-2017 10-38-47 juin-03-2017 10-39-04

(I also slightly updated the line height, so it feels more natural and consistant for every lines. Poke @ro0NL)

Copy link
Member
@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

@ro0NL
Copy link
Contributor
ro0NL commented Jun 3, 2017

Much better 👍

@fabpot
Copy link
Member
fabpot commented Jun 3, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit 6c87863 into symfony:3.3 Jun 3, 2017
fabpot added a commit that referenced this pull request Jun 3, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

[Profiler] Fix code excerpt wrapping

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yesish
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

|Before|After|
|--|--|
|<img width="1346" alt="screenshot 2017-05-30 a 19 09 03" src="https://cloud.githubusercontent.com/assets/2211145/26595449/b8c4302c-456b-11e7-83c4-3471f915437b.PNG">|<img width="1075" alt="screenshot 2017-05-30 a 19 09 35" src="https://cloud.githubusercontent.com/assets/2211145/26595450/b8c61e64-456b-11e7-8b33-bdbe2e90b160.PNG">|

However, I think my own preference for code excerpts would be to never wrap, at the risk of scrolling horizontally. 1024px is enough to read most of the code excerpt without scrolling, and it feels less messy (to me) when a line is too long. WDYT?

Commits
-------

6c87863 [Profiler] Never wrap in code excerpts
@ogizanagi ogizanagi deleted the fix/profiler/code_wrap branch June 3, 2017 15:57
@fabpot fabpot mentioned this pull request Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0