@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.

Always show a menu on durable column

Summary: If you don't have any rooms, we currently show no menu and users have no logical means of closing the column. This lets "Hide Column" at least still appear. Fixes T9195

Test Plan: Fresh install, hit {key \}, see menu. Close Column.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9195

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

+90 -87
+6 -6
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => 'f03b9892', 10 + 'core.pkg.css' => '85a1b79a', 11 11 'core.pkg.js' => '1d376fa9', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '3fb7f532', ··· 32 32 'rsrc/css/aphront/typeahead.css' => 'd4f16145', 33 33 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 34 34 'rsrc/css/application/auth/auth.css' => '0877ed6e', 35 - 'rsrc/css/application/base/main-menu-view.css' => 'e862571a', 35 + 'rsrc/css/application/base/main-menu-view.css' => 'f03e17be', 36 36 'rsrc/css/application/base/notification-menu.css' => 'b3ab500d', 37 37 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 38 38 'rsrc/css/application/base/phui-theme.css' => '027ba77e', ··· 784 784 'phabricator-flag-css' => '5337623f', 785 785 'phabricator-keyboard-shortcut' => '1ae869f2', 786 786 'phabricator-keyboard-shortcut-manager' => '4a021c10', 787 - 'phabricator-main-menu-view' => 'e862571a', 787 + 'phabricator-main-menu-view' => 'f03e17be', 788 788 'phabricator-nav-view-css' => 'b29426e9', 789 789 'phabricator-notification' => 'ccf1cbf8', 790 790 'phabricator-notification-css' => '3f6c89c9', ··· 2094 2094 'e6e25838' => array( 2095 2095 'javelin-install', 2096 2096 ), 2097 - 'e862571a' => array( 2098 - 'phui-theme-css', 2099 - ), 2100 2097 'e9581f08' => array( 2101 2098 'javelin-behavior', 2102 2099 'javelin-stratcom', ··· 2131 2128 'javelin-util', 2132 2129 'javelin-workflow', 2133 2130 'javelin-json', 2131 + ), 2132 + 'f03e17be' => array( 2133 + 'phui-theme-css', 2134 2134 ), 2135 2135 'f411b6ae' => array( 2136 2136 'javelin-behavior',
+83 -81
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 141 141 'class' => implode(' ', $classes), 142 142 ), 143 143 $this->buildHeader()); 144 - $icon_bar = phutil_tag( 145 - 'div', 146 - array( 147 - 'class' => 'conpherence-durable-column-icon-bar', 148 - ), 149 - $this->buildIconBar()); 144 + 145 + $icon_bar = null; 146 + if ($this->conpherences) { 147 + $icon_bar = phutil_tag( 148 + 'div', 149 + array( 150 + 'class' => 'conpherence-durable-column-icon-bar', 151 + ), 152 + $this->buildIconBar()); 153 + } 150 154 151 155 $transactions = $this->buildTransactions(); 152 156 ··· 283 287 private function buildHeader() { 284 288 $conpherence = $this->getSelectedConpherence(); 285 289 286 - if (!$conpherence) { 290 + $bubble_id = celerity_generate_unique_node_id(); 291 + $dropdown_id = celerity_generate_unique_node_id(); 287 292 288 - $header = null; 289 - $settings_button = null; 290 - $settings_menu = null; 291 - 292 - } else { 293 - 294 - $bubble_id = celerity_generate_unique_node_id(); 295 - $dropdown_id = celerity_generate_unique_node_id(); 296 - 297 - $settings_list = new PHUIListView(); 298 - $header_actions = $this->getHeaderActionsConfig($conpherence); 299 - foreach ($header_actions as $action) { 300 - $settings_list->addMenuItem( 301 - id(new PHUIListItemView()) 302 - ->setHref($action['href']) 303 - ->setName($action['name']) 304 - ->setIcon($action['icon']) 305 - ->setDisabled($action['disabled']) 306 - ->addSigil('conpherence-durable-column-header-action') 307 - ->setMetadata(array( 308 - 'action' => $action['key'], 309 - ))); 310 - } 293 + $settings_list = new PHUIListView(); 294 + $header_actions = $this->getHeaderActionsConfig($conpherence); 295 + foreach ($header_actions as $action) { 296 + $settings_list->addMenuItem( 297 + id(new PHUIListItemView()) 298 + ->setHref($action['href']) 299 + ->setName($action['name']) 300 + ->setIcon($action['icon']) 301 + ->setDisabled($action['disabled']) 302 + ->addSigil('conpherence-durable-column-header-action') 303 + ->setMetadata(array( 304 + 'action' => $action['key'], 305 + ))); 306 + } 311 307 312 - $settings_menu = phutil_tag( 313 - 'div', 314 - array( 315 - 'id' => $dropdown_id, 316 - 'class' => 'phabricator-main-menu-dropdown phui-list-sidenav '. 317 - 'conpherence-settings-dropdown', 318 - 'sigil' => 'phabricator-notification-menu', 319 - 'style' => 'display: none', 320 - ), 321 - $settings_list); 308 + $settings_menu = phutil_tag( 309 + 'div', 310 + array( 311 + 'id' => $dropdown_id, 312 + 'class' => 'phabricator-main-menu-dropdown phui-list-sidenav '. 313 + 'conpherence-settings-dropdown', 314 + 'sigil' => 'phabricator-notification-menu', 315 + 'style' => 'display: none', 316 + ), 317 + $settings_list); 322 318 323 - Javelin::initBehavior( 324 - 'aphlict-dropdown', 325 - array( 326 - 'bubbleID' => $bubble_id, 327 - 'dropdownID' => $dropdown_id, 328 - 'local' => true, 329 - 'containerDivID' => 'conpherence-durable-column', 330 - )); 319 + Javelin::initBehavior( 320 + 'aphlict-dropdown', 321 + array( 322 + 'bubbleID' => $bubble_id, 323 + 'dropdownID' => $dropdown_id, 324 + 'local' => true, 325 + 'containerDivID' => 'conpherence-durable-column', 326 + )); 331 327 332 - $item = id(new PHUIListItemView()) 333 - ->setName(pht('Room Actions')) 334 - ->setIcon('fa-bars') 335 - ->addClass('core-menu-item') 336 - ->addSigil('conpherence-settings-menu') 337 - ->setID($bubble_id) 338 - ->setHref('#') 339 - ->setAural(pht('Room Actions')) 340 - ->setOrder(300); 341 - $settings_button = id(new PHUIListView()) 342 - ->addMenuItem($item) 343 - ->addClass('phabricator-dark-menu') 344 - ->addClass('phabricator-application-menu'); 328 + $item = id(new PHUIListItemView()) 329 + ->setName(pht('Room Actions')) 330 + ->setIcon('fa-bars') 331 + ->addClass('core-menu-item') 332 + ->addSigil('conpherence-settings-menu') 333 + ->setID($bubble_id) 334 + ->setHref('#') 335 + ->setAural(pht('Room Actions')) 336 + ->setOrder(300); 337 + $settings_button = id(new PHUIListView()) 338 + ->addMenuItem($item) 339 + ->addClass('phabricator-dark-menu') 340 + ->addClass('phabricator-application-menu'); 345 341 342 + $header = null; 343 + if ($conpherence) { 346 344 $data = $conpherence->getDisplayData($this->getUser()); 347 345 $header = phutil_tag( 348 346 'span', ··· 351 349 $this->getPolicyIcon($conpherence, $this->getPolicyObjects()), 352 350 $data['title'], 353 351 )); 354 - } 352 + } 355 353 356 354 return 357 355 phutil_tag( ··· 372 370 )); 373 371 } 374 372 375 - private function getHeaderActionsConfig(ConpherenceThread $conpherence) { 376 - $can_edit = PhabricatorPolicyFilter::hasCapability( 377 - $this->getUser(), 378 - $conpherence, 379 - PhabricatorPolicyCapability::CAN_EDIT); 373 + private function getHeaderActionsConfig($conpherence) { 380 374 381 - return array( 382 - array( 375 + $actions = array(); 376 + if ($conpherence) { 377 + $can_edit = PhabricatorPolicyFilter::hasCapability( 378 + $this->getUser(), 379 + $conpherence, 380 + PhabricatorPolicyCapability::CAN_EDIT); 381 + $actions[] = array( 383 382 'name' => pht('Add Participants'), 384 383 'disabled' => !$can_edit, 385 384 'href' => '/conpherence/update/'.$conpherence->getID().'/', 386 385 'icon' => 'fa-plus', 387 386 'key' => ConpherenceUpdateActions::ADD_PERSON, 388 - ), 389 - array( 387 + ); 388 + $actions[] = array( 390 389 'name' => pht('Edit Room'), 391 390 'disabled' => !$can_edit, 392 391 'href' => '/conpherence/update/'.$conpherence->getID().'/?nopic', 393 392 'icon' => 'fa-pencil', 394 393 'key' => ConpherenceUpdateActions::METADATA, 395 - ), 396 - array( 394 + ); 395 + $actions[] = array( 397 396 'name' => pht('View in Conpherence'), 398 397 'disabled' => false, 399 398 'href' => '/'.$conpherence->getMonogram(), 400 399 'icon' => 'fa-comments', 401 400 'key' => 'go_conpherence', 402 - ), 403 - array( 404 - 'name' => pht('Hide Column'), 405 - 'disabled' => false, 406 - 'href' => '#', 407 - 'icon' => 'fa-times', 408 - 'key' => 'hide_column', 409 - ), 401 + ); 402 + } 403 + 404 + $actions[] = array( 405 + 'name' => pht('Hide Column'), 406 + 'disabled' => false, 407 + 'href' => '#', 408 + 'icon' => 'fa-times', 409 + 'key' => 'hide_column', 410 410 ); 411 + 412 + return $actions; 411 413 } 412 414 413 415 private function buildTransactions() {
+1
webroot/rsrc/css/application/base/main-menu-view.css
··· 598 598 .phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-has-icon 599 599 .phui-list-item-href { 600 600 padding: 4px 40px 4px 12px; 601 + white-space: nowrap; 601 602 } 602 603 603 604 .phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-type-label