1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Show the curent selected inline in the objective list

Summary: Ref T12733. When an inline is selected, make it stand out so you can see where you are in the document more clearly.

Test Plan: {F4968509}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12733

Differential Revision: https://secure.phabricator.com/D17982
This commit is contained in:
epriestley 2017-05-20 05:59:47 -07:00
parent e15009b76e
commit 7d44e7cb4d
3 changed files with 34 additions and 13 deletions

View file

@ -13,7 +13,7 @@ return array(
'core.pkg.js' => '599698a7',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '7d4cfa59',
'differential.pkg.js' => '886eadff',
'differential.pkg.js' => '1d120743',
'diffusion.pkg.css' => 'b93d9b8c',
'diffusion.pkg.js' => '84c8f8fd',
'favicon.ico' => '30672e08',
@ -391,8 +391,8 @@ 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' => 'cf4e2140',
'rsrc/js/application/diff/DiffChangesetList.js' => 'a716ca27',
'rsrc/js/application/diff/DiffInline.js' => '1478c3b2',
'rsrc/js/application/diff/DiffChangesetList.js' => '7a184082',
'rsrc/js/application/diff/DiffInline.js' => '19582231',
'rsrc/js/application/diff/ScrollObjective.js' => '7e8877e7',
'rsrc/js/application/diff/ScrollObjectiveList.js' => '6120e99a',
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
@ -778,8 +778,8 @@ return array(
'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869',
'phabricator-diff-changeset' => 'cf4e2140',
'phabricator-diff-changeset-list' => 'a716ca27',
'phabricator-diff-inline' => '1478c3b2',
'phabricator-diff-changeset-list' => '7a184082',
'phabricator-diff-inline' => '19582231',
'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4',
'phabricator-fatal-config-template-css' => '8f18fa41',
@ -981,9 +981,6 @@ return array(
'javelin-dom',
'javelin-typeahead-normalizer',
),
'1478c3b2' => array(
'javelin-dom',
),
'1499a8cb' => array(
'javelin-behavior',
'javelin-stratcom',
@ -1003,6 +1000,9 @@ return array(
'185bbd53' => array(
'javelin-install',
),
19582231 => array(
'javelin-dom',
),
'19f9369b' => array(
'phui-oi-list-view-css',
),
@ -1488,6 +1488,10 @@ return array(
'javelin-behavior',
'javelin-quicksand',
),
'7a184082' => array(
'javelin-install',
'phabricator-scroll-objective-list',
),
'7a68dda3' => array(
'owners-path-editor',
'javelin-behavior',
@ -1724,10 +1728,6 @@ return array(
'javelin-stratcom',
'javelin-dom',
),
'a716ca27' => array(
'javelin-install',
'phabricator-scroll-objective-list',
),
'a80d0378' => array(
'javelin-behavior',
'javelin-stratcom',

View file

@ -538,10 +538,24 @@ JX.install('DiffChangesetList', {
},
_setSelectionState: function(item, manager) {
this._cursorItem = item;
// If we had an inline selected before, we need to update it after
// changing our selection to clear the selected state. Then, update the
// new one to add the selected state.
var old_inline = this.getSelectedInline();
this._cursorItem = item;
this._redrawSelection(manager, true);
var new_inline = this.getSelectedInline();
if (old_inline) {
old_inline.updateObjective();
}
if (new_inline) {
new_inline.updateObjective();
}
return this;
},

View file

@ -250,6 +250,13 @@ JX.install('DiffInline', {
should_stack = true;
}
if (changeset.getChangesetList().getSelectedInline() === this) {
// TODO: Maybe add some other kind of effect here, since we're only
// using color to show this?
color = 'yellow';
}
objective
.setAnchor(anchor)
.setIcon(icon)