From 1f9eb4db6ab4328e44c8587105eb005890052078 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 30 Jun 2016 05:04:37 +0500 Subject: Adding expand icon for RHS (#3386) * Adding expand icon for RHS Fixing errors Adding back getTeamInviteLink with better functionality for mobile Adding vertical align to post__link Updating improvements for expand RHS stuff * Improving transition on mobile * Removing irrelevant changes --- webapp/components/rhs_header_post.jsx | 101 ++++++++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 10 deletions(-) (limited to 'webapp/components/rhs_header_post.jsx') diff --git a/webapp/components/rhs_header_post.jsx b/webapp/components/rhs_header_post.jsx index 6e0d9276e..8e54016fb 100644 --- a/webapp/components/rhs_header_post.jsx +++ b/webapp/components/rhs_header_post.jsx @@ -3,6 +3,7 @@ import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; import Constants from 'utils/constants.jsx'; +import {Tooltip, OverlayTrigger} from 'react-bootstrap'; import * as GlobalActions from 'actions/global_actions.jsx'; import {FormattedMessage} from 'react-intl'; @@ -16,6 +17,7 @@ export default class RhsHeaderPost extends React.Component { super(props); this.handleClose = this.handleClose.bind(this); + this.toggleSize = this.toggleSize.bind(this); this.handleBack = this.handleBack.bind(this); this.state = {}; @@ -23,6 +25,11 @@ export default class RhsHeaderPost extends React.Component { handleClose(e) { e.preventDefault(); GlobalActions.emitCloseRightHandSide(); + this.props.shrink(); + } + toggleSize(e) { + e.preventDefault(); + this.props.toggleSize(); } handleBack(e) { e.preventDefault(); @@ -41,6 +48,42 @@ export default class RhsHeaderPost extends React.Component { } render() { let back; + const closeSidebarTooltip = ( + + + + ); + + const backToResultsTooltip = ( + + + + ); + + const expandSidebarTooltip = ( + + + + ); + + const shrinkSidebarTooltip = ( + + + + ); + if (this.props.fromSearch) { back = ( - + + + ); } @@ -62,14 +111,44 @@ export default class RhsHeaderPost extends React.Component { defaultMessage='Message Details' /> - +
+ + +
); } @@ -81,5 +160,7 @@ RhsHeaderPost.defaultProps = { }; RhsHeaderPost.propTypes = { isMentionSearch: React.PropTypes.bool, - fromSearch: React.PropTypes.string + fromSearch: React.PropTypes.string, + toggleSize: React.PropTypes.function, + shrink: React.PropTypes.function }; -- cgit v1.2.3-1-g7c22