From 009e01c1b08d05bf3dee1dd9843d8e493a8a012b Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 14 Feb 2018 10:18:12 +0000 Subject: [PATCH] Fix LeftPanel size being incorrect when TagPanel disabled A previous PR (#6134) assumed that the TagPanel feature would always be enabled, leading to strangeness when it wasn't: #6136. (FTR the original layout bug was #6133) --- src/components/structures/LeftPanel.js | 10 ++++++++-- .../vector/css/vector-web/structures/_LeftPanel.scss | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index 0d9ab641..cf101669 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -238,15 +238,21 @@ var LeftPanel = React.createClass({ } ); + const tagPanelEnabled = SettingsStore.isFeatureEnabled("feature_tag_panel"); + const tagPanel = tagPanelEnabled ? :
; + const containerClasses = classNames( "mx_LeftPanel_container", - { "mx_LeftPanel_container_collapsed": this.props.collapsed }, + { + "mx_LeftPanel_container_collapsed": this.props.collapsed, + "mx_LeftPanel_container_hasTagPanel": tagPanelEnabled, + }, ); return (
- { SettingsStore.isFeatureEnabled("feature_tag_panel") ? :
} + { tagPanel }