diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2016-12-01 23:23:28 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-12-01 17:23:28 -0500 |
commit | c51afba71a8d4614f74709d5e9c432c2cff3fcf7 (patch) | |
tree | 8b2ad4586123c5a7bab8c44f91dd8eebbfaea674 /webapp/components/sidebar_header.jsx | |
parent | 8c18da21f3e51421a0dc6fbd4be1fa1e838dd482 (diff) | |
download | chat-c51afba71a8d4614f74709d5e9c432c2cff3fcf7.tar.gz chat-c51afba71a8d4614f74709d5e9c432c2cff3fcf7.tar.bz2 chat-c51afba71a8d4614f74709d5e9c432c2cff3fcf7.zip |
Add Team Description to the Team Settings (#4652)
* draft
* Add Team Description to the Team Settings
* add tooltips for team description
* made changes per PM review
* add message when there is no description set in the team
* squash
Diffstat (limited to 'webapp/components/sidebar_header.jsx')
-rw-r--r-- | webapp/components/sidebar_header.jsx | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/webapp/components/sidebar_header.jsx b/webapp/components/sidebar_header.jsx index cd41cfb84..a5fbd2659 100644 --- a/webapp/components/sidebar_header.jsx +++ b/webapp/components/sidebar_header.jsx @@ -69,6 +69,25 @@ export default class SidebarHeader extends React.Component { tutorialTip = createMenuTip(this.toggleDropdown); } + let teamNameWithToolTip = null; + if (this.props.teamDescription === '') { + teamNameWithToolTip = ( + <div className='team__name'>{this.props.teamDisplayName}</div> + ); + } else { + teamNameWithToolTip = ( + <OverlayTrigger + trigger={['hover', 'focus']} + delayShow={1000} + placement='bottom' + overlay={<Tooltip id='team-name__tooltip'>{this.props.teamDescription}</Tooltip>} + ref='descriptionOverlay' + > + <div className='team__name'>{this.props.teamDisplayName}</div> + </OverlayTrigger> + ); + } + return ( <div className='team__header theme'> {tutorialTip} @@ -79,15 +98,7 @@ export default class SidebarHeader extends React.Component { {profilePicture} <div className='header__info'> <div className='user__name'>{'@' + me.username}</div> - <OverlayTrigger - trigger={['hover', 'focus']} - delayShow={1000} - placement='bottom' - overlay={<Tooltip id='team-name__tooltip'>{this.props.teamDisplayName}</Tooltip>} - ref='descriptionOverlay' - > - <div className='team__name'>{this.props.teamDisplayName}</div> - </OverlayTrigger> + {teamNameWithToolTip} </div> </a> <SidebarHeaderDropdown @@ -104,10 +115,12 @@ export default class SidebarHeader extends React.Component { SidebarHeader.defaultProps = { teamDisplayName: '', + teamDescription: '', teamType: '' }; SidebarHeader.propTypes = { teamDisplayName: React.PropTypes.string, + teamDescription: React.PropTypes.string, teamName: React.PropTypes.string, teamType: React.PropTypes.string, currentUser: React.PropTypes.object |