mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Remove some AphrontPanels
Summary: Removes AphrontPanelViews from UIExamples Test Plan: Tested new layouts in each of the pages. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7427 Differential Revision: https://secure.phabricator.com/D11947
This commit is contained in:
parent
5952b0a31b
commit
de13f39847
4 changed files with 26 additions and 25 deletions
|
@ -82,7 +82,8 @@ final class JavelinReactorUIExample extends PhabricatorUIExample {
|
|||
|
||||
$table = new AphrontTableView($rows);
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$panel->setHeaderText(pht('Example'));
|
||||
$panel->appendChild($table);
|
||||
|
||||
return $panel;
|
||||
|
|
|
@ -35,8 +35,10 @@ final class JavelinViewUIExample extends PhabricatorUIExample {
|
|||
$child_server_template->appendChild($child_client_template);
|
||||
$child_client_template->appendChild('Hey, it worked.');
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->appendChild($parent_server_template);
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$panel->setHeaderText(pht('Example'));
|
||||
$panel->appendChild(
|
||||
phutil_tag_div('ml', $parent_server_template));
|
||||
|
||||
return $panel;
|
||||
}
|
||||
|
|
|
@ -11,19 +11,19 @@ final class PhabricatorAphrontBarUIExample extends PhabricatorUIExample {
|
|||
}
|
||||
|
||||
public function renderExample() {
|
||||
$out = '';
|
||||
$out .= $this->renderTestThings('AphrontProgressBarView', 13, 10);
|
||||
$out .= $this->renderTestThings('AphrontGlyphBarView', 13, 10);
|
||||
$out .= $this->renderWeirdOrderGlyphBars();
|
||||
$out .= $this->renderAsciiStarBar();
|
||||
return phutil_safe_html($out);
|
||||
$out = array();
|
||||
$out[] = $this->renderTestThings('AphrontProgressBarView', 13, 10);
|
||||
$out[] = $this->renderTestThings('AphrontGlyphBarView', 13, 10);
|
||||
$out[] = $this->renderWeirdOrderGlyphBars();
|
||||
$out[] = $this->renderAsciiStarBar();
|
||||
return $out;
|
||||
}
|
||||
|
||||
private function wrap($title, $thing) {
|
||||
return id(new AphrontPanelView())
|
||||
->setHeader($title)
|
||||
->appendChild($thing)
|
||||
->render();
|
||||
$thing = phutil_tag_div('ml grouped', $thing);
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->appendChild($thing);
|
||||
}
|
||||
|
||||
private function renderTestThings($class, $max, $incr) {
|
||||
|
@ -34,9 +34,7 @@ final class PhabricatorAphrontBarUIExample extends PhabricatorUIExample {
|
|||
->setMax($max * $incr)
|
||||
->setCaption("{$ii} outta {$max} ain't bad!");
|
||||
}
|
||||
return $this->wrap(
|
||||
"Test {$class}",
|
||||
phutil_implode_html('', mpull($bars, 'render')));
|
||||
return $this->wrap("Test {$class}", $bars);
|
||||
}
|
||||
|
||||
private function renderWeirdOrderGlyphBars() {
|
||||
|
@ -50,26 +48,25 @@ final class PhabricatorAphrontBarUIExample extends PhabricatorUIExample {
|
|||
->setNumGlyphs(5)
|
||||
->setCaption("Lol score is {$index}/{$max}")
|
||||
->setGlyph(hsprintf('%s', 'LOL!'))
|
||||
->setBackgroundGlyph(hsprintf('%s', '____'))
|
||||
->render();
|
||||
->setBackgroundGlyph(hsprintf('%s', '____'));
|
||||
$views[] = hsprintf('<div style="clear:both;"></div>');
|
||||
}
|
||||
|
||||
return $this->wrap(
|
||||
'Glyph bars in weird order',
|
||||
phutil_implode_html('', $views));
|
||||
$views);
|
||||
}
|
||||
|
||||
private function renderAsciiStarBar() {
|
||||
return $this->wrap(
|
||||
'Ascii star glyph bar',
|
||||
id(new AphrontGlyphBarView())
|
||||
$bar = id(new AphrontGlyphBarView())
|
||||
->setValue(50)
|
||||
->setMax(100)
|
||||
->setCaption('Glyphs!')
|
||||
->setNumGlyphs(10)
|
||||
->setGlyph(hsprintf('%s', '*'))
|
||||
->render());
|
||||
->setGlyph(hsprintf('%s', '*'));
|
||||
|
||||
return $this->wrap(
|
||||
'Ascii star glyph bar', $bar);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ final class PhabricatorPagerUIExample extends PhabricatorUIExample {
|
|||
array(
|
||||
'Item',
|
||||
));
|
||||
$panel = new AphrontPanelView();
|
||||
$panel = new PHUIObjectBoxView();
|
||||
$panel->setHeaderText(pht('Example'));
|
||||
$panel->appendChild($table);
|
||||
|
||||
$panel->appendChild(hsprintf(
|
||||
|
|
Loading…
Reference in a new issue