mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Move "List Inline Comments" to the inline header dropdown menu
Summary: See D18128. Ref T12733. Ref T8250. Test Plan: {F5003153} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12733, T8250 Differential Revision: https://secure.phabricator.com/D18129
This commit is contained in:
parent
b3b30dde6a
commit
9b93697d52
6 changed files with 72 additions and 33 deletions
|
@ -10,10 +10,10 @@ return array(
|
|||
'conpherence.pkg.css' => 'ff161f2d',
|
||||
'conpherence.pkg.js' => 'b5b51108',
|
||||
'core.pkg.css' => 'ab24402f',
|
||||
'core.pkg.js' => '1475bd91',
|
||||
'core.pkg.js' => '5d80e0db',
|
||||
'darkconsole.pkg.js' => '1f9a31bc',
|
||||
'differential.pkg.css' => '4ec4a37a',
|
||||
'differential.pkg.js' => 'a55a2c13',
|
||||
'differential.pkg.js' => 'd4ab0e81',
|
||||
'diffusion.pkg.css' => 'b93d9b8c',
|
||||
'diffusion.pkg.js' => '6134c5a1',
|
||||
'favicon.ico' => '30672e08',
|
||||
|
@ -396,12 +396,12 @@ return array(
|
|||
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
|
||||
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
|
||||
'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => 'd442be4a',
|
||||
'rsrc/js/application/diff/DiffChangesetList.js' => '79de07c6',
|
||||
'rsrc/js/application/diff/DiffInline.js' => '1bfa31c7',
|
||||
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
|
||||
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
|
||||
'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => '5e41c819',
|
||||
'rsrc/js/application/differential/behavior-populate.js' => '419998ab',
|
||||
'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d',
|
||||
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'c93358e3',
|
||||
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'd835b03a',
|
||||
|
@ -526,7 +526,7 @@ return array(
|
|||
'rsrc/js/phui/behavior-phui-submenu.js' => 'a6f7a73b',
|
||||
'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9',
|
||||
'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8',
|
||||
'rsrc/js/phuix/PHUIXActionView.js' => 'b3465b9b',
|
||||
'rsrc/js/phuix/PHUIXActionView.js' => '442efd08',
|
||||
'rsrc/js/phuix/PHUIXAutocomplete.js' => 'f6699267',
|
||||
'rsrc/js/phuix/PHUIXButtonView.js' => 'a37126bd',
|
||||
'rsrc/js/phuix/PHUIXDropdownMenu.js' => '8018ee50',
|
||||
|
@ -616,7 +616,7 @@ return array(
|
|||
'javelin-behavior-diff-preview-link' => '051c7832',
|
||||
'javelin-behavior-differential-diff-radios' => 'e1ff79b1',
|
||||
'javelin-behavior-differential-feedback-preview' => '51c5ad07',
|
||||
'javelin-behavior-differential-populate' => '5e41c819',
|
||||
'javelin-behavior-differential-populate' => '419998ab',
|
||||
'javelin-behavior-differential-user-select' => 'a8d8459d',
|
||||
'javelin-behavior-diffusion-browse-file' => '054a0f0b',
|
||||
'javelin-behavior-diffusion-commit-branches' => 'bdaf4d04',
|
||||
|
@ -775,7 +775,7 @@ return array(
|
|||
'phabricator-darkmessage' => 'c48cccdd',
|
||||
'phabricator-dashboard-css' => 'fe5b1869',
|
||||
'phabricator-diff-changeset' => '99abf4cd',
|
||||
'phabricator-diff-changeset-list' => 'd442be4a',
|
||||
'phabricator-diff-changeset-list' => '79de07c6',
|
||||
'phabricator-diff-inline' => '1bfa31c7',
|
||||
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
|
||||
'phabricator-draggable-list' => 'bea6e7f4',
|
||||
|
@ -878,7 +878,7 @@ return array(
|
|||
'phui-workcard-view-css' => 'cca5fa92',
|
||||
'phui-workpanel-view-css' => 'a3a63478',
|
||||
'phuix-action-list-view' => 'b5c256b8',
|
||||
'phuix-action-view' => 'b3465b9b',
|
||||
'phuix-action-view' => '442efd08',
|
||||
'phuix-autocomplete' => 'f6699267',
|
||||
'phuix-button-view' => 'a37126bd',
|
||||
'phuix-dropdown-menu' => '8018ee50',
|
||||
|
@ -1160,6 +1160,14 @@ return array(
|
|||
'javelin-workflow',
|
||||
'phabricator-draggable-list',
|
||||
),
|
||||
'419998ab' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'phabricator-tooltip',
|
||||
'phabricator-diff-changeset-list',
|
||||
'phabricator-diff-changeset',
|
||||
),
|
||||
42126667 => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1174,6 +1182,11 @@ return array(
|
|||
'javelin-workflow',
|
||||
'javelin-workboard-controller',
|
||||
),
|
||||
'442efd08' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
),
|
||||
'44959b73' => array(
|
||||
'javelin-util',
|
||||
'javelin-uri',
|
||||
|
@ -1335,14 +1348,6 @@ return array(
|
|||
'phabricator-phtize',
|
||||
'javelin-dom',
|
||||
),
|
||||
'5e41c819' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'phabricator-tooltip',
|
||||
'phabricator-diff-changeset-list',
|
||||
'phabricator-diff-changeset',
|
||||
),
|
||||
'5e9f347c' => array(
|
||||
'javelin-behavior',
|
||||
'multirow-row-manager',
|
||||
|
@ -1471,6 +1476,10 @@ return array(
|
|||
'javelin-behavior',
|
||||
'javelin-quicksand',
|
||||
),
|
||||
'79de07c6' => array(
|
||||
'javelin-install',
|
||||
'phuix-button-view',
|
||||
),
|
||||
'7a68dda3' => array(
|
||||
'owners-path-editor',
|
||||
'javelin-behavior',
|
||||
|
@ -1778,11 +1787,6 @@ return array(
|
|||
'javelin-uri',
|
||||
'javelin-request',
|
||||
),
|
||||
'b3465b9b' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
),
|
||||
'b3a4b884' => array(
|
||||
'javelin-behavior',
|
||||
'phabricator-prefab',
|
||||
|
@ -1987,10 +1991,6 @@ return array(
|
|||
'd254d646' => array(
|
||||
'javelin-util',
|
||||
),
|
||||
'd442be4a' => array(
|
||||
'javelin-install',
|
||||
'phuix-button-view',
|
||||
),
|
||||
'd4505101' => array(
|
||||
'javelin-stratcom',
|
||||
'javelin-install',
|
||||
|
|
|
@ -281,6 +281,12 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
->setTitle(pht('Diff %s', $target->getID()))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
|
||||
|
||||
$revision_id = $revision->getID();
|
||||
$inline_list_uri = "/revision/inlines/{$revision_id}/";
|
||||
$inline_list_uri = $this->getApplicationURI($inline_list_uri);
|
||||
$changeset_view->setInlineListURI($inline_list_uri);
|
||||
|
||||
if ($repository) {
|
||||
$changeset_view->setRepository($repository);
|
||||
}
|
||||
|
@ -574,12 +580,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-indent')
|
||||
->setHref("/differential/revision/inlines/{$revision_id}/")
|
||||
->setName(pht('List Inline Comments')));
|
||||
|
||||
$curtain->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-upload')
|
||||
|
|
|
@ -14,6 +14,7 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
private $standaloneURI;
|
||||
private $leftRawFileURI;
|
||||
private $rightRawFileURI;
|
||||
private $inlineListURI;
|
||||
|
||||
private $symbolIndexes = array();
|
||||
private $repository;
|
||||
|
@ -64,6 +65,15 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setInlineListURI($uri) {
|
||||
$this->inlineListURI = $uri;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getInlineListURI() {
|
||||
return $this->inlineListURI;
|
||||
}
|
||||
|
||||
public function setRepository(PhabricatorRepository $repository) {
|
||||
$this->repository = $repository;
|
||||
return $this;
|
||||
|
@ -208,6 +218,7 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
array(
|
||||
'changesetViewIDs' => $ids,
|
||||
'inlineURI' => $this->inlineURI,
|
||||
'inlineListURI' => $this->inlineListURI,
|
||||
'pht' => array(
|
||||
'Open in Editor' => pht('Open in Editor'),
|
||||
'Show All Context' => pht('Show All Context'),
|
||||
|
@ -285,6 +296,8 @@ final class DifferentialChangesetListView extends AphrontView {
|
|||
'Hide Older Inlines' => pht('Hide Older Inlines'),
|
||||
'Hide All Inlines' => pht('Hide All Inlines'),
|
||||
'Show All Inlines' => pht('Show All Inlines'),
|
||||
|
||||
'List Inline Comments' => pht('List Inline Comments'),
|
||||
),
|
||||
));
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ JX.install('DiffChangesetList', {
|
|||
|
||||
properties: {
|
||||
translations: null,
|
||||
inlineURI: null
|
||||
inlineURI: null,
|
||||
inlineListURI: null
|
||||
},
|
||||
|
||||
members: {
|
||||
|
@ -1649,6 +1650,20 @@ JX.install('DiffChangesetList', {
|
|||
|
||||
dropdown.listen('open', JX.bind(this, this._ondropdown));
|
||||
|
||||
var pht = this.getTranslations();
|
||||
|
||||
if (this.getInlineListURI()) {
|
||||
list.addItem(
|
||||
new JX.PHUIXActionView()
|
||||
.setDivider(true));
|
||||
|
||||
list.addItem(
|
||||
new JX.PHUIXActionView()
|
||||
.setIcon('fa-link')
|
||||
.setName(pht('List Inline Comments'))
|
||||
.setHref(this.getInlineListURI()));
|
||||
}
|
||||
|
||||
this._menuButton = button;
|
||||
this._dropdownMenu = dropdown;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,8 @@ JX.behavior('differential-populate', function(config, statics) {
|
|||
|
||||
var changeset_list = new JX.DiffChangesetList()
|
||||
.setTranslations(JX.phtize(config.pht))
|
||||
.setInlineURI(config.inlineURI);
|
||||
.setInlineURI(config.inlineURI)
|
||||
.setInlineListURI(config.inlineListURI);
|
||||
|
||||
// Install and activate the current page.
|
||||
var page_id = JX.Quicksand.getCurrentPageID();
|
||||
|
|
|
@ -16,6 +16,7 @@ JX.install('PHUIXActionView', {
|
|||
_label: false,
|
||||
_handler: null,
|
||||
_selected: false,
|
||||
_divider: false,
|
||||
|
||||
_iconNode: null,
|
||||
_nameNode: null,
|
||||
|
@ -41,6 +42,15 @@ JX.install('PHUIXActionView', {
|
|||
return this;
|
||||
},
|
||||
|
||||
setDivider: function(divider) {
|
||||
this._divider = divider;
|
||||
JX.DOM.alterClass(
|
||||
this.getNode(),
|
||||
'phabricator-action-view-type-divider',
|
||||
divider);
|
||||
return this;
|
||||
},
|
||||
|
||||
setSelected: function(selected) {
|
||||
this._selected = selected;
|
||||
JX.DOM.alterClass(
|
||||
|
|
Loading…
Reference in a new issue