Page MenuHomePhabricator

D12705.id30505.diff
No OneTemporary

D12705.id30505.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -10,7 +10,7 @@
'core.pkg.css' => 'ca3f6a60',
'core.pkg.js' => '3331b919',
'darkconsole.pkg.js' => 'e7393ebb',
- 'differential.pkg.css' => '13312972',
+ 'differential.pkg.css' => 'bb338e4b',
'differential.pkg.js' => '3cfa26f9',
'diffusion.pkg.css' => '591664fa',
'diffusion.pkg.js' => '0115b37c',
@@ -58,9 +58,9 @@
'rsrc/css/application/differential/add-comment.css' => 'c47f8c40',
'rsrc/css/application/differential/changeset-view.css' => 'e19cfd6e',
'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/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-list.css' => 'f3c47d33',
'rsrc/css/application/differential/table-of-contents.css' => '63f3ef4a',
@@ -530,7 +530,7 @@
'differential-inline-comment-editor' => '2529c82d',
'differential-results-table-css' => '181aa9d9',
'differential-revision-add-comment-css' => 'c47f8c40',
- 'differential-revision-comment-css' => '024dda6b',
+ 'differential-revision-comment-css' => '14b8565a',
'differential-revision-history-css' => '0e8eb855',
'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => '63f3ef4a',
@@ -795,7 +795,7 @@
'phui-image-mask-css' => '5a8b09c8',
'phui-info-panel-css' => '27ea50a1',
'phui-info-view-css' => 'c6f0aef8',
- 'phui-inline-comment-view-css' => 'df8fbd63',
+ 'phui-inline-comment-view-css' => '2174771a',
'phui-list-view-css' => '2e25ebfb',
'phui-object-box-css' => '7d160002',
'phui-object-item-list-view-css' => '9db65899',
diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
--- a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
+++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
@@ -71,8 +71,23 @@
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');
$inline = $this->inlineComment;
@@ -218,7 +233,7 @@
}
}
- $anchor_name = 'inline-'.$inline->getID();
+ $anchor_name = $this->getAnchorName();
if ($this->editable && !$this->preview) {
$edit_button = id(new PHUIButtonView())
diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
--- a/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
+++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
@@ -13,4 +13,8 @@
return $this;
}
+ public function getScaffoldCellID() {
+ return null;
+ }
+
}
diff --git a/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php b/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
--- a/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
+++ b/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
@@ -19,6 +19,7 @@
$attrs = array(
'colspan' => 3,
'class' => 'right3',
+ 'id' => $inline->getScaffoldCellID(),
);
$cells = array(
diff --git a/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php b/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php
--- a/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php
+++ b/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php
@@ -52,11 +52,13 @@
$left_attrs = array(
'class' => 'left',
+ 'id' => ($left_side ? $left_side->getScaffoldCellID() : null),
);
$right_attrs = array(
'colspan' => 3,
'class' => 'right3',
+ 'id' => ($right_side ? $right_side->getScaffoldCellID() : null),
);
$cells = array(
diff --git a/webroot/rsrc/css/application/differential/phui-inline-comment.css b/webroot/rsrc/css/application/differential/phui-inline-comment.css
--- a/webroot/rsrc/css/application/differential/phui-inline-comment.css
+++ b/webroot/rsrc/css/application/differential/phui-inline-comment.css
@@ -2,9 +2,8 @@
* @provides phui-inline-comment-view-css
*/
-.differential-comment-list .anchor-target {
- background-color: #ffffdd;
- border-color: #ffff00;
+.differential-diff td.anchor-target {
+ background: {$lightyellow};
}
/* In the document, the anchor is positioned inside the inline comment, but
diff --git a/webroot/rsrc/css/application/differential/revision-comment.css b/webroot/rsrc/css/application/differential/revision-comment.css
--- a/webroot/rsrc/css/application/differential/revision-comment.css
+++ b/webroot/rsrc/css/application/differential/revision-comment.css
@@ -2,10 +2,6 @@
* @provides differential-revision-comment-css
*/
-.differential-comment-list {
- margin: 0 16px;
-}
-
/* Spooky haunted panel which floats on the bottom of the screen.
Haunt modes are:

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 12:04 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726751
Default Alt Text
D12705.id30505.diff (5 KB)

Event Timeline