Merge pull request #2234 from matrix-org/bwindels/roomsectionfixcollapsedsize
Redesign: Fix room lists sizing
This commit is contained in:
commit
0038d6d219
5 changed files with 5 additions and 2 deletions
|
@ -48,10 +48,10 @@ limitations under the License.
|
||||||
.mx_LeftPanel {
|
.mx_LeftPanel {
|
||||||
background-color: $secondary-accent-color;
|
background-color: $secondary-accent-color;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_LeftPanel .mx_AppTile_mini {
|
.mx_LeftPanel .mx_AppTile_mini {
|
||||||
|
|
|
@ -54,6 +54,7 @@ limitations under the License.
|
||||||
order: 2;
|
order: 2;
|
||||||
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MatrixChat_syncError {
|
.mx_MatrixChat_syncError {
|
||||||
|
|
|
@ -21,6 +21,7 @@ limitations under the License.
|
||||||
/* use flexbox to layout sublists */
|
/* use flexbox to layout sublists */
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hide resize handles next to collapsed / empty sublists */
|
/* hide resize handles next to collapsed / empty sublists */
|
||||||
|
|
|
@ -344,7 +344,7 @@ const RoomSubList = React.createClass({
|
||||||
"mx_RoomSubList_nonEmpty": len && !this.state.hidden,
|
"mx_RoomSubList_nonEmpty": len && !this.state.hidden,
|
||||||
});
|
});
|
||||||
if (this.state.hidden) {
|
if (this.state.hidden) {
|
||||||
return <div className={subListClasses}>
|
return <div className={subListClasses} style={{flexBasis: "unset", flexGrow: "unset"}}>
|
||||||
{this._getHeaderJsx()}
|
{this._getHeaderJsx()}
|
||||||
</div>;
|
</div>;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -99,6 +99,7 @@ class Sizer {
|
||||||
|
|
||||||
class FlexSizer extends Sizer {
|
class FlexSizer extends Sizer {
|
||||||
setItemSize(item, size) {
|
setItemSize(item, size) {
|
||||||
|
item.style.flexGrow = `0`;
|
||||||
item.style.flexBasis = `${Math.round(size)}px`;
|
item.style.flexBasis = `${Math.round(size)}px`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue