Merge pull request #2234 from matrix-org/bwindels/roomsectionfixcollapsedsize

Redesign: Fix room lists sizing
This commit is contained in:
Bruno Windels 2018-10-24 12:23:05 +00:00 committed by GitHub
commit 0038d6d219
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 2 deletions

View file

@ -48,10 +48,10 @@ limitations under the License.
.mx_LeftPanel {
background-color: $secondary-accent-color;
flex: 1;
position: relative;
overflow-x: hidden;
display: flex;
flex-direction: column;
min-height: 0;
}
.mx_LeftPanel .mx_AppTile_mini {

View file

@ -54,6 +54,7 @@ limitations under the License.
order: 2;
flex: 1;
min-height: 0;
}
.mx_MatrixChat_syncError {

View file

@ -21,6 +21,7 @@ limitations under the License.
/* use flexbox to layout sublists */
display: flex;
flex-direction: column;
min-height: 0;
}
/* hide resize handles next to collapsed / empty sublists */

View file

@ -344,7 +344,7 @@ const RoomSubList = React.createClass({
"mx_RoomSubList_nonEmpty": len && !this.state.hidden,
});
if (this.state.hidden) {
return <div className={subListClasses}>
return <div className={subListClasses} style={{flexBasis: "unset", flexGrow: "unset"}}>
{this._getHeaderJsx()}
</div>;
} else {

View file

@ -99,6 +99,7 @@ class Sizer {
class FlexSizer extends Sizer {
setItemSize(item, size) {
item.style.flexGrow = `0`;
item.style.flexBasis = `${Math.round(size)}px`;
}
}