mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Highlight cell when jumping to an inline comment
Summary: Fixes T8061. Test Plan: {F392321} Reviewers: chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T8061 Differential Revision: https://secure.phabricator.com/D12705
This commit is contained in:
parent
29feca3c1e
commit
9c7d1b0b90
7 changed files with 31 additions and 14 deletions
|
@ -10,7 +10,7 @@ return array(
|
||||||
'core.pkg.css' => 'ca3f6a60',
|
'core.pkg.css' => 'ca3f6a60',
|
||||||
'core.pkg.js' => '3331b919',
|
'core.pkg.js' => '3331b919',
|
||||||
'darkconsole.pkg.js' => 'e7393ebb',
|
'darkconsole.pkg.js' => 'e7393ebb',
|
||||||
'differential.pkg.css' => '13312972',
|
'differential.pkg.css' => 'bb338e4b',
|
||||||
'differential.pkg.js' => '3cfa26f9',
|
'differential.pkg.js' => '3cfa26f9',
|
||||||
'diffusion.pkg.css' => '591664fa',
|
'diffusion.pkg.css' => '591664fa',
|
||||||
'diffusion.pkg.js' => '0115b37c',
|
'diffusion.pkg.js' => '0115b37c',
|
||||||
|
@ -58,9 +58,9 @@ return array(
|
||||||
'rsrc/css/application/differential/add-comment.css' => 'c47f8c40',
|
'rsrc/css/application/differential/add-comment.css' => 'c47f8c40',
|
||||||
'rsrc/css/application/differential/changeset-view.css' => 'e19cfd6e',
|
'rsrc/css/application/differential/changeset-view.css' => 'e19cfd6e',
|
||||||
'rsrc/css/application/differential/core.css' => '7ac3cabc',
|
'rsrc/css/application/differential/core.css' => '7ac3cabc',
|
||||||
'rsrc/css/application/differential/phui-inline-comment.css' => 'df8fbd63',
|
'rsrc/css/application/differential/phui-inline-comment.css' => '2174771a',
|
||||||
'rsrc/css/application/differential/results-table.css' => '181aa9d9',
|
'rsrc/css/application/differential/results-table.css' => '181aa9d9',
|
||||||
'rsrc/css/application/differential/revision-comment.css' => '024dda6b',
|
'rsrc/css/application/differential/revision-comment.css' => '14b8565a',
|
||||||
'rsrc/css/application/differential/revision-history.css' => '0e8eb855',
|
'rsrc/css/application/differential/revision-history.css' => '0e8eb855',
|
||||||
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
|
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
|
||||||
'rsrc/css/application/differential/table-of-contents.css' => '63f3ef4a',
|
'rsrc/css/application/differential/table-of-contents.css' => '63f3ef4a',
|
||||||
|
@ -530,7 +530,7 @@ return array(
|
||||||
'differential-inline-comment-editor' => '2529c82d',
|
'differential-inline-comment-editor' => '2529c82d',
|
||||||
'differential-results-table-css' => '181aa9d9',
|
'differential-results-table-css' => '181aa9d9',
|
||||||
'differential-revision-add-comment-css' => 'c47f8c40',
|
'differential-revision-add-comment-css' => 'c47f8c40',
|
||||||
'differential-revision-comment-css' => '024dda6b',
|
'differential-revision-comment-css' => '14b8565a',
|
||||||
'differential-revision-history-css' => '0e8eb855',
|
'differential-revision-history-css' => '0e8eb855',
|
||||||
'differential-revision-list-css' => 'f3c47d33',
|
'differential-revision-list-css' => 'f3c47d33',
|
||||||
'differential-table-of-contents-css' => '63f3ef4a',
|
'differential-table-of-contents-css' => '63f3ef4a',
|
||||||
|
@ -795,7 +795,7 @@ return array(
|
||||||
'phui-image-mask-css' => '5a8b09c8',
|
'phui-image-mask-css' => '5a8b09c8',
|
||||||
'phui-info-panel-css' => '27ea50a1',
|
'phui-info-panel-css' => '27ea50a1',
|
||||||
'phui-info-view-css' => 'c6f0aef8',
|
'phui-info-view-css' => 'c6f0aef8',
|
||||||
'phui-inline-comment-view-css' => 'df8fbd63',
|
'phui-inline-comment-view-css' => '2174771a',
|
||||||
'phui-list-view-css' => '2e25ebfb',
|
'phui-list-view-css' => '2e25ebfb',
|
||||||
'phui-object-box-css' => '7d160002',
|
'phui-object-box-css' => '7d160002',
|
||||||
'phui-object-item-list-view-css' => '9db65899',
|
'phui-object-item-list-view-css' => '9db65899',
|
||||||
|
|
|
@ -71,8 +71,23 @@ final class PHUIDiffInlineCommentDetailView
|
||||||
return $this->objectOwnerPHID;
|
return $this->objectOwnerPHID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function getAnchorName() {
|
||||||
|
$inline = $this->inlineComment;
|
||||||
|
if ($inline->getID()) {
|
||||||
|
return 'inline-'.$inline->getID();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getScaffoldCellID() {
|
||||||
|
$anchor = $this->getAnchorName();
|
||||||
|
if ($anchor) {
|
||||||
|
return 'anchor-'.$anchor;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render() {
|
||||||
require_celerity_resource('phui-inline-comment-view-css');
|
require_celerity_resource('phui-inline-comment-view-css');
|
||||||
$inline = $this->inlineComment;
|
$inline = $this->inlineComment;
|
||||||
|
|
||||||
|
@ -218,7 +233,7 @@ final class PHUIDiffInlineCommentDetailView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$anchor_name = 'inline-'.$inline->getID();
|
$anchor_name = $this->getAnchorName();
|
||||||
|
|
||||||
if ($this->editable && !$this->preview) {
|
if ($this->editable && !$this->preview) {
|
||||||
$edit_button = id(new PHUIButtonView())
|
$edit_button = id(new PHUIButtonView())
|
||||||
|
|
|
@ -13,4 +13,8 @@ abstract class PHUIDiffInlineCommentView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getScaffoldCellID() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ final class PHUIDiffOneUpInlineCommentRowScaffold
|
||||||
$attrs = array(
|
$attrs = array(
|
||||||
'colspan' => 3,
|
'colspan' => 3,
|
||||||
'class' => 'right3',
|
'class' => 'right3',
|
||||||
|
'id' => $inline->getScaffoldCellID(),
|
||||||
);
|
);
|
||||||
|
|
||||||
$cells = array(
|
$cells = array(
|
||||||
|
|
|
@ -52,11 +52,13 @@ final class PHUIDiffTwoUpInlineCommentRowScaffold
|
||||||
|
|
||||||
$left_attrs = array(
|
$left_attrs = array(
|
||||||
'class' => 'left',
|
'class' => 'left',
|
||||||
|
'id' => ($left_side ? $left_side->getScaffoldCellID() : null),
|
||||||
);
|
);
|
||||||
|
|
||||||
$right_attrs = array(
|
$right_attrs = array(
|
||||||
'colspan' => 3,
|
'colspan' => 3,
|
||||||
'class' => 'right3',
|
'class' => 'right3',
|
||||||
|
'id' => ($right_side ? $right_side->getScaffoldCellID() : null),
|
||||||
);
|
);
|
||||||
|
|
||||||
$cells = array(
|
$cells = array(
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
* @provides phui-inline-comment-view-css
|
* @provides phui-inline-comment-view-css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.differential-comment-list .anchor-target {
|
.differential-diff td.anchor-target {
|
||||||
background-color: #ffffdd;
|
background: {$lightyellow};
|
||||||
border-color: #ffff00;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In the document, the anchor is positioned inside the inline comment, but
|
/* In the document, the anchor is positioned inside the inline comment, but
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
* @provides differential-revision-comment-css
|
* @provides differential-revision-comment-css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.differential-comment-list {
|
|
||||||
margin: 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Spooky haunted panel which floats on the bottom of the screen.
|
/* Spooky haunted panel which floats on the bottom of the screen.
|
||||||
Haunt modes are:
|
Haunt modes are:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue