make differential use fluid width for code layout

Summary:
assume at least 360px for a given code pane. that's about when the comment box starts fighting back anyway. we'll use the yet-to-be-built one page render for the narrow viewport cases.

This address the cases as laid out in T2005. It fails the "MMMMM" case pretty horribly. However, if there is a space it works just fine and presumably folks are stretching out their windows on big glorious monitors at 160 characters wide or whatever.

Re-factored things just a tad but figure I'll take a nice big chunk of "renderer" to move forward T2009

Test Plan: looked at all sorts of funky diffs

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2005

Differential Revision: https://secure.phabricator.com/D4083
This commit is contained in:
Bob Trahan
2012-12-06 11:33:04 -08:00
parent 2931cbcb55
commit b4de56ef4b
10 changed files with 115 additions and 189 deletions

View File

@@ -234,14 +234,11 @@ final class DifferentialChangesetViewController extends DifferentialController {
$detail->appendChild($output);
$detail->setVsChangesetID($left_source);
$panel = id(new DifferentialPrimaryPaneView())
->setLineWidthFromChangesets(array($changeset));
$panel = new DifferentialPrimaryPaneView();
$panel->appendChild(phutil_render_tag('div',
array(
'class' => 'differential-review-stage',
'id' => 'differential-review-stage',
'style' => "max-width: {$panel->calculateSideBySideWidth()}px;"
), $detail->render())
);