Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15390487
D15767.id37988.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D15767.id37988.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => 'ce06b6f6',
+ 'core.pkg.css' => '31417876',
'core.pkg.js' => '37344f3c',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '7ba78475',
@@ -88,7 +88,7 @@
'rsrc/css/application/phortune/phortune-credit-card-form.css' => '8391eb02',
'rsrc/css/application/phortune/phortune.css' => '9149f103',
'rsrc/css/application/phrequent/phrequent.css' => 'ffc185ad',
- 'rsrc/css/application/phriction/phriction-document-css.css' => '55446c91',
+ 'rsrc/css/application/phriction/phriction-document-css.css' => '4282e4ad',
'rsrc/css/application/policy/policy-edit.css' => '815c66f7',
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
'rsrc/css/application/policy/policy.css' => '957ea14c',
@@ -104,7 +104,7 @@
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
'rsrc/css/application/uiexample/example.css' => '528b19de',
'rsrc/css/core/core.css' => 'd0801452',
- 'rsrc/css/core/remarkup.css' => '2c9ed46f',
+ 'rsrc/css/core/remarkup.css' => '6aae5360',
'rsrc/css/core/syntax.css' => '9fd11da8',
'rsrc/css/core/z-index.css' => '5b6fcf3f',
'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa',
@@ -777,7 +777,7 @@
'phabricator-object-selector-css' => '85ee8ce6',
'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => 'e67df814',
- 'phabricator-remarkup-css' => '2c9ed46f',
+ 'phabricator-remarkup-css' => '6aae5360',
'phabricator-search-results-css' => '7dea472c',
'phabricator-shaped-request' => '7cbe244b',
'phabricator-side-menu-view-css' => '3a3d9f41',
@@ -807,7 +807,7 @@
'phortune-credit-card-form-css' => '8391eb02',
'phortune-css' => '9149f103',
'phrequent-css' => 'ffc185ad',
- 'phriction-document-css' => '55446c91',
+ 'phriction-document-css' => '4282e4ad',
'phui-action-panel-css' => '91c7b835',
'phui-badge-view-css' => '3baef8db',
'phui-big-info-view-css' => 'bd903741',
diff --git a/src/applications/phriction/markup/PhrictionRemarkupRule.php b/src/applications/phriction/markup/PhrictionRemarkupRule.php
--- a/src/applications/phriction/markup/PhrictionRemarkupRule.php
+++ b/src/applications/phriction/markup/PhrictionRemarkupRule.php
@@ -107,6 +107,10 @@
$name = $spec['explicitName'];
$class = 'phriction-link';
+ // If the name is something meaningful to humans, we'll render this
+ // in text as: "Title" <link>. Otherwise, we'll just render: <link>.
+ $is_interesting_name = (bool)strlen($name);
+
if (idx($existant_documents, $link) === null) {
// The target document doesn't exist.
if ($name === null) {
@@ -127,6 +131,8 @@
$name = $visible_documents[$link]
->getContent()
->getTitle();
+
+ $is_interesting_name = true;
}
}
@@ -143,7 +149,12 @@
if ($this->getEngine()->getState('toc')) {
$text = $name;
} else if ($text_mode || $mail_mode) {
- return PhabricatorEnv::getProductionURI($href);
+ $href = PhabricatorEnv::getProductionURI($href);
+ if ($is_interesting_name) {
+ $text = pht('"%s" <%s>', $name, $href);
+ } else {
+ $text = pht('<%s>', $href);
+ }
} else {
if ($class === 'phriction-link-lock') {
$name = array(
@@ -164,8 +175,9 @@
'class' => $class,
),
$name);
- $this->getEngine()->overwriteStoredText($spec['token'], $text);
}
+
+ $this->getEngine()->overwriteStoredText($spec['token'], $text);
}
}
diff --git a/webroot/rsrc/css/application/phriction/phriction-document-css.css b/webroot/rsrc/css/application/phriction/phriction-document-css.css
--- a/webroot/rsrc/css/application/phriction/phriction-document-css.css
+++ b/webroot/rsrc/css/application/phriction/phriction-document-css.css
@@ -32,17 +32,3 @@
.phriction-history-nav-table td.nav-next {
text-align: right;
}
-
-.phui-document-content .phriction-link {
- font-weight: bold;
-}
-
-.phui-document-content .phriction-link-missing {
- font-weight: bold;
- color: {$red};
-}
-
-.phui-document-content .phriction-link-lock {
- font-weight: bold;
- color: {$greytext};
-}
diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css
--- a/webroot/rsrc/css/core/remarkup.css
+++ b/webroot/rsrc/css/core/remarkup.css
@@ -234,6 +234,18 @@
background: #ffaaaa;
}
+.phabricator-remarkup .phriction-link {
+ font-weight: bold;
+}
+
+.phabricator-remarkup .phriction-link-missing {
+ color: {$red};
+}
+
+.phabricator-remarkup .phriction-link-lock {
+ color: {$greytext};
+}
+
.phabricator-remarkup-mention-nopermission .phui-tag-core {
background: {$lightgreybackground};
color: {$lightgreytext};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 16 2025, 6:15 AM (5 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7332217
Default Alt Text
D15767.id37988.diff (4 KB)
Attached To
Mode
D15767: Fix Phriction document linking in mail bodies
Attached
Detach File
Event Timeline
Log In to Comment