Page MenuHomePhabricator

Always pre-wrap code blocks
ClosedPublic

Authored by chad on Aug 2 2016, 6:24 PM.
Tags
None
Referenced Files
F14052027: D16361.diff
Fri, Nov 15, 6:01 AM
F14044932: D16361.id39352.diff
Tue, Nov 12, 11:02 PM
F14042964: D16361.id39352.diff
Tue, Nov 12, 7:07 AM
F14041192: D16361.id39351.diff
Mon, Nov 11, 4:36 PM
F14037647: D16361.diff
Sun, Nov 10, 5:49 PM
F14025186: D16361.diff
Thu, Nov 7, 3:05 PM
F14018598: D16361.id39352.diff
Tue, Nov 5, 4:53 PM
F14007775: D16361.diff
Tue, Oct 29, 11:31 AM
Subscribers

Details

Summary

Fixes T11416. Unclear what the side-effects of this would be, so bark if you find something. Previously, we'd have to overflow and scroll, which is kind of a pain since you're hiding content on long code blocks. This just wraps long lines, and preserves line breaks globally.

Test Plan

Test feed, profile, comments, inline comments, triple backticks.

Diff Detail

Repository
rP Phabricator
Branch
triple-backtick (branched from master)
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 13230
Build 16954: Run Core Tests
Build 16953: arc lint + arc unit

Event Timeline

chad retitled this revision from to Always pre-wrap code blocks.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added reviewers: epriestley, avivey.

This is what I get with this patch:

pasted_file (193×899 px, 26 KB)

ie, it get's line-wrapped, which I think is not the desired behavior in case this is code?

I was also expecting "pre-wrap" to not actually do this, but that's probably just me.

That's what I expect you to get with this patch. We have two choices:

  • hide content
  • wrap content

I went with wrap, so users don't have to scroll.

I think the desired behvior is "keep the line breaks exactly as typed, but limit the actual space used for this block and add scrollbars if needed".

avivey edited edge metadata.

ok; I'd have gone with hiding, but I'll defer this to your expertise.

about the jshint, do you have v2.7.0 installed? We break kinda poorly on some other versions.

This revision is now accepted and ready to land.Aug 2 2016, 6:37 PM

my jshint issue is likely a bad PATH somewhere in my env.

I'm fine waiting to hear @epriestley's thoughts.

epriestley edited edge metadata.

I can't come up with any likely issues offhand.

I agree that this behavior is the best one available to us in most cases.

This revision was automatically updated to reflect the committed changes.