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

Rebuild Conpherence Participants Pane

Summary: Mostly quality of life in renames and moving everything to the view class. Minor CSS tweaks. Fix room handles getting added when adding a new user.

Test Plan: Add to room, remove from room.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+204 -216
+36 -36
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'conpherence.pkg.css' => 'a9b238ee', 11 - 'conpherence.pkg.js' => '5fafd1ff', 12 - 'core.pkg.css' => 'ee276281', 10 + 'conpherence.pkg.css' => '1e8e5a40', 11 + 'conpherence.pkg.js' => '89b4837e', 12 + 'core.pkg.css' => '476e9330', 13 13 'core.pkg.js' => '1d376fa9', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => '3fb7f532', ··· 51 51 'rsrc/css/application/conpherence/menu.css' => '8344d122', 52 52 'rsrc/css/application/conpherence/message-pane.css' => 'c075e8fe', 53 53 'rsrc/css/application/conpherence/notification.css' => '6cdcc253', 54 + 'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56', 54 55 'rsrc/css/application/conpherence/transaction.css' => '46253e19', 55 56 'rsrc/css/application/conpherence/update.css' => '53bc527a', 56 - 'rsrc/css/application/conpherence/widget-pane.css' => '827a21f1', 57 57 'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4', 58 58 'rsrc/css/application/countdown/timer.css' => '16c52f5c', 59 59 'rsrc/css/application/daemon/bulk-job.css' => 'df9c1d4a', ··· 110 110 'rsrc/css/core/core.css' => 'd0801452', 111 111 'rsrc/css/core/remarkup.css' => 'cd912f2c', 112 112 'rsrc/css/core/syntax.css' => '769d3498', 113 - 'rsrc/css/core/z-index.css' => 'a847e919', 113 + 'rsrc/css/core/z-index.css' => '0d4e5558', 114 114 'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa', 115 115 'rsrc/css/font/font-aleo.css' => '8bdb2835', 116 116 'rsrc/css/font/font-awesome.css' => '2b7ebbcc', ··· 439 439 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 440 440 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', 441 441 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'd3506890', 442 - 'rsrc/js/application/conpherence/behavior-menu.js' => '7a2f5952', 443 - 'rsrc/js/application/conpherence/behavior-participants-pane.js' => '08872fb7', 442 + 'rsrc/js/application/conpherence/behavior-menu.js' => '9eb55204', 443 + 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', 444 444 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 445 445 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', 446 446 'rsrc/js/application/conpherence/behavior-toggle-widget.js' => '9bdbbab0', ··· 623 623 'conpherence-menu-css' => '8344d122', 624 624 'conpherence-message-pane-css' => 'c075e8fe', 625 625 'conpherence-notification-css' => '6cdcc253', 626 + 'conpherence-participant-pane-css' => '7bba0b56', 626 627 'conpherence-thread-manager' => '01774ab2', 627 628 'conpherence-transaction-css' => '46253e19', 628 629 'conpherence-update-css' => '53bc527a', 629 - 'conpherence-widget-pane-css' => '827a21f1', 630 630 'd3' => 'a11a5ff2', 631 631 'differential-changeset-view-css' => '9ef7d354', 632 632 'differential-core-view-css' => '5b7b8ff4', ··· 668 668 'javelin-behavior-comment-actions' => '0300eae6', 669 669 'javelin-behavior-config-reorder-fields' => 'b6993408', 670 670 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', 671 - 'javelin-behavior-conpherence-menu' => '7a2f5952', 672 - 'javelin-behavior-conpherence-participants-pane' => '08872fb7', 671 + 'javelin-behavior-conpherence-menu' => '9eb55204', 672 + 'javelin-behavior-conpherence-participant-pane' => '8604caa8', 673 673 'javelin-behavior-conpherence-pontificate' => '21ba5861', 674 674 'javelin-behavior-countdown-timer' => 'e4cc26b3', 675 675 'javelin-behavior-dark-console' => 'f411b6ae', ··· 884 884 'phabricator-uiexample-reactor-select' => 'a155550f', 885 885 'phabricator-uiexample-reactor-sendclass' => '1def2711', 886 886 'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee', 887 - 'phabricator-zindex-css' => 'a847e919', 887 + 'phabricator-zindex-css' => '0d4e5558', 888 888 'phame-css' => '8efb0729', 889 889 'pholio-css' => 'ca89d380', 890 890 'pholio-edit-css' => '07676f51', ··· 1059 1059 'javelin-dom', 1060 1060 'javelin-stratcom', 1061 1061 'javelin-vector', 1062 - ), 1063 - '08872fb7' => array( 1064 - 'javelin-behavior', 1065 - 'javelin-dom', 1066 - 'javelin-stratcom', 1067 - 'javelin-workflow', 1068 - 'javelin-util', 1069 - 'phabricator-notification', 1070 - 'conpherence-thread-manager', 1071 1062 ), 1072 1063 '0a0b10e9' => array( 1073 1064 'javelin-behavior', ··· 1572 1563 'javelin-behavior', 1573 1564 'javelin-quicksand', 1574 1565 ), 1575 - '7a2f5952' => array( 1576 - 'javelin-behavior', 1577 - 'javelin-dom', 1578 - 'javelin-util', 1579 - 'javelin-stratcom', 1580 - 'javelin-workflow', 1581 - 'javelin-behavior-device', 1582 - 'javelin-history', 1583 - 'javelin-vector', 1584 - 'javelin-scrollbar', 1585 - 'phabricator-title', 1586 - 'phabricator-shaped-request', 1587 - 'conpherence-thread-manager', 1588 - ), 1589 1566 '7a68dda3' => array( 1590 1567 'owners-path-editor', 1591 1568 'javelin-behavior', ··· 1638 1615 ), 1639 1616 '85ee8ce6' => array( 1640 1617 'aphront-dialog-view-css', 1618 + ), 1619 + '8604caa8' => array( 1620 + 'javelin-behavior', 1621 + 'javelin-dom', 1622 + 'javelin-stratcom', 1623 + 'javelin-workflow', 1624 + 'javelin-util', 1625 + 'phabricator-notification', 1626 + 'conpherence-thread-manager', 1641 1627 ), 1642 1628 '8694b1df' => array( 1643 1629 'javelin-behavior', ··· 1760 1746 'javelin-util', 1761 1747 'javelin-workflow', 1762 1748 'javelin-stratcom', 1749 + ), 1750 + '9eb55204' => array( 1751 + 'javelin-behavior', 1752 + 'javelin-dom', 1753 + 'javelin-util', 1754 + 'javelin-stratcom', 1755 + 'javelin-workflow', 1756 + 'javelin-behavior-device', 1757 + 'javelin-history', 1758 + 'javelin-vector', 1759 + 'javelin-scrollbar', 1760 + 'phabricator-title', 1761 + 'phabricator-shaped-request', 1762 + 'conpherence-thread-manager', 1763 1763 ), 1764 1764 '9ef7d354' => array( 1765 1765 'phui-inline-comment-view-css', ··· 2309 2309 'conpherence-notification-css', 2310 2310 'conpherence-transaction-css', 2311 2311 'conpherence-update-css', 2312 - 'conpherence-widget-pane-css', 2312 + 'conpherence-participant-pane-css', 2313 2313 'conpherence-header-pane-css', 2314 2314 ), 2315 2315 'conpherence.pkg.js' => array( 2316 2316 'javelin-behavior-conpherence-drag-and-drop-photo', 2317 2317 'javelin-behavior-conpherence-menu', 2318 - 'javelin-behavior-conpherence-participants-pane', 2318 + 'javelin-behavior-conpherence-participant-pane', 2319 2319 'javelin-behavior-conpherence-pontificate', 2320 2320 'javelin-behavior-toggle-widget', 2321 2321 ),
+2 -2
resources/celerity/packages.php
··· 158 158 'conpherence-notification-css', 159 159 'conpherence-transaction-css', 160 160 'conpherence-update-css', 161 - 'conpherence-widget-pane-css', 161 + 'conpherence-participant-pane-css', 162 162 'conpherence-header-pane-css', 163 163 ), 164 164 'conpherence.pkg.js' => array( 165 165 'javelin-behavior-conpherence-drag-and-drop-photo', 166 166 'javelin-behavior-conpherence-menu', 167 - 'javelin-behavior-conpherence-participants-pane', 167 + 'javelin-behavior-conpherence-participant-pane', 168 168 'javelin-behavior-conpherence-pontificate', 169 169 'javelin-behavior-toggle-widget', 170 170 ),
+7 -42
src/applications/conpherence/controller/ConpherenceParticipantController.php
··· 13 13 if (!$conpherence_id) { 14 14 return new Aphront404Response(); 15 15 } 16 + 16 17 $conpherence = id(new ConpherenceThreadQuery()) 17 18 ->setViewer($viewer) 18 19 ->withIDs(array($conpherence_id)) 19 20 ->needWidgetData(true) 20 21 ->executeOne(); 22 + 21 23 if (!$conpherence) { 22 24 return new Aphront404Response(); 23 25 } 24 - $this->setConpherence($conpherence); 25 - $content = $this->renderParticipantPaneContent(); 26 26 27 - return id(new AphrontAjaxResponse())->setContent($content); 28 - } 29 - 30 - private function renderParticipantPaneContent() { 31 - $conpherence = $this->getConpherence(); 32 - 33 - $widgets = array(); 34 - $new_icon = id(new PHUIIconView()) 35 - ->setIcon('fa-plus-square') 36 - ->setHref($this->getUpdateURI()) 37 - ->setMetadata(array('widget' => null)) 38 - ->addSigil('conpherence-widget-adder'); 39 - 27 + $uri = $this->getApplicationURI('update/'.$conpherence->getID().'/'); 40 28 $content = id(new ConpherenceParticipantView()) 41 29 ->setUser($this->getViewer()) 42 - ->setConpherence($this->getConpherence()) 43 - ->setUpdateURI($this->getUpdateURI()); 30 + ->setConpherence($conpherence) 31 + ->setUpdateURI($uri); 44 32 45 - $widgets[] = phutil_tag( 46 - 'div', 47 - array( 48 - 'class' => 'widgets-header', 49 - ), 50 - id(new PHUIHeaderView()) 51 - ->setHeader(pht('Participants')) 52 - ->addActionItem($new_icon)); 33 + $content = array('widgets' => $content); 53 34 54 - $widgets[] = javelin_tag( 55 - 'div', 56 - array( 57 - 'class' => 'widgets-body', 58 - 'id' => 'widgets-people', 59 - 'sigil' => 'widgets-people', 60 - ), 61 - $content); 62 - 63 - // without this implosion we get "," between each element in our widgets 64 - // array 65 - return array('widgets' => phutil_implode_html('', $widgets)); 66 - } 67 - 68 - private function getUpdateURI() { 69 - $conpherence = $this->getConpherence(); 70 - return $this->getApplicationURI('update/'.$conpherence->getID().'/'); 35 + return id(new AphrontAjaxResponse())->setContent($content); 71 36 } 72 37 73 38 }
+5 -5
src/applications/conpherence/view/ConpherenceLayoutView.php
··· 64 64 public function render() { 65 65 require_celerity_resource('conpherence-menu-css'); 66 66 require_celerity_resource('conpherence-message-pane-css'); 67 - require_celerity_resource('conpherence-widget-pane-css'); 67 + require_celerity_resource('conpherence-participant-pane-css'); 68 68 69 69 $layout_id = 'conpherence-main-layout'; 70 70 ··· 105 105 $classes[] = 'hide-widgets'; 106 106 } 107 107 108 - $this->initBehavior('conpherence-participants-pane'); 108 + $this->initBehavior('conpherence-participant-pane'); 109 109 110 110 return javelin_tag( 111 111 'div', ··· 172 172 javelin_tag( 173 173 'div', 174 174 array( 175 - 'class' => 'conpherence-widget-pane', 176 - 'id' => 'conpherence-widget-pane', 177 - 'sigil' => 'conpherence-widget-pane', 175 + 'class' => 'conpherence-participant-pane', 176 + 'id' => 'conpherence-participant-pane', 177 + 'sigil' => 'conpherence-participant-pane', 178 178 ), 179 179 array( 180 180 phutil_tag(
+32 -14
src/applications/conpherence/view/ConpherenceParticipantView.php
··· 5 5 private $conpherence; 6 6 private $updateURI; 7 7 8 - public function setUpdateURI($update_uri) { 9 - $this->updateURI = $update_uri; 8 + public function setConpherence(ConpherenceThread $conpherence) { 9 + $this->conpherence = $conpherence; 10 10 return $this; 11 11 } 12 - public function getUpdateURI() { 13 - return $this->updateURI; 14 - } 15 12 16 - public function setConpherence(ConpherenceThread $conpherence) { 17 - $this->conpherence = $conpherence; 13 + public function setUpdateURI($uri) { 14 + $this->updateURI = $uri; 18 15 return $this; 19 16 } 20 - public function getConpherence() { 21 - return $this->conpherence; 22 - } 23 17 24 18 public function render() { 25 - $conpherence = $this->getConpherence(); 26 - $widget_data = $conpherence->getWidgetData(); 27 - $viewer = $this->getUser(); 19 + $conpherence = $this->conpherence; 20 + $viewer = $this->getViewer(); 28 21 29 22 $participants = $conpherence->getParticipants(); 23 + $count = new PhutilNumber(count($participants)); 30 24 $handles = $conpherence->getHandles(); 25 + $handles = array_intersect_key($handles, $participants); 31 26 $head_handles = array_select_keys($handles, array($viewer->getPHID())); 32 27 $handle_list = mpull($handles, 'getName'); 33 28 natcasesort($handle_list); ··· 88 83 )); 89 84 } 90 85 91 - return $body; 86 + $new_icon = id(new PHUIIconView()) 87 + ->setIcon('fa-plus-square') 88 + ->setHref($this->updateURI) 89 + ->setMetadata(array('widget' => null)) 90 + ->addSigil('conpherence-widget-adder'); 91 + 92 + $header = id(new PHUIHeaderView()) 93 + ->setHeader(pht('Participants (%d)', $count)) 94 + ->addClass('widgets-header') 95 + ->addActionItem($new_icon); 96 + 97 + $content = javelin_tag( 98 + 'div', 99 + array( 100 + 'class' => 'widgets-body', 101 + 'id' => 'widgets-people', 102 + 'sigil' => 'widgets-people', 103 + ), 104 + array( 105 + $header, 106 + $body, 107 + )); 108 + 109 + return $content; 92 110 } 93 111 94 112 }
+118
webroot/rsrc/css/application/conpherence/participant-pane.css
··· 1 + /** 2 + * @provides conpherence-participant-pane-css 3 + */ 4 + 5 + .conpherence-participant-pane { 6 + position: fixed; 7 + right: 0px; 8 + top: 103px; 9 + bottom: 0; 10 + width: 240px; 11 + border-width: 0 0 0 1px; 12 + border-color: {$thinblueborder}; 13 + border-style: solid; 14 + overflow-y: auto; 15 + -webkit-overflow-scrolling: touch; 16 + } 17 + 18 + .device .conpherence-participant-pane { 19 + background-color: {$page.background}; 20 + } 21 + 22 + .conpherence-participant-pane .aphront-form-input { 23 + margin: 0; 24 + width: 100%; 25 + } 26 + 27 + .conpherence-participant-pane .aphront-form-inset { 28 + border: 0; 29 + } 30 + 31 + .conpherence-participant-pane .widgets-header.phui-header-shell { 32 + padding: 8px 12px 6px; 33 + border: none; 34 + } 35 + 36 + .conpherence-participant-pane .widgets-header .phui-header-header { 37 + font-size: {$biggerfontsize}; 38 + } 39 + 40 + .conpherence-participant-pane .widgets-header .phui-icon-view.disabled { 41 + color: {$lightgreytext}; 42 + } 43 + 44 + .conpherence-participant-pane .widgets-body { 45 + position: fixed; 46 + overflow-y: auto; 47 + bottom: 0; 48 + top: 102px; 49 + width: 240px; 50 + } 51 + 52 + .conpherence-participant-pane .person-entry { 53 + padding: 4px 8px 4px 12px; 54 + } 55 + 56 + .conpherence-participant-pane .person-entry:hover { 57 + background-color: {$lightgreybackground}; 58 + } 59 + 60 + .conpherence-participant-pane .person-entry a { 61 + float: left; 62 + line-height: 22px; 63 + color: {$bluetext}; 64 + font-weight: bold; 65 + } 66 + 67 + .conpherence-participant-pane .person-entry:hover a { 68 + color: #000; 69 + } 70 + 71 + .conpherence-participant-pane .person-entry a img { 72 + height: 24px; 73 + width: 24px; 74 + border-radius: 3px; 75 + } 76 + 77 + .conpherence-participant-pane .person-entry .pic { 78 + float: left; 79 + width: 30px; 80 + } 81 + 82 + .conpherence-participant-pane .person-entry .remove { 83 + float: right; 84 + width: 20px; 85 + height: 20px; 86 + font-size: 18px; 87 + } 88 + 89 + .person-entry .remove:hover .phui-icon-view { 90 + color: {$red}; 91 + } 92 + 93 + .conpherence-participant-pane .person-entry .remove:hover { 94 + text-decoration: none; 95 + } 96 + 97 + .conpherence-participant-pane .person-entry .remove .close-icon { 98 + color: #bfbfbf; 99 + } 100 + 101 + .conpherence-participant-pane .person-entry .remove:hover .close-icon { 102 + color: #000; 103 + } 104 + 105 + /****** Hide Widgets **********************************************************/ 106 + 107 + .hide-widgets .conpherence-participant-pane { 108 + display: none; 109 + } 110 + 111 + .hide-widgets .conpherence-message-pane, 112 + .hide-widgets .loading .messages-loading-mask, 113 + .hide-widgets .loading .messages-loading-icon, 114 + .hide-widgets .conpherence-no-threads, 115 + .hide-widgets .conpherence-message-pane .conpherence-messages, 116 + .hide-widgets .conpherence-message-pane .phui-form-view { 117 + right: 0; 118 + }
-113
webroot/rsrc/css/application/conpherence/widget-pane.css
··· 1 - /** 2 - * @provides conpherence-widget-pane-css 3 - */ 4 - 5 - .conpherence-widget-pane { 6 - position: fixed; 7 - right: 0px; 8 - top: 103px; 9 - bottom: 0; 10 - width: 240px; 11 - border-width: 0 0 0 1px; 12 - border-color: {$lightblueborder}; 13 - border-style: solid; 14 - overflow-y: auto; 15 - -webkit-overflow-scrolling: touch; 16 - } 17 - 18 - .device .conpherence-widget-pane { 19 - background-color: {$page.background}; 20 - } 21 - 22 - .conpherence-widget-pane .aphront-form-input { 23 - margin: 0; 24 - width: 100%; 25 - } 26 - 27 - .conpherence-widget-pane .aphront-form-inset { 28 - border: 0; 29 - } 30 - 31 - .conpherence-widget-pane .widgets-header .phui-header-shell { 32 - padding: 6px 8px; 33 - } 34 - 35 - .conpherence-widget-pane .widgets-header .phui-header-header { 36 - font-size: {$biggerfontsize}; 37 - } 38 - 39 - .conpherence-widget-pane .widgets-header .phui-icon-view.disabled { 40 - color: {$lightgreytext}; 41 - } 42 - 43 - .conpherence-widget-pane .widgets-body { 44 - position: fixed; 45 - overflow-y: auto; 46 - bottom: 0; 47 - top: 144px; 48 - width: 240px; 49 - } 50 - 51 - .conpherence-widget-pane .person-entry { 52 - padding: 4px 4px 4px 8px; 53 - } 54 - 55 - .conpherence-widget-pane .person-entry:hover { 56 - background-color: {$lightgreybackground}; 57 - } 58 - 59 - .conpherence-widget-pane .person-entry a { 60 - float: left; 61 - font-weight: bold; 62 - line-height: 22px; 63 - color: {$darkbluetext}; 64 - } 65 - 66 - .conpherence-widget-pane .person-entry a img { 67 - height: 24px; 68 - width: 24px; 69 - border-radius: 3px; 70 - } 71 - 72 - .conpherence-widget-pane .person-entry .pic { 73 - float: left; 74 - width: 30px; 75 - } 76 - 77 - .conpherence-widget-pane .person-entry .remove { 78 - float: right; 79 - width: 20px; 80 - height: 20px; 81 - font-size: 18px; 82 - } 83 - 84 - .person-entry .remove:hover .phui-icon-view { 85 - color: {$red}; 86 - } 87 - 88 - .conpherence-widget-pane .person-entry .remove:hover { 89 - text-decoration: none; 90 - } 91 - 92 - .conpherence-widget-pane .person-entry .remove .close-icon { 93 - color: #bfbfbf; 94 - } 95 - 96 - .conpherence-widget-pane .person-entry .remove:hover .close-icon { 97 - color: #000; 98 - } 99 - 100 - /****** Hide Widgets **********************************************************/ 101 - 102 - .hide-widgets .conpherence-widget-pane { 103 - display: none; 104 - } 105 - 106 - .hide-widgets .conpherence-message-pane, 107 - .hide-widgets .loading .messages-loading-mask, 108 - .hide-widgets .loading .messages-loading-icon, 109 - .hide-widgets .conpherence-no-threads, 110 - .hide-widgets .conpherence-message-pane .conpherence-messages, 111 - .hide-widgets .conpherence-message-pane .phui-form-view { 112 - right: 0; 113 - }
+1 -1
webroot/rsrc/css/core/z-index.css
··· 150 150 z-index: 21; 151 151 } 152 152 153 - .conpherence-widget-pane { 153 + .conpherence-participant-pane { 154 154 z-index: 25; 155 155 } 156 156
+1 -1
webroot/rsrc/js/application/conpherence/behavior-menu.js
··· 231 231 232 232 function markWidgetLoading(loading) { 233 233 var root = JX.DOM.find(document, 'div', 'conpherence-layout'); 234 - var widgets_root = JX.DOM.find(root, 'div', 'conpherence-widget-pane'); 234 + var widgets_root = JX.DOM.find(root, 'div', 'conpherence-participant-pane'); 235 235 236 236 JX.DOM.alterClass(widgets_root, 'loading', loading); 237 237 }
+2 -2
webroot/rsrc/js/application/conpherence/behavior-participants-pane.js webroot/rsrc/js/application/conpherence/behavior-participant-pane.js
··· 6 6 * javelin-util 7 7 * phabricator-notification 8 8 * conpherence-thread-manager 9 - * @provides javelin-behavior-conpherence-participants-pane 9 + * @provides javelin-behavior-conpherence-participant-pane 10 10 */ 11 11 12 - JX.behavior('conpherence-participants-pane', function() { 12 + JX.behavior('conpherence-participant-pane', function() { 13 13 14 14 /** 15 15 * Generified adding new stuff to widgets technology!