Conpherence - add application search in a few more places.

Summary: Ref T7584. In Conpherence main view, this adds a "search" link right in the "Rooms" header. This piece addresses an outstanding item on T7584. This diff also adds a search button in the durable column that takes you to the application search. This kind of a big product bet that rooms are going to be dominating things and its most useful to find another room quickly from this view. That said, I think the application search should get massaged slightly to allow searching threads and this won't be much of a trade off at all.

Test Plan: verified new search links took me to correct place and displayed reasonably.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7584

Differential Revision: https://secure.phabricator.com/D12215
This commit is contained in:
Bob Trahan
2015-03-30 16:25:24 -07:00
parent a03527f440
commit 89fe35cb0e
9 changed files with 66 additions and 18 deletions

View File

@@ -44,8 +44,8 @@ return array(
'rsrc/css/application/config/config-welcome.css' => '6abd79be', 'rsrc/css/application/config/config-welcome.css' => '6abd79be',
'rsrc/css/application/config/setup-issue.css' => '22270af2', 'rsrc/css/application/config/setup-issue.css' => '22270af2',
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', 'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
'rsrc/css/application/conpherence/durable-column.css' => 'e2011d85', 'rsrc/css/application/conpherence/durable-column.css' => 'caa12d4a',
'rsrc/css/application/conpherence/menu.css' => '2c1c727c', 'rsrc/css/application/conpherence/menu.css' => 'beef0920',
'rsrc/css/application/conpherence/message-pane.css' => '44154798', 'rsrc/css/application/conpherence/message-pane.css' => '44154798',
'rsrc/css/application/conpherence/notification.css' => '04a6e10a', 'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
'rsrc/css/application/conpherence/update.css' => '1099a660', 'rsrc/css/application/conpherence/update.css' => '1099a660',
@@ -514,8 +514,8 @@ return array(
'changeset-view-manager' => '58562350', 'changeset-view-manager' => '58562350',
'config-options-css' => '7fedf08b', 'config-options-css' => '7fedf08b',
'config-welcome-css' => '6abd79be', 'config-welcome-css' => '6abd79be',
'conpherence-durable-column-view' => 'e2011d85', 'conpherence-durable-column-view' => 'caa12d4a',
'conpherence-menu-css' => '2c1c727c', 'conpherence-menu-css' => 'beef0920',
'conpherence-message-pane-css' => '44154798', 'conpherence-message-pane-css' => '44154798',
'conpherence-notification-css' => '04a6e10a', 'conpherence-notification-css' => '04a6e10a',
'conpherence-thread-manager' => 'bb928342', 'conpherence-thread-manager' => 'bb928342',

View File

@@ -40,6 +40,8 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication {
'(?:query/(?P<queryKey>[^/]+)/)?' => 'ConpherenceRoomListController', '(?:query/(?P<queryKey>[^/]+)/)?' => 'ConpherenceRoomListController',
'new/' => 'ConpherenceNewRoomController', 'new/' => 'ConpherenceNewRoomController',
), ),
'search/(?:query/(?P<queryKey>[^/]+)/)?'
=> 'ConpherenceRoomListController',
'panel/' => 'ConpherenceNotificationPanelController', 'panel/' => 'ConpherenceNotificationPanelController',
'widget/(?P<id>[1-9]\d*)/' => 'ConpherenceWidgetController', 'widget/(?P<id>[1-9]\d*)/' => 'ConpherenceWidgetController',
'update/(?P<id>[1-9]\d*)/' => 'ConpherenceUpdateController', 'update/(?P<id>[1-9]\d*)/' => 'ConpherenceUpdateController',

View File

@@ -56,7 +56,7 @@ final class ConpherenceNewRoomController extends ConpherenceController {
->execute(); ->execute();
$submit_uri = $this->getApplicationURI('room/new/'); $submit_uri = $this->getApplicationURI('room/new/');
$cancel_uri = $this->getApplicationURI('room/'); $cancel_uri = $this->getApplicationURI('search/');
$dialog = $this->newDialog() $dialog = $this->newDialog()
->setWidth(AphrontDialogView::WIDTH_FORM) ->setWidth(AphrontDialogView::WIDTH_FORM)

View File

@@ -8,8 +8,7 @@ final class ConpherenceRoomListController extends ConpherenceController {
$controller = id(new PhabricatorApplicationSearchController()) $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($request->getURIData('queryKey')) ->setQueryKey($request->getURIData('queryKey'))
->setSearchEngine( ->setSearchEngine(
id(new ConpherenceThreadSearchEngine()) new ConpherenceThreadSearchEngine())
->setIsRooms(true))
->setNavigation($this->buildRoomsSideNavView()); ->setNavigation($this->buildRoomsSideNavView());
return $this->delegateToController($controller); return $this->delegateToController($controller);

View File

@@ -67,11 +67,7 @@ final class ConpherenceThreadSearchEngine
} }
protected function getURI($path) { protected function getURI($path) {
if ($this->isRooms) { return '/conpherence/search/'.$path;
return '/conpherence/room/'.$path;
} else {
// TODO - will need a path if / when "thread" search happens
}
} }
protected function getBuiltinQueryNames() { protected function getBuiltinQueryNames() {
@@ -83,7 +79,7 @@ final class ConpherenceThreadSearchEngine
); );
if ($this->requireViewer()->isLoggedIn()) { if ($this->requireViewer()->isLoggedIn()) {
$names['participant'] = pht('Participated'); $names['participant'] = pht('Joined Rooms');
} }
} }

View File

@@ -261,9 +261,28 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
), ),
'')); ''));
} }
$icons[] = $this->buildSearchButton();
return $icons; return $icons;
} }
private function buildSearchButton() {
return phutil_tag(
'div',
array(
'class' => 'conpherence-durable-column-search-button',
),
id(new PHUIButtonBarView())
->addButton(
id(new PHUIButtonView())
->setTag('a')
->setHref('/conpherence/search/')
->setColor(PHUIButtonView::GREY)
->setIcon(
id(new PHUIIconView())
->setIconFont('fa-search'))));
}
private function buildHeader() { private function buildHeader() {
$conpherence = $this->getSelectedConpherence(); $conpherence = $this->getSelectedConpherence();

View File

@@ -144,13 +144,20 @@ final class ConpherenceThreadListView extends AphrontView {
array $conpherences, array $conpherences,
array $policy_objects) { array $policy_objects) {
$header = $this->renderMenuItemHeader(pht('Rooms')); $header = $this->renderMenuItemHeader(
pht('Rooms'),
'conpherence-room-list-header');
$header->appendChild(
id(new PHUIIconView())
->setIconFont('fa-search')
->setHref('/conpherence/search/')
->setText(pht('Search')));
$menu->addMenuItem($header); $menu->addMenuItem($header);
if (empty($conpherences)) { if (empty($conpherences)) {
$join_item = id(new PHUIListItemView()) $join_item = id(new PHUIListItemView())
->setType(PHUIListItemView::TYPE_LINK) ->setType(PHUIListItemView::TYPE_LINK)
->setHref('/conpherence/room/') ->setHref('/conpherence/search/')
->setName(pht('Join a Room')); ->setName(pht('Join a Room'));
$menu->addMenuItem($join_item); $menu->addMenuItem($join_item);

View File

@@ -75,18 +75,30 @@
.conpherence-durable-column-icon-bar { .conpherence-durable-column-icon-bar {
height: 38px; height: 38px;
padding: 4px 8px; padding: 4px;
background-color: {$lightgreybackground}; background-color: {$lightgreybackground};
} }
.conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon { .conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon {
float: left; float: left;
display: block; display: block;
width: 34px;
height: 34px; height: 34px;
margin: 0 4px 0 0; width: 34px;
border: 2px solid transparent; border: 2px solid transparent;
border-radius: 3px; border-radius: 3px;
margin: 0 4px 0 0;
}
.conpherence-durable-column-icon-bar .conpherence-durable-column-search-button {
margin: 4px 0px 0px 0px;
}
.conpherence-durable-column-icon-bar .phui-button-bar {
}
.conpherence-durable-column-icon-bar .phui-button-bar a.button.has-icon {
height: 21px;
}
.conpherence-durable-column-icon-bar .phui-button-bar .button .phui-icon-view {
top: 8px;
} }
.conpherence-durable-column-icon-bar .conpherence-durable-column-icon-bar

View File

@@ -47,6 +47,19 @@
padding: 10px 0 9px 8px; padding: 10px 0 9px 8px;
} }
.conpherence-menu-pane .conpherence-room-list-header
.phui-icon-view {
font-weight: bold;
float: right;
text-transform: none;
margin: 0px 8px 0px 0px;
}
.conpherence-menu-pane .conpherence-room-list-header
.phui-icon-view:hover {
color: {$sky};
}
.conpherence-menu-pane .conpherence-message-list-header { .conpherence-menu-pane .conpherence-message-list-header {
margin-top: 12px; margin-top: 12px;
} }