make Differential comment panel flexible width and nip a bit at other flexible width issues

Summary:
all sorts of stuff

 - made comment form width flexible
 - made margins element specific rather than part of differential-primary-pane
 - made box elements all veritically align left and right until code stuff
 - re-factored width calculaton stuff a bunch so only the code section has to suffer from max-width calculations; everything else can flex
 - made colspan 3 for rightmost table header element. this is so the "View Options" UI element ends up lining up correctly with the "Show All Lines" element just below

Test Plan: looked at revision view and changeset view and it all looked hot. note I did not test what things looked like with different word wrap values; that should still work given the re-factoring and not re-design here. also toggled haunted panel mode and it looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2006

Differential Revision: https://secure.phabricator.com/D3866
This commit is contained in:
Bob Trahan
2012-11-01 13:30:37 -07:00
parent 0364ccdd5f
commit e0b9a63388
13 changed files with 138 additions and 116 deletions

View File

@@ -250,18 +250,20 @@ final class DifferentialChangesetViewController extends DifferentialController {
$detail->appendChild($output);
$detail->setVsChangesetID($left_source);
$output =
id(new DifferentialPrimaryPaneView())
->setLineWidthFromChangesets(array($changeset))
->appendChild(
'<div class="differential-review-stage" '.
'id="differential-review-stage">'.
$detail->render().
'</div>');
$panel = id(new DifferentialPrimaryPaneView())
->setLineWidthFromChangesets(array($changeset));
$panel->appendChild(phutil_render_tag('div',
array(
'class' => 'differential-review-stage',
'id' => 'differential-review-stage',
'style' => "max-width: {$panel->calculateSideBySideWidth()}px;"
), $detail->render())
);
return $this->buildStandardPageResponse(
array(
$output
$panel
),
array(
'title' => 'Changeset View',