Always render comment panel in Diffusion commit view
Summary: I'm going to stop showing changes for commits which touch 30,000 files, but still want to show the comment panel. Test Plan: Looked at commits, saw comments. Mashed "Z"; haunted mode worked. Reviewers: nh, vrana Reviewed By: nh CC: aran Differential Revision: https://secure.phabricator.com/D4729
This commit is contained in:
@@ -148,7 +148,6 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
'r'.$callsign.$commit->getCommitIdentifier());
|
'r'.$callsign.$commit->getCommitIdentifier());
|
||||||
}
|
}
|
||||||
|
|
||||||
$pane_id = null;
|
|
||||||
if ($bad_commit) {
|
if ($bad_commit) {
|
||||||
$error_panel = new AphrontErrorView();
|
$error_panel = new AphrontErrorView();
|
||||||
$error_panel->setTitle('Bad Commit');
|
$error_panel->setTitle('Bad Commit');
|
||||||
@@ -293,28 +292,11 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
}
|
}
|
||||||
$change_table->setRenderingReferences($change_references);
|
$change_table->setRenderingReferences($change_references);
|
||||||
|
|
||||||
// TODO: This is pretty awkward, unify the CSS between Diffusion and
|
$content[] = $change_list->render();
|
||||||
// Differential better.
|
|
||||||
require_celerity_resource('differential-core-view-css');
|
|
||||||
$pane_id = celerity_generate_unique_node_id();
|
|
||||||
$add_comment_view = $this->renderAddCommentPanel($commit,
|
|
||||||
$audit_requests,
|
|
||||||
$pane_id);
|
|
||||||
$main_pane = phutil_render_tag(
|
|
||||||
'div',
|
|
||||||
array(
|
|
||||||
'id' => $pane_id
|
|
||||||
),
|
|
||||||
$change_list->render().
|
|
||||||
id(new PhabricatorAnchorView())
|
|
||||||
->setAnchorName('comment')
|
|
||||||
->setNavigationMarker(true)
|
|
||||||
->render().
|
|
||||||
$add_comment_view);
|
|
||||||
|
|
||||||
$content[] = $main_pane;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content[] = $this->renderAddCommentPanel($commit, $audit_requests);
|
||||||
|
|
||||||
$commit_id = 'r'.$callsign.$commit->getCommitIdentifier();
|
$commit_id = 'r'.$callsign.$commit->getCommitIdentifier();
|
||||||
$short_name = DiffusionView::nameCommit(
|
$short_name = DiffusionView::nameCommit(
|
||||||
$repository,
|
$repository,
|
||||||
@@ -325,6 +307,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
'commit' => true,
|
'commit' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
if ($changesets) {
|
if ($changesets) {
|
||||||
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
|
||||||
->setAnchorName('top')
|
->setAnchorName('top')
|
||||||
@@ -562,13 +545,13 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
|
|
||||||
private function renderAddCommentPanel(
|
private function renderAddCommentPanel(
|
||||||
PhabricatorRepositoryCommit $commit,
|
PhabricatorRepositoryCommit $commit,
|
||||||
array $audit_requests,
|
array $audit_requests) {
|
||||||
$pane_id = null) {
|
|
||||||
assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest');
|
assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest');
|
||||||
$user = $this->getRequest()->getUser();
|
$user = $this->getRequest()->getUser();
|
||||||
|
|
||||||
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
|
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
|
||||||
|
|
||||||
|
$pane_id = celerity_generate_unique_node_id();
|
||||||
Javelin::initBehavior(
|
Javelin::initBehavior(
|
||||||
'differential-keyboard-navigation',
|
'differential-keyboard-navigation',
|
||||||
array(
|
array(
|
||||||
@@ -678,14 +661,26 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
return
|
// TODO: This is pretty awkward, unify the CSS between Diffusion and
|
||||||
|
// Differential better.
|
||||||
|
require_celerity_resource('differential-core-view-css');
|
||||||
|
|
||||||
|
return phutil_render_tag(
|
||||||
|
'div',
|
||||||
|
array(
|
||||||
|
'id' => $pane_id,
|
||||||
|
),
|
||||||
phutil_render_tag(
|
phutil_render_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'differential-add-comment-panel',
|
'class' => 'differential-add-comment-panel',
|
||||||
),
|
),
|
||||||
|
id(new PhabricatorAnchorView())
|
||||||
|
->setAnchorName('comment')
|
||||||
|
->setNavigationMarker(true)
|
||||||
|
->render().
|
||||||
$panel->render().
|
$panel->render().
|
||||||
$preview_panel);
|
$preview_panel));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user