1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Update typeahead for new UI

Summary: Uses modern UI, `newPage`, etc. Changes table behavior to always scroll if too large for container, can't find anything this breaks, but be on the lookout.

Test Plan: Pull up help and view pages, search for some people and projects.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15611
This commit is contained in:
Chad Little 2016-04-04 12:37:32 -07:00
parent 23979a05aa
commit 968a75b579
4 changed files with 24 additions and 20 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => '5de0f7af',
'core.pkg.css' => 'a3016dac',
'core.pkg.js' => 'e5484f37',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '7ba78475',
@ -25,7 +25,7 @@ return array(
'rsrc/css/aphront/notification.css' => '7f684b62',
'rsrc/css/aphront/panel-view.css' => '8427b78d',
'rsrc/css/aphront/phabricator-nav-view.css' => 'ac79a758',
'rsrc/css/aphront/table-view.css' => '036b6cdc',
'rsrc/css/aphront/table-view.css' => '9258e19f',
'rsrc/css/aphront/tokenizer.css' => '056da01b',
'rsrc/css/aphront/tooltip.css' => '1a07aea8',
'rsrc/css/aphront/typeahead-browse.css' => 'd8581d2c',
@ -526,7 +526,7 @@ return array(
'aphront-list-filter-view-css' => '5d6f0526',
'aphront-multi-column-view-css' => 'fd18389d',
'aphront-panel-view-css' => '8427b78d',
'aphront-table-view-css' => '036b6cdc',
'aphront-table-view-css' => '9258e19f',
'aphront-tokenizer-control-css' => '056da01b',
'aphront-tooltip-css' => '1a07aea8',
'aphront-typeahead-control-css' => 'd4f16145',

View file

@ -126,21 +126,18 @@ final class PhabricatorTypeaheadFunctionHelpController
$header = id(new PHUIHeaderView())
->setHeader($title);
$document = id(new PHUIDocumentView())
$document = id(new PHUIDocumentViewPro())
->setHeader($header)
->appendChild($content_box);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Function Help'));
$crumbs->setBorder(true);
return $this->buildApplicationPage(
array(
$crumbs,
$document,
),
array(
'title' => $title,
));
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild($document);
}
}

View file

@ -309,6 +309,7 @@ final class PhabricatorTypeaheadModularDatasourceController
$form_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Token Query'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form);
$table = new AphrontTableView($content);
@ -329,17 +330,24 @@ final class PhabricatorTypeaheadModularDatasourceController
$result_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Token Results (%s)', $class))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->appendChild($table);
return $this->buildApplicationPage(
array(
$title = pht('Typeahead Results');
$header = id(new PHUIHeaderView())
->setHeader($title);
$view = id(new PHUITwoColumnView())
->setHeader($header)
->setFooter(array(
$form_box,
$result_box,
),
array(
'title' => pht('Typeahead Results'),
'device' => false,
));
return $this->newPage()
->setTitle($title)
->appendChild($view);
}
}

View file

@ -2,8 +2,7 @@
* @provides aphront-table-view-css
*/
.device-phone .aphront-table-wrap,
.device-tablet .aphront-table-wrap {
.aphront-table-wrap {
overflow-x: auto;
}