Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18750026
D16533.id39784.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D16533.id39784.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -50,7 +50,7 @@
'rsrc/css/application/conpherence/notification.css' => '6cdcc253',
'rsrc/css/application/conpherence/transaction.css' => '2c71247c',
'rsrc/css/application/conpherence/update.css' => 'faf6be09',
- 'rsrc/css/application/conpherence/widget-pane.css' => 'c689f6a4',
+ 'rsrc/css/application/conpherence/widget-pane.css' => 'a131d5b6',
'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4',
'rsrc/css/application/countdown/timer.css' => '16c52f5c',
'rsrc/css/application/daemon/bulk-job.css' => 'df9c1d4a',
@@ -581,7 +581,7 @@
'conpherence-thread-manager' => '01774ab2',
'conpherence-transaction-css' => '2c71247c',
'conpherence-update-css' => 'faf6be09',
- 'conpherence-widget-pane-css' => 'c689f6a4',
+ 'conpherence-widget-pane-css' => 'a131d5b6',
'd3' => 'a11a5ff2',
'differential-changeset-view-css' => '9ef7d354',
'differential-core-view-css' => '5b7b8ff4',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2216,6 +2216,7 @@
'PhabricatorConpherenceNotificationsSetting' => 'applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php',
'PhabricatorConpherencePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorConpherencePreferencesSettingsPanel.php',
'PhabricatorConpherenceThreadPHIDType' => 'applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php',
+ 'PhabricatorConpherenceWidgetVisibleSetting' => 'applications/settings/setting/PhabricatorConpherenceWidgetVisibleSetting.php',
'PhabricatorConsoleApplication' => 'applications/console/application/PhabricatorConsoleApplication.php',
'PhabricatorConsoleContentSource' => 'infrastructure/contentsource/PhabricatorConsoleContentSource.php',
'PhabricatorContentSource' => 'infrastructure/contentsource/PhabricatorContentSource.php',
@@ -6973,6 +6974,7 @@
'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting',
'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorConpherenceThreadPHIDType' => 'PhabricatorPHIDType',
+ 'PhabricatorConpherenceWidgetVisibleSetting' => 'PhabricatorInternalSetting',
'PhabricatorConsoleApplication' => 'PhabricatorApplication',
'PhabricatorConsoleContentSource' => 'PhabricatorContentSource',
'PhabricatorContentSource' => 'Phobject',
diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php
--- a/src/applications/conpherence/controller/ConpherenceViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceViewController.php
@@ -12,6 +12,29 @@
protected function buildApplicationCrumbs() {
$crumbs = $this->buildConpherenceApplicationCrumbs();
$crumbs->setBorder(true);
+
+ $widget_key = PhabricatorConpherenceWidgetVisibleSetting::SETTINGKEY;
+ $user = $this->getViewer();
+ $widget_view = (bool)$user->getUserSetting($widget_key, false);
+
+ $divider = id(new PHUIListItemView())
+ ->setType(PHUIListItemView::TYPE_DIVIDER);
+ $crumbs->addAction($divider);
+
+ // How to save this?
+ $crumbs->addAction(
+ id(new PHUIListItemView())
+ ->setHref('#')
+ ->setIcon('fa-columns')
+ ->addSigil('jx-toggle-class')
+ ->addSigil('has-tooltip')
+ ->setMetaData(array(
+ 'tip' => pht('Toggle Widgets'),
+ 'map' => array(
+ 'conpherence-main-layout' => 'hide-widgets',
+ ),
+ )));
+
return $crumbs;
}
diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php
--- a/src/applications/conpherence/view/ConpherenceLayoutView.php
+++ b/src/applications/conpherence/view/ConpherenceLayoutView.php
@@ -55,12 +55,18 @@
return $this;
}
+ public function getWidgetColumnVisible() {
+ $widget_key = PhabricatorConpherenceWidgetVisibleSetting::SETTINGKEY;
+ $user = $this->getUser();
+ return (bool)$user->getUserSetting($widget_key, false);
+ }
+
public function render() {
require_celerity_resource('conpherence-menu-css');
require_celerity_resource('conpherence-message-pane-css');
require_celerity_resource('conpherence-widget-pane-css');
- $layout_id = celerity_generate_unique_node_id();
+ $layout_id = 'conpherence-main-layout';
$selected_id = null;
$selected_thread_id = null;
@@ -90,9 +96,13 @@
'hasWidgets' => false,
));
- $class = null;
+ $classes = array();
if (!$this->getUser()->isLoggedIn()) {
- $class = 'conpherence-logged-out';
+ $classes[] = 'conpherence-logged-out';
+ }
+
+ if (!$this->getWidgetColumnVisible()) {
+ $classes[] = 'hide-widgets';
}
$this->initBehavior(
@@ -105,7 +115,7 @@
'id' => $layout_id,
'sigil' => 'conpherence-layout',
'class' => 'conpherence-layout '.
- $class.
+ implode(' ', $classes).
' conpherence-role-'.$this->role,
),
array(
diff --git a/src/applications/settings/setting/PhabricatorConpherenceWidgetVisibleSetting.php b/src/applications/settings/setting/PhabricatorConpherenceWidgetVisibleSetting.php
new file mode 100644
--- /dev/null
+++ b/src/applications/settings/setting/PhabricatorConpherenceWidgetVisibleSetting.php
@@ -0,0 +1,12 @@
+<?php
+
+final class PhabricatorConpherenceWidgetVisibleSetting
+ extends PhabricatorInternalSetting {
+
+ const SETTINGKEY = 'conpherence-widget';
+
+ public function getSettingName() {
+ return pht('Conpherence Widget Pane Visible');
+ }
+
+}
diff --git a/webroot/rsrc/css/application/conpherence/widget-pane.css b/webroot/rsrc/css/application/conpherence/widget-pane.css
--- a/webroot/rsrc/css/application/conpherence/widget-pane.css
+++ b/webroot/rsrc/css/application/conpherence/widget-pane.css
@@ -190,3 +190,18 @@
width: 60px;
margin: 0 auto 0 auto;
}
+
+/****** Hide Widgets **********************************************************/
+
+.device-desktop .hide-widgets .conpherence-widget-pane {
+ display: none;
+}
+
+.device-desktop .hide-widgets .conpherence-message-pane,
+.device-desktop .hide-widgets .loading .messages-loading-mask,
+.device-desktop .hide-widgets .loading .messages-loading-icon,
+.device-desktop .hide-widgets .conpherence-no-threads,
+.device-desktop .hide-widgets .conpherence-message-pane .conpherence-messages,
+.device-desktop .hide-widgets .conpherence-message-pane .phui-form-view {
+ right: 0;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 5 2025, 6:11 AM (11 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9090299
Default Alt Text
D16533.id39784.diff (6 KB)
Attached To
Mode
D16533: Add a toggle, sticky pref, for Conpherence Widget Pane
Attached
Detach File
Event Timeline
Log In to Comment