From a40f1933f2d6d8da0131656a37961fc9328e9c3d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 30 Oct 2018 18:13:17 +0100 Subject: [PATCH] put RightPanel as sibling of .mx_RoomView_body instead of RoomView --- res/css/structures/_RoomView.scss | 16 ++++++------- res/css/views/rooms/_MemberList.scss | 2 +- res/css/views/rooms/_RoomHeader.scss | 1 - src/components/structures/LoggedInView.js | 5 ---- src/components/structures/RoomView.js | 28 ++++++++++++++--------- 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/res/css/structures/_RoomView.scss b/res/css/structures/_RoomView.scss index 73167a49d8..c115f074b4 100644 --- a/res/css/structures/_RoomView.scss +++ b/res/css/structures/_RoomView.scss @@ -16,11 +16,7 @@ limitations under the License. .mx_RoomView { word-wrap: break-word; - position: relative; - display: flex; - width: 100%; - flex-direction: column; } @@ -56,8 +52,6 @@ limitations under the License. } .mx_RoomView_auxPanel { - order: 2; - min-width: 0px; width: 100%; margin: 0px auto; @@ -71,13 +65,17 @@ limitations under the License. } -.mx_RoomView_body { - order: 3; +.mx_RoomView .mx_MainSplit { flex: 1 1 0; - flex-direction: column; display: flex; } +.mx_RoomView_body { + display: flex; + flex-direction: column; + flex: 1; +} + .mx_RoomView_body .mx_RoomView_topUnreadMessagesBar { order: 1; } diff --git a/res/css/views/rooms/_MemberList.scss b/res/css/views/rooms/_MemberList.scss index 6ff0c4fa17..340954e5f6 100644 --- a/res/css/views/rooms/_MemberList.scss +++ b/res/css/views/rooms/_MemberList.scss @@ -24,7 +24,7 @@ limitations under the License. } .mx_MemberList .mx_Spinner { - flex: 0 0 auto; + flex: 1 0 auto; } .mx_MemberList_chevron { diff --git a/res/css/views/rooms/_RoomHeader.scss b/res/css/views/rooms/_RoomHeader.scss index 8b36517207..035df9a9cd 100644 --- a/res/css/views/rooms/_RoomHeader.scss +++ b/res/css/views/rooms/_RoomHeader.scss @@ -15,7 +15,6 @@ limitations under the License. */ .mx_RoomHeader { - order: 1; flex: 0 0 52px; border-bottom: 1px solid $primary-hairline-color; } diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 09502a3932..1c96f6bac1 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -418,7 +418,6 @@ const LoggedInView = React.createClass({ render: function() { const LeftPanel = sdk.getComponent('structures.LeftPanel'); - const RightPanel = sdk.getComponent('structures.RightPanel'); const RoomView = sdk.getComponent('structures.RoomView'); const UserSettings = sdk.getComponent('structures.UserSettings'); const RoomDirectory = sdk.getComponent('structures.RoomDirectory'); @@ -449,9 +448,6 @@ const LoggedInView = React.createClass({ collapsedRhs={this.props.collapseRhs} ConferenceHandler={this.props.ConferenceHandler} />; - if (!this.props.collapseRhs) { - right_panel = ; - } break; case PageTypes.UserSettings: @@ -562,7 +558,6 @@ const LoggedInView = React.createClass({
{ page_element }
- { right_panel } diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 4061dbc715..579aeb3454 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -43,6 +43,8 @@ const Rooms = require('../../Rooms'); import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../Keyboard'; +import MainSplit from './MainSplit'; +import RightPanel from './RightPanel'; import RoomViewStore from '../../stores/RoomViewStore'; import RoomScrollStateStore from '../../stores/RoomScrollStateStore'; import WidgetEchoStore from '../../stores/WidgetEchoStore'; @@ -1812,6 +1814,8 @@ module.exports = React.createClass({ }, ); + const rightPanel = this.state.room ? : undefined; + return (
-
- { auxPanel } - { topUnreadMessagesBar } - { messagePanel } - { searchResultsPanel } -
-
-
- { statusBar } + +
+ { auxPanel } + { topUnreadMessagesBar } + { messagePanel } + { searchResultsPanel } +
+
+
+ { statusBar } +
+ { messageComposer }
- { messageComposer } -
+
); },