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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user