mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-13 16:21:07 +01:00
Use tags/links to show extended classes in Diviner, and fix a minor empty state thing
Summary: Ref T988. Show "Extends:" as linked tags. Fix the style of "This <top-level thing, like a class or function>" is not documented so it's the same as "This method is not documented.". Test Plan: Tags thing before: {F57557} Tags thing after: {F57558} Undoc before: {F57559} Undoc after: {F57560} Reviewers: chad Reviewed By: chad CC: aran Maniphest Tasks: T988 Differential Revision: https://secure.phabricator.com/D6910
This commit is contained in:
parent
c280634a7a
commit
0c95c6c4b8
3 changed files with 20 additions and 12 deletions
|
@ -1149,7 +1149,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'diviner-shared-css' =>
|
||||
array(
|
||||
'uri' => '/res/9c11bf88/rsrc/css/diviner/diviner-shared.css',
|
||||
'uri' => '/res/686727d1/rsrc/css/diviner/diviner-shared.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -254,9 +254,16 @@ final class DivinerAtomController extends DivinerController {
|
|||
|
||||
$lineage = $this->getExtendsLineage($symbol);
|
||||
if ($lineage) {
|
||||
$lineage = mpull($lineage, 'getName');
|
||||
$lineage = implode(' > ', $lineage);
|
||||
$view->addProperty(pht('Extends'), $lineage);
|
||||
$tags = array();
|
||||
foreach ($lineage as $item) {
|
||||
$tags[] = id(new PhabricatorTagView())
|
||||
->setType(PhabricatorTagView::TYPE_OBJECT)
|
||||
->setName($item->getName())
|
||||
->setHref($item->getURI());
|
||||
}
|
||||
|
||||
$tags = phutil_implode_html(" \xE2\x96\xB6 ", $tags);
|
||||
$view->addProperty(pht('Extends'), $tags);
|
||||
}
|
||||
|
||||
$implements = $this->getImplementsLineage($symbol);
|
||||
|
@ -581,12 +588,12 @@ final class DivinerAtomController extends DivinerController {
|
|||
$content);
|
||||
} else {
|
||||
$atom = $symbol->getAtom();
|
||||
$undoc = DivinerAtom::getThisAtomIsNotDocumentedString($atom->getType());
|
||||
$content = id(new PHUIBoxView())
|
||||
->addPadding(PHUI::PADDING_LARGE_LEFT)
|
||||
->addPadding(PHUI::PADDING_LARGE_BOTTOM)
|
||||
->addPadding(PHUI::PADDING_LARGE_RIGHT)
|
||||
->appendChild(hsprintf('<em>%s</em>', $undoc));
|
||||
$content = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'diviner-message-not-documented',
|
||||
),
|
||||
DivinerAtom::getThisAtomIsNotDocumentedString($atom->getType()));
|
||||
}
|
||||
|
||||
return $content;
|
||||
|
|
|
@ -65,9 +65,10 @@
|
|||
padding: 0 8px 16px 0;
|
||||
}
|
||||
|
||||
.diviner-document-section em {
|
||||
.diviner-message-not-documented {
|
||||
color: {$lightgreytext};
|
||||
text-decoration: italic;
|
||||
font-style: italic;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.diviner-method-implementation-header {
|
||||
|
|
Loading…
Reference in a new issue