Skip to content

Commit 285c4f9

Browse files
committed
Fix TagPanel from collapsing to < 60px when LP collapsed
Fixes element-hq#6133
1 parent e671472 commit 285c4f9

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ limitations under the License.
2323

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

2835
.mx_LeftPanel_hideButton {

0 commit comments

Comments
 (0)