Page MenuHomePhabricator

D11947.diff
No OneTemporary

D11947.diff

diff --git a/src/applications/uiexample/examples/JavelinReactorUIExample.php b/src/applications/uiexample/examples/JavelinReactorUIExample.php
--- a/src/applications/uiexample/examples/JavelinReactorUIExample.php
+++ b/src/applications/uiexample/examples/JavelinReactorUIExample.php
@@ -82,7 +82,8 @@
$table = new AphrontTableView($rows);
- $panel = new AphrontPanelView();
+ $panel = new PHUIObjectBoxView();
+ $panel->setHeaderText(pht('Example'));
$panel->appendChild($table);
return $panel;
diff --git a/src/applications/uiexample/examples/JavelinViewUIExample.php b/src/applications/uiexample/examples/JavelinViewUIExample.php
--- a/src/applications/uiexample/examples/JavelinViewUIExample.php
+++ b/src/applications/uiexample/examples/JavelinViewUIExample.php
@@ -35,8 +35,10 @@
$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;
}
diff --git a/src/applications/uiexample/examples/PhabricatorAphrontBarUIExample.php b/src/applications/uiexample/examples/PhabricatorAphrontBarUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorAphrontBarUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorAphrontBarUIExample.php
@@ -11,19 +11,19 @@
}
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 @@
->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 @@
->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);
}
}
diff --git a/src/applications/uiexample/examples/PhabricatorPagerUIExample.php b/src/applications/uiexample/examples/PhabricatorPagerUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorPagerUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorPagerUIExample.php
@@ -32,7 +32,8 @@
array(
'Item',
));
- $panel = new AphrontPanelView();
+ $panel = new PHUIObjectBoxView();
+ $panel->setHeaderText(pht('Example'));
$panel->appendChild($table);
$panel->appendChild(hsprintf(

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 21, 8:44 AM (18 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6625242
Default Alt Text
D11947.diff (4 KB)

Event Timeline