Page MenuHomePhabricator

Add scroll bars to diff panels instead of overflowing the container
Closed, ResolvedPublic

Description

When there is a string that can not be wrapped, it overflows the diff container. Perhaps we can add a scrollbar instead of overflowing the container.

Arbitrary Example: D17301

Revisions and Commits

Event Timeline

cdentel raised the priority of this task from to Needs Triage.
cdentel updated the task description. (Show Details)
cdentel added a subscriber: cdentel.

I would rather not do this, mostly because the scrollbar would likely be off the page and uncontrollable. I think the browser generally does the right thing here. Differential is not currently built for smaller screens but T2004 should resolve most cases.

I think this happened before the most recent design work -- my recollection is that each changeset had an individual scrollbar. So it would look like this:

path/to/oldfile.php                   path/to/newfile.php
+------------------------------+-------------------------------+
| ...                          | ...                           |
+------------------------------+-------------------------------+

path/to/oldfile.php                                          pat
+---------------------------------------------------------+-----
| ...                                                     | ... 
+---------------------------------------------------------+-----
<=============------------------------------------------------->

path/to/oldfile.php                   path/to/newfile.php
+------------------------------+-------------------------------+
| ...                          | ...                           |
+------------------------------+-------------------------------+

...where the scrollbar shows up under the second panel. I might be misremembering. @chad, are you opposed to it working like that?

My opposition is minor. On a long diff the scrollbar will be off the screen, meaning you'll have to scroll down to it and then slide it over, then scroll back up. If we let the overflow naturally occur, the browsers scroll bar will appear and it will be less work to review the code.

I do think I can clean up the code so that it looks natural, it doesn't correct right now.

Ah, that's true -- I use shift + mousewheel for all my h-scrolling (that's what I like to call "horizontal scrolling", it keeps it real).

chad edited this Maniphest Task.