@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

New NUX states for Conpherence

Summary: Roughly, if user isn't in any rooms, search for joinable ones. If no results, show big NUX banner.

Test Plan: Left all rooms, got fallback, joined room, left room. Create new instance, see new NUX. Set instance to public, visit Conpherence with and without public rooms.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16563

+73 -54
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => '1e8e5a40', 10 + 'conpherence.pkg.css' => '80a3fcb3', 11 11 'conpherence.pkg.js' => '89b4837e', 12 12 'core.pkg.css' => '476e9330', 13 13 'core.pkg.js' => '1d376fa9', ··· 48 48 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 49 49 'rsrc/css/application/conpherence/durable-column.css' => '194ac487', 50 50 'rsrc/css/application/conpherence/header-pane.css' => '517de9fe', 51 - 'rsrc/css/application/conpherence/menu.css' => '8344d122', 52 - 'rsrc/css/application/conpherence/message-pane.css' => 'c075e8fe', 51 + 'rsrc/css/application/conpherence/menu.css' => '78c7b811', 52 + 'rsrc/css/application/conpherence/message-pane.css' => '8d13ac4d', 53 53 'rsrc/css/application/conpherence/notification.css' => '6cdcc253', 54 54 'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56', 55 55 'rsrc/css/application/conpherence/transaction.css' => '46253e19', ··· 620 620 'config-page-css' => '8798e14f', 621 621 'conpherence-durable-column-view' => '194ac487', 622 622 'conpherence-header-pane-css' => '517de9fe', 623 - 'conpherence-menu-css' => '8344d122', 624 - 'conpherence-message-pane-css' => 'c075e8fe', 623 + 'conpherence-menu-css' => '78c7b811', 624 + 'conpherence-message-pane-css' => '8d13ac4d', 625 625 'conpherence-notification-css' => '6cdcc253', 626 626 'conpherence-participant-pane-css' => '7bba0b56', 627 627 'conpherence-thread-manager' => '01774ab2',
+1 -1
src/applications/conpherence/controller/ConpherenceViewController.php
··· 154 154 $button_text = pht('Send'); 155 155 } else if ($user->isLoggedIn()) { 156 156 $action = ConpherenceUpdateActions::JOIN_ROOM; 157 - $button_text = pht('Join'); 157 + $button_text = pht('Join Room'); 158 158 } else { 159 159 // user not logged in so give them a login button. 160 160 $login_href = id(new PhutilURI('/auth/start/'))
+55 -23
src/applications/conpherence/view/ConpherenceLayoutView.php
··· 72 72 $selected_thread_id = null; 73 73 $selected_thread_phid = null; 74 74 $can_edit_selected = null; 75 + $nux = null; 75 76 if ($this->thread) { 76 77 $selected_id = $this->thread->getPHID().'-nav-item'; 77 78 $selected_thread_id = $this->thread->getID(); ··· 80 81 $this->getUser(), 81 82 $this->thread, 82 83 PhabricatorPolicyCapability::CAN_EDIT); 84 + } else { 85 + $nux = $this->buildNUXView(); 83 86 } 84 87 $this->initBehavior('conpherence-menu', 85 88 array( ··· 146 149 'sigil' => 'conpherence-no-threads', 147 150 'style' => 'display: none;', 148 151 ), 149 - array( 150 - phutil_tag( 151 - 'div', 152 - array( 153 - 'class' => 'text', 154 - ), 155 - pht('You are not in any rooms yet.')), 156 - javelin_tag( 157 - 'a', 158 - array( 159 - 'href' => '/conpherence/search/', 160 - 'class' => 'button grey mlr', 161 - ), 162 - pht('Join a Room')), 163 - javelin_tag( 164 - 'a', 165 - array( 166 - 'href' => '/conpherence/new/', 167 - 'class' => 'button grey', 168 - 'sigil' => 'workflow', 169 - ), 170 - pht('Create a Room')), 171 - )), 152 + $nux), 172 153 javelin_tag( 173 154 'div', 174 155 array( ··· 222 203 )), 223 204 )), 224 205 )); 206 + } 207 + 208 + private function buildNUXView() { 209 + $viewer = $this->getViewer(); 210 + 211 + $engine = new ConpherenceThreadSearchEngine(); 212 + $engine->setViewer($viewer); 213 + $saved = $engine->buildSavedQueryFromBuiltin('all'); 214 + $query = $engine->buildQueryFromSavedQuery($saved); 215 + $pager = $engine->newPagerForSavedQuery($saved); 216 + $pager->setPageSize(10); 217 + $results = $engine->executeQuery($query, $pager); 218 + $view = $engine->renderResults($results, $saved); 219 + 220 + $create_button = id(new PHUIButtonView()) 221 + ->setTag('a') 222 + ->setText(pht('New Room')) 223 + ->setHref('/conpherence/new/') 224 + ->setWorkflow(true) 225 + ->setColor(PHUIButtonView::GREEN); 226 + 227 + if ($results) { 228 + $create_button->setIcon('fa-comments'); 229 + 230 + $header = id(new PHUIHeaderView()) 231 + ->setHeader(pht('Joinable Rooms')) 232 + ->addActionLink($create_button); 233 + 234 + $box = id(new PHUIObjectBoxView()) 235 + ->setHeader($header) 236 + ->setObjectList($view->getObjectList()); 237 + if ($viewer->isLoggedIn()) { 238 + $info = id(new PHUIInfoView()) 239 + ->appendChild(pht('You have not joined any rooms yet.')) 240 + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE); 241 + $box->setInfoView($info); 242 + } 243 + 244 + return $box; 245 + } else { 246 + 247 + $view = id(new PHUIBigInfoView()) 248 + ->setIcon('fa-comments') 249 + ->setTitle(pht('Welcome to Conpherence')) 250 + ->setDescription( 251 + pht('Conpherence lets you create public or private rooms to '. 252 + 'communicate with others.')) 253 + ->addAction($create_button); 254 + 255 + return $view; 256 + } 225 257 } 226 258 227 259 }
-21
webroot/rsrc/css/application/conpherence/menu.css
··· 11 11 background: #fff; 12 12 } 13 13 14 - .conpherence-layout .conpherence-no-threads { 15 - text-align: center; 16 - position: fixed; 17 - left: 240px; 18 - right: 240px; 19 - top: 76px; 20 - bottom: 0px; 21 - min-width: 300px; 22 - width: auto; 23 - } 24 - 25 - .device .conpherence-layout .conpherence-no-threads { 26 - left: 0; 27 - right: 0; 28 - width: 100%; 29 - } 30 - 31 - .conpherence-layout .conpherence-no-threads .text { 32 - margin: 0px 0px 16px 0px; 33 - } 34 - 35 14 .conpherence-menu-pane { 36 15 width: 100%; 37 16 position: absolute;
+12 -4
webroot/rsrc/css/application/conpherence/message-pane.css
··· 24 24 width: 100%; 25 25 } 26 26 27 - .conpherence-layout .conpherence-no-threads { 28 - text-align: center; 27 + .conpherence-layout .conpherence-content-pane .conpherence-no-threads { 28 + top: 44px; 29 + right: 0; 30 + background: #fff; 31 + z-index: 26; 29 32 } 30 33 31 - .conpherence-layout .conpherence-no-threads .text { 32 - margin: 16px 0px 16px 0px; 34 + .conpherence-layout .phui-big-info-view { 35 + margin: 16px; 36 + } 37 + 38 + .conpherence-layout .conpherence-no-threads .phui-box-border { 39 + border: none; 40 + margin: 0; 33 41 } 34 42 35 43 .conpherence-show-more-messages {