Skip to content

Commit 7aea7f9

Browse files
authored
Merge pull request element-hq#6134 from vector-im/luke/fix-tag-panel-collapse
Fix TagPanel from collapsing to < 60px when LP collapsed
2 parents a966cc7 + 9abda76 commit 7aea7f9

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

src/components/structures/LeftPanel.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,14 @@ var LeftPanel = React.createClass({
238238
}
239239
);
240240

241+
const containerClasses = classNames(
242+
"mx_LeftPanel_container",
243+
{ "mx_LeftPanel_container_collapsed": this.props.collapsed },
244+
);
245+
241246
return (
242247
<DragDropContext onDragEnd={this.onDragEnd}>
243-
<div className="mx_LeftPanel_container">
248+
<div className={containerClasses}>
244249
{ SettingsStore.isFeatureEnabled("feature_tag_panel") ? <TagPanel /> : <div /> }
245250
<aside className={classes} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
246251
{ topBox }

src/skins/vector/css/matrix-react-sdk/structures/_TagPanel.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ limitations under the License.
1515
*/
1616

1717
.mx_TagPanel {
18-
width: 60px;
18+
flex: 0 0 60px;
1919
background-color: $tertiary-accent-color;
2020
cursor: pointer;
2121

src/skins/vector/css/vector-web/structures/_LeftPanel.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ limitations under the License.
2323

2424
.mx_LeftPanel_container {
2525
display: flex;
26-
flex: 0 0 235px;
26+
flex: 0 0 295px;
27+
}
28+
29+
.mx_LeftPanel_container_collapsed {
30+
/* TagPanel 60px + Collapsed LeftPanel 60px */
31+
flex: 0 0 120px;
2732
}
2833

2934
.mx_LeftPanel_hideButton {

0 commit comments

Comments
 (0)