From 009781dac7d221b9086600181797c1be37f0f6d6 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 15 Apr 2016 18:45:40 +0100 Subject: [PATCH] prep for RightPanel full collapse --- src/components/structures/RoomView.js | 11 +++++++++-- src/components/views/rooms/RoomHeader.js | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 934d22b039..966752268c 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -94,6 +94,9 @@ module.exports = React.createClass({ // ID of an event to highlight. If undefined, no event will be highlighted. // Typically this will either be the same as 'eventId', or undefined. highlightedEventId: React.PropTypes.string, + + // is the RightPanel collapsed? + rightPanelCollapsed: React.PropTypes.bool, }, getInitialState: function() { @@ -1214,7 +1217,11 @@ module.exports = React.createClass({ // We've got to this room by following a link, possibly a third party invite. return (
- +
- ); + ); } } diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index 9a60c6ad01..caf19e0b69 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -35,6 +35,7 @@ module.exports = React.createClass({ oobData: React.PropTypes.object, editing: React.PropTypes.bool, saving: React.PropTypes.bool, + rightPanelCollapsed: React.PropTypes.bool, onSettingsClick: React.PropTypes.func, onSaveClick: React.PropTypes.func, onSearchClick: React.PropTypes.func, @@ -264,6 +265,11 @@ module.exports = React.createClass({
; } + var rightPanel_buttons; + if (this.props.rightPanelCollapsed) { + // TODO: embed the RightPanel header in here if it's collapsed. + } + var right_row; if (!this.props.editing) { right_row = @@ -273,6 +279,7 @@ module.exports = React.createClass({
+ { rightPanel_buttons } ; }