mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 16:30:59 +01:00
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:
parent
a03527f440
commit
89fe35cb0e
9 changed files with 66 additions and 18 deletions
|
@ -44,8 +44,8 @@ return array(
|
|||
'rsrc/css/application/config/config-welcome.css' => '6abd79be',
|
||||
'rsrc/css/application/config/setup-issue.css' => '22270af2',
|
||||
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
|
||||
'rsrc/css/application/conpherence/durable-column.css' => 'e2011d85',
|
||||
'rsrc/css/application/conpherence/menu.css' => '2c1c727c',
|
||||
'rsrc/css/application/conpherence/durable-column.css' => 'caa12d4a',
|
||||
'rsrc/css/application/conpherence/menu.css' => 'beef0920',
|
||||
'rsrc/css/application/conpherence/message-pane.css' => '44154798',
|
||||
'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
|
||||
'rsrc/css/application/conpherence/update.css' => '1099a660',
|
||||
|
@ -514,8 +514,8 @@ return array(
|
|||
'changeset-view-manager' => '58562350',
|
||||
'config-options-css' => '7fedf08b',
|
||||
'config-welcome-css' => '6abd79be',
|
||||
'conpherence-durable-column-view' => 'e2011d85',
|
||||
'conpherence-menu-css' => '2c1c727c',
|
||||
'conpherence-durable-column-view' => 'caa12d4a',
|
||||
'conpherence-menu-css' => 'beef0920',
|
||||
'conpherence-message-pane-css' => '44154798',
|
||||
'conpherence-notification-css' => '04a6e10a',
|
||||
'conpherence-thread-manager' => 'bb928342',
|
||||
|
|
|
@ -40,6 +40,8 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication {
|
|||
'(?:query/(?P<queryKey>[^/]+)/)?' => 'ConpherenceRoomListController',
|
||||
'new/' => 'ConpherenceNewRoomController',
|
||||
),
|
||||
'search/(?:query/(?P<queryKey>[^/]+)/)?'
|
||||
=> 'ConpherenceRoomListController',
|
||||
'panel/' => 'ConpherenceNotificationPanelController',
|
||||
'widget/(?P<id>[1-9]\d*)/' => 'ConpherenceWidgetController',
|
||||
'update/(?P<id>[1-9]\d*)/' => 'ConpherenceUpdateController',
|
||||
|
|
|
@ -56,7 +56,7 @@ final class ConpherenceNewRoomController extends ConpherenceController {
|
|||
->execute();
|
||||
|
||||
$submit_uri = $this->getApplicationURI('room/new/');
|
||||
$cancel_uri = $this->getApplicationURI('room/');
|
||||
$cancel_uri = $this->getApplicationURI('search/');
|
||||
|
||||
$dialog = $this->newDialog()
|
||||
->setWidth(AphrontDialogView::WIDTH_FORM)
|
||||
|
|
|
@ -8,8 +8,7 @@ final class ConpherenceRoomListController extends ConpherenceController {
|
|||
$controller = id(new PhabricatorApplicationSearchController())
|
||||
->setQueryKey($request->getURIData('queryKey'))
|
||||
->setSearchEngine(
|
||||
id(new ConpherenceThreadSearchEngine())
|
||||
->setIsRooms(true))
|
||||
new ConpherenceThreadSearchEngine())
|
||||
->setNavigation($this->buildRoomsSideNavView());
|
||||
|
||||
return $this->delegateToController($controller);
|
||||
|
|
|
@ -67,11 +67,7 @@ final class ConpherenceThreadSearchEngine
|
|||
}
|
||||
|
||||
protected function getURI($path) {
|
||||
if ($this->isRooms) {
|
||||
return '/conpherence/room/'.$path;
|
||||
} else {
|
||||
// TODO - will need a path if / when "thread" search happens
|
||||
}
|
||||
return '/conpherence/search/'.$path;
|
||||
}
|
||||
|
||||
protected function getBuiltinQueryNames() {
|
||||
|
@ -83,7 +79,7 @@ final class ConpherenceThreadSearchEngine
|
|||
);
|
||||
|
||||
if ($this->requireViewer()->isLoggedIn()) {
|
||||
$names['participant'] = pht('Participated');
|
||||
$names['participant'] = pht('Joined Rooms');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -261,9 +261,28 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
),
|
||||
''));
|
||||
}
|
||||
$icons[] = $this->buildSearchButton();
|
||||
|
||||
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() {
|
||||
$conpherence = $this->getSelectedConpherence();
|
||||
|
||||
|
|
|
@ -144,13 +144,20 @@ final class ConpherenceThreadListView extends AphrontView {
|
|||
array $conpherences,
|
||||
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);
|
||||
|
||||
if (empty($conpherences)) {
|
||||
$join_item = id(new PHUIListItemView())
|
||||
->setType(PHUIListItemView::TYPE_LINK)
|
||||
->setHref('/conpherence/room/')
|
||||
->setHref('/conpherence/search/')
|
||||
->setName(pht('Join a Room'));
|
||||
$menu->addMenuItem($join_item);
|
||||
|
||||
|
|
|
@ -75,18 +75,30 @@
|
|||
|
||||
.conpherence-durable-column-icon-bar {
|
||||
height: 38px;
|
||||
padding: 4px 8px;
|
||||
padding: 4px;
|
||||
background-color: {$lightgreybackground};
|
||||
}
|
||||
|
||||
.conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon {
|
||||
float: left;
|
||||
display: block;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
margin: 0 4px 0 0;
|
||||
width: 34px;
|
||||
border: 2px solid transparent;
|
||||
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
|
||||
|
|
|
@ -47,6 +47,19 @@
|
|||
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 {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue