Merge pull request #2298 from matrix-org/bwindels/makeroomsettingsusable

Redesign: temp solution to make room settings usable
This commit is contained in:
Bruno Windels 2018-11-27 11:09:11 +00:00 committed by GitHub
commit 31902b25b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 16 deletions

View file

@ -75,11 +75,6 @@ textarea {
transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out;
} }
.mx_fadable.mx_fadable_faded {
opacity: 0.3;
pointer-events: none;
}
/* XXX: critical hack to GeminiScrollbar to allow them to work in FF 42 and Chrome 48. /* XXX: critical hack to GeminiScrollbar to allow them to work in FF 42 and Chrome 48.
Stop the scrollbar view from pushing out the container's overall sizing, which causes Stop the scrollbar view from pushing out the container's overall sizing, which causes
flexbox to adapt to the new size and cause the view to keep growing. flexbox to adapt to the new size and cause the view to keep growing.

View file

@ -60,6 +60,16 @@ limitations under the License.
flex: 0 0 auto; flex: 0 0 auto;
} }
.mx_RoomView_auxPanel_fullHeight {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 3000;
background-color: $primary-bg-color;
}
.mx_RoomView_auxPanel_apps { .mx_RoomView_auxPanel_apps {
max-width: 1920px ! important; max-width: 1920px ! important;
} }
@ -71,6 +81,7 @@ limitations under the License.
} }
.mx_RoomView_body { .mx_RoomView_body {
position: relative; //for .mx_RoomView_auxPanel_fullHeight
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;

View file

@ -19,11 +19,6 @@ limitations under the License.
border-bottom: 1px solid $primary-hairline-color; border-bottom: 1px solid $primary-hairline-color;
} }
/* add 20px to the height of the header when editing */
.mx_RoomHeader_editing {
flex: 0 0 93px ! important;
}
.mx_RoomHeader_wrapper { .mx_RoomHeader_wrapper {
margin: auto; margin: auto;
height: 52px; height: 52px;
@ -37,7 +32,6 @@ limitations under the License.
.mx_RoomHeader_spinner { .mx_RoomHeader_spinner {
flex: 1; flex: 1;
height: 36px; height: 36px;
order: 2;
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
} }
@ -46,7 +40,6 @@ limitations under the License.
@mixin mx_DialogButton; @mixin mx_DialogButton;
margin-right: 8px; margin-right: 8px;
margin-top: -5px; margin-top: -5px;
order: 2;
} }
.mx_RoomHeader_textButton:hover { .mx_RoomHeader_textButton:hover {
@ -58,7 +51,6 @@ limitations under the License.
} }
.mx_RoomHeader_cancelButton { .mx_RoomHeader_cancelButton {
order: 2;
cursor: pointer; cursor: pointer;
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;

View file

@ -16,8 +16,7 @@ limitations under the License.
*/ */
.mx_RoomSettings { .mx_RoomSettings {
margin-left: 65px; margin: 40px;
margin-bottom: 20px;
} }
.mx_RoomSettings_upgradeButton, .mx_RoomSettings_upgradeButton,

View file

@ -1666,6 +1666,7 @@ module.exports = React.createClass({
const auxPanel = ( const auxPanel = (
<AuxPanel ref="auxPanel" room={this.state.room} <AuxPanel ref="auxPanel" room={this.state.room}
fullHeight={this.state.editingRoomSettings}
userId={MatrixClientPeg.get().credentials.userId} userId={MatrixClientPeg.get().credentials.userId}
conferenceHandler={this.props.ConferenceHandler} conferenceHandler={this.props.ConferenceHandler}
draggingFile={this.state.draggingFile} draggingFile={this.state.draggingFile}

View file

@ -23,6 +23,7 @@ import dis from "../../../dispatcher";
import ObjectUtils from '../../../ObjectUtils'; import ObjectUtils from '../../../ObjectUtils';
import AppsDrawer from './AppsDrawer'; import AppsDrawer from './AppsDrawer';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import classNames from 'classnames';
module.exports = React.createClass({ module.exports = React.createClass({
@ -51,6 +52,7 @@ module.exports = React.createClass({
// a callback which is called when the content of the aux panel changes // a callback which is called when the content of the aux panel changes
// content in a way that is likely to make it change size. // content in a way that is likely to make it change size.
onResize: PropTypes.func, onResize: PropTypes.func,
fullHeight: PropTypes.bool,
}, },
defaultProps: { defaultProps: {
@ -143,8 +145,17 @@ module.exports = React.createClass({
hide={this.props.hideAppsDrawer} hide={this.props.hideAppsDrawer}
/>; />;
const classes = classNames({
"mx_RoomView_auxPanel": true,
"mx_RoomView_auxPanel_fullHeight": this.props.fullHeight,
});
const style = {};
if (!this.props.fullHeight) {
style.maxHeight = this.props.maxHeight;
}
return ( return (
<div className="mx_RoomView_auxPanel" style={{maxHeight: this.props.maxHeight}} > <div className={classes} style={style} >
{ appsDrawer } { appsDrawer }
{ fileDropTarget } { fileDropTarget }
{ callView } { callView }