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

Allow Durable Column to be minimized

Summary: Add ability to minimize durable column

Test Plan:
Shrink and Grow, reload page, see stickyness...

{F1855051}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

authored by

Chad Little and committed by
chad
6d82fcc6 46f11a24

+165 -47
+16 -16
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => '4901ed78', 10 + 'conpherence.pkg.css' => 'b1547973', 11 11 'conpherence.pkg.js' => '11f3e07e', 12 12 'core.pkg.css' => '55d32e63', 13 - 'core.pkg.js' => '32939240', 13 + 'core.pkg.js' => '975d6a27', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => '3fb7f532', 16 16 'differential.pkg.js' => '634399e9', ··· 46 46 'rsrc/css/application/config/config-template.css' => '8f18fa41', 47 47 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 48 48 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 49 - 'rsrc/css/application/conpherence/durable-column.css' => '61f73db6', 49 + 'rsrc/css/application/conpherence/durable-column.css' => 'af11a2a7', 50 50 'rsrc/css/application/conpherence/header-pane.css' => '517de9fe', 51 51 'rsrc/css/application/conpherence/menu.css' => '78c7b811', 52 52 'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02', ··· 438 438 'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408', 439 439 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 440 440 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', 441 - 'rsrc/js/application/conpherence/behavior-durable-column.js' => '39e0ea32', 441 + 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e287689f', 442 442 'rsrc/js/application/conpherence/behavior-menu.js' => '9eb55204', 443 443 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', 444 444 'rsrc/js/application/conpherence/behavior-pontificate.js' => 'f2e58483', ··· 618 618 'conduit-api-css' => '7bc725c4', 619 619 'config-options-css' => '0ede4c9b', 620 620 'config-page-css' => '8798e14f', 621 - 'conpherence-durable-column-view' => '61f73db6', 621 + 'conpherence-durable-column-view' => 'af11a2a7', 622 622 'conpherence-header-pane-css' => '517de9fe', 623 623 'conpherence-menu-css' => '78c7b811', 624 624 'conpherence-message-pane-css' => '0d7dff02', ··· 699 699 'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc', 700 700 'javelin-behavior-doorkeeper-tag' => 'e5822781', 701 701 'javelin-behavior-drydock-live-operation-status' => '901935ef', 702 - 'javelin-behavior-durable-column' => '39e0ea32', 702 + 'javelin-behavior-durable-column' => 'e287689f', 703 703 'javelin-behavior-editengine-reorder-configs' => 'd7a74243', 704 704 'javelin-behavior-editengine-reorder-fields' => 'b59e1e96', 705 705 'javelin-behavior-error-log' => '6882e80a', ··· 1201 1201 'javelin-dom', 1202 1202 'javelin-workflow', 1203 1203 ), 1204 - '39e0ea32' => array( 1205 - 'javelin-behavior', 1206 - 'javelin-dom', 1207 - 'javelin-stratcom', 1208 - 'javelin-behavior-device', 1209 - 'javelin-scrollbar', 1210 - 'javelin-quicksand', 1211 - 'phabricator-keyboard-shortcut', 1212 - 'conpherence-thread-manager', 1213 - ), 1214 1204 '3ab51e2c' => array( 1215 1205 'javelin-behavior', 1216 1206 'javelin-behavior-device', ··· 2118 2108 'javelin-behavior', 2119 2109 'javelin-stratcom', 2120 2110 'javelin-dom', 2111 + ), 2112 + 'e287689f' => array( 2113 + 'javelin-behavior', 2114 + 'javelin-dom', 2115 + 'javelin-stratcom', 2116 + 'javelin-behavior-device', 2117 + 'javelin-scrollbar', 2118 + 'javelin-quicksand', 2119 + 'phabricator-keyboard-shortcut', 2120 + 'conpherence-thread-manager', 2121 2121 ), 2122 2122 'e292eaf4' => array( 2123 2123 'javelin-install',
+2
src/__phutil_library_map__.php
··· 2213 2213 'PhabricatorConfigValidationException' => 'applications/config/exception/PhabricatorConfigValidationException.php', 2214 2214 'PhabricatorConfigVersionController' => 'applications/config/controller/PhabricatorConfigVersionController.php', 2215 2215 'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.php', 2216 + 'PhabricatorConpherenceColumnMinimizeSetting' => 'applications/settings/setting/PhabricatorConpherenceColumnMinimizeSetting.php', 2216 2217 'PhabricatorConpherenceColumnVisibleSetting' => 'applications/settings/setting/PhabricatorConpherenceColumnVisibleSetting.php', 2217 2218 'PhabricatorConpherenceNotificationsSetting' => 'applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php', 2218 2219 'PhabricatorConpherencePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorConpherencePreferencesSettingsPanel.php', ··· 6981 6982 'PhabricatorConfigValidationException' => 'Exception', 6982 6983 'PhabricatorConfigVersionController' => 'PhabricatorConfigController', 6983 6984 'PhabricatorConpherenceApplication' => 'PhabricatorApplication', 6985 + 'PhabricatorConpherenceColumnMinimizeSetting' => 'PhabricatorInternalSetting', 6984 6986 'PhabricatorConpherenceColumnVisibleSetting' => 'PhabricatorInternalSetting', 6985 6987 'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting', 6986 6988 'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
+31 -5
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 7 7 private $selectedConpherence; 8 8 private $transactions; 9 9 private $visible; 10 + private $minimize; 10 11 private $initialLoad = false; 11 12 private $policyObjects; 12 13 private $quicksandConfig = array(); ··· 59 60 return $this->visible; 60 61 } 61 62 63 + public function setMinimize($minimize) { 64 + $this->minimize = $minimize; 65 + return $this; 66 + } 67 + 68 + public function getMinimize() { 69 + return $this->minimize; 70 + } 71 + 62 72 public function setInitialLoad($bool) { 63 73 $this->initialLoad = $bool; 64 74 return $this; ··· 109 119 110 120 protected function getTagContent() { 111 121 $column_key = PhabricatorConpherenceColumnVisibleSetting::SETTINGKEY; 122 + $minimize_key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; 112 123 113 124 Javelin::initBehavior( 114 125 'durable-column', 115 126 array( 116 127 'visible' => $this->getVisible(), 117 - 'settingsURI' => '/settings/adjust/?key='.$column_key, 128 + 'minimize' => $this->getMinimize(), 129 + 'visibleURI' => '/settings/adjust/?key='.$column_key, 130 + 'minimizeURI' => '/settings/adjust/?key='.$minimize_key, 118 131 'quicksandConfig' => $this->getQuicksandConfig(), 119 132 )); 120 133 ··· 131 144 'div', 132 145 array( 133 146 'class' => implode(' ', $classes), 147 + 'data-sigil' => 'conpherence-minimize-window', 134 148 ), 135 149 $this->buildHeader()); 136 150 ··· 284 298 'containerDivID' => 'conpherence-durable-column', 285 299 )); 286 300 287 - $item = id(new PHUIListItemView()) 301 + $bars = id(new PHUIListItemView()) 288 302 ->setName(pht('Room Actions')) 289 - ->setIcon('fa-bars') 303 + ->setIcon('fa-gear') 290 304 ->addClass('core-menu-item') 305 + ->addClass('conpherence-settings-icon') 291 306 ->addSigil('conpherence-settings-menu') 292 307 ->setID($bubble_id) 293 308 ->setHref('#') 294 309 ->setAural(pht('Room Actions')) 310 + ->setOrder(400); 311 + 312 + $minimize = id(new PHUIListItemView()) 313 + ->setName(pht('Minimize Window')) 314 + ->setIcon('fa-toggle-down') 315 + ->addClass('core-menu-item') 316 + ->addClass('conpherence-minimize-icon') 317 + ->addSigil('conpherence-minimize-window') 318 + ->setHref('#') 319 + ->setAural(pht('Minimize Window')) 295 320 ->setOrder(300); 321 + 296 322 $settings_button = id(new PHUIListView()) 297 - ->addMenuItem($item) 298 - ->addClass('phabricator-dark-menu') 323 + ->addMenuItem($bars) 324 + ->addMenuItem($minimize) 299 325 ->addClass('phabricator-application-menu'); 300 326 301 327 $header = null;
+12
src/applications/settings/setting/PhabricatorConpherenceColumnMinimizeSetting.php
··· 1 + <?php 2 + 3 + final class PhabricatorConpherenceColumnMinimizeSetting 4 + extends PhabricatorInternalSetting { 5 + 6 + const SETTINGKEY = 'conpherence-minimize-column'; 7 + 8 + public function getSettingName() { 9 + return pht('Conpherence Column Minimize'); 10 + } 11 + 12 + }
+10
src/view/page/PhabricatorStandardPageView.php
··· 136 136 return (bool)$this->getUserPreference($column_key, false); 137 137 } 138 138 139 + public function getDurableColumnMinimize() { 140 + $column_key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; 141 + return (bool)$this->getUserPreference($column_key, false); 142 + } 143 + 139 144 public function addQuicksandConfig(array $config) { 140 145 $this->quicksandConfig = $config + $this->quicksandConfig; 141 146 return $this; ··· 480 485 $durable_column = null; 481 486 if ($this->getShowDurableColumn()) { 482 487 $is_visible = $this->getDurableColumnVisible(); 488 + $is_minimize = $this->getDurableColumnMinimize(); 483 489 $durable_column = id(new ConpherenceDurableColumnView()) 484 490 ->setSelectedConpherence(null) 485 491 ->setUser($user) 486 492 ->setQuicksandConfig($this->buildQuicksandConfig()) 487 493 ->setVisible($is_visible) 494 + ->setMinimize($is_minimize) 488 495 ->setInitialLoad(true); 496 + if ($is_minimize) { 497 + $this->classes[] = 'minimize-column'; 498 + } 489 499 } 490 500 491 501 Javelin::initBehavior('quicksand-blacklist', array(
+76 -25
webroot/rsrc/css/application/conpherence/durable-column.css
··· 13 13 width: 400px; 14 14 height: 360px; 15 15 background: #fff; 16 + border-top-right-radius: 3px; 17 + border-top-left-radius: 3px; 16 18 box-shadow: 0px 1px 8px rgba(55,55,55, .3); 17 19 } 18 20 ··· 38 40 z-index: 1; 39 41 } 40 42 41 - .conpherence-durable-column-header .phabricator-application-menu { 42 - display: block; 43 - float: right; 44 - padding-right: 4px; 45 - width: 36px; 46 - } 47 - 48 - .conpherence-durable-column-header .phabricator-application-menu 49 - .phui-list-item-view.core-menu-item { 50 - display: block; 51 - } 52 - 53 43 .conpherence-durable-column-header .phabricator-application-menu 54 44 .phui-list-item-name { 55 45 display: none; ··· 57 47 58 48 .conpherence-durable-column-header .phabricator-application-menu 59 49 .phui-list-item-view { 60 - float: left; 61 - position: relative; 62 - width: 30px; 63 - height: 30px; 64 - margin-top: 2px; 50 + margin: 0; 51 + width: 28px; 52 + height: 34px; 53 + min-width: 28px; 65 54 } 66 55 67 56 .conpherence-durable-column-header .phabricator-application-menu ··· 69 58 background: transparent; 70 59 border: none; 71 60 padding: 0; 72 - } 73 - 74 - .conpherence-durable-column-header .phabricator-application-menu 75 - .phui-list-item-view.core-menu-item { 76 - display: block; 77 61 } 78 62 79 63 .conpherence-durable-column-header { ··· 82 66 background-color: #525867; 83 67 } 84 68 69 + .conpherence-durable-column-header:hover { 70 + cursor: pointer; 71 + background-color: #5f6572; 72 + } 73 + 74 + .conpherence-durable-column-header .phabricator-application-menu { 75 + margin-right: 8px; 76 + } 77 + 85 78 .conpherence-durable-column-header 86 79 .phabricator-main-menu-dropdown.phui-list-sidenav { 87 80 top: 30px; ··· 100 93 101 94 .conpherence-durable-column-header .phabricator-application-menu 102 95 .phui-list-item-icon.phui-font-fa { 103 - font-size: 14px; 104 - margin: 8px 10px; 96 + font-size: 15px; 97 + margin: 0; 98 + height: 15px; 99 + width: 15px; 100 + padding: 10px 8px 10px 8px; 105 101 } 106 102 107 103 .conpherence-durable-column-header-text .phui-icon-view { ··· 274 270 box-shadow: none; 275 271 } 276 272 277 - .conpherence-durable-column-footer { 273 + 274 + /* Minimized Column */ 275 + 276 + .minimize-column .conpherence-durable-column { 277 + height: 32px; 278 + width: 240px; 279 + box-shadow: none; 280 + } 281 + 282 + .minimize-column .conpherence-durable-column .conpherence-durable-column-body { 278 283 display: none; 279 284 } 285 + 286 + .minimize-column .conpherence-durable-column 287 + .conpherence-durable-column-header { 288 + background-color: rgba({$alphablue},.15); 289 + } 290 + 291 + .minimize-column .conpherence-durable-column 292 + .conpherence-durable-column-header:hover { 293 + background-color: rgba({$alphablue},.2); 294 + } 295 + 296 + .minimize-column .conpherence-durable-column 297 + .conpherence-durable-column-header-text { 298 + width: 100px; 299 + color: {$darkbluetext}; 300 + text-shadow: none; 301 + } 302 + 303 + .minimize-column .conpherence-durable-column 304 + .conpherence-durable-column-header-text .phui-icon-view { 305 + color: {$darkbluetext}; 306 + text-shadow: none; 307 + } 308 + 309 + .minimize-column .conpherence-durable-column 310 + .conpherence-durable-column-header .phabricator-application-menu 311 + .phui-list-item-icon.phui-font-fa { 312 + color: {$bluetext}; 313 + } 314 + 315 + .minimize-column .conpherence-durable-column 316 + .conpherence-durable-column-header .phabricator-application-menu 317 + .phui-list-item-icon.phui-font-fa:hover { 318 + color: {$darkbluetext}; 319 + } 320 + 321 + .minimize-column .conpherence-durable-column 322 + .conpherence-durable-column-header .phabricator-application-menu 323 + .phui-list-item-icon.phui-font-fa:before { 324 + content: "\f151"; 325 + } 326 + 327 + .minimize-column .conpherence-durable-column .phabricator-application-menu 328 + .conpherence-settings-icon { 329 + display: none; 330 + }
+18 -1
webroot/rsrc/js/application/conpherence/behavior-durable-column.js
··· 25 25 } 26 26 27 27 var userVisible = config.visible; 28 + var userMinimize = config.minimize; 28 29 var show = null; 29 30 var loadThreadID = null; 30 31 var scrollbar = null; ··· 54 55 userVisible = !userVisible; 55 56 _updateColumnVisibility(); 56 57 57 - new JX.Request(config.settingsURI) 58 + new JX.Request(config.visibleURI) 58 59 .setData({value: (show ? 1 : 0)}) 59 60 .send(); 60 61 } 61 62 63 + function _minimizeColumn(e) { 64 + e.kill(); 65 + userMinimize = !userMinimize; 66 + JX.DOM.alterClass(document.body, 'minimize-column', userMinimize); 67 + JX.Stratcom.invoke('resize'); 68 + 69 + new JX.Request(config.minimizeURI) 70 + .setData({value: (userMinimize ? 1 : 0)}) 71 + .send(); 72 + } 73 + 62 74 function _drawColumn(visible) { 63 75 JX.DOM.alterClass( 64 76 document.body, ··· 80 92 new JX.KeyboardShortcut('\\', 'Toggle Conpherence Column') 81 93 .setHandler(_toggleColumn) 82 94 .register(); 95 + 96 + JX.Stratcom.listen( 97 + 'click', 98 + 'conpherence-minimize-window', 99 + _minimizeColumn); 83 100 84 101 scrollbar = new JX.Scrollbar(_getColumnScrollNode()); 85 102