From bfae88e60c7a623afae82e06ce1421ca778c06e7 Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Date: Fri, 17 Mar 2017 17:19:54 +0500
Subject: Ui improvements (#5755)

* PLT-5816 - Flagged posts tooltip fix

* PLT-5766 - Link previews appearing outside the box

* PLT-5795 - Fixing alignment user list in channel

* PLT-5818 - Reset password error not aligned

* PLT-5837 - Adjusting image preview max height

* PLT-5778 - Updating word break for paragraphs

* PLT-5848 - Updating label for file error

* PLT-5846 - Markdown tables extra border on mobile

* PLT-5662 - Pinned post UI improvement

* Fixing eslint error

* Updating tooltip eslint issue

* PLT-5832 - Removing error styling on labels
---
 webapp/components/channel_header.jsx | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

(limited to 'webapp/components/channel_header.jsx')

diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index 3d7ec000c..120846b8d 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -241,7 +241,10 @@ export default class ChannelHeader extends React.Component {
         );
 
         const flaggedTooltip = (
-            <Tooltip id='flaggedTooltip'>
+            <Tooltip
+                id='flaggedTooltip'
+                className='text-nowrap'
+            >
                 <FormattedMessage
                     id='channel_header.flagged'
                     defaultMessage='Flagged Posts'
@@ -676,19 +679,27 @@ export default class ChannelHeader extends React.Component {
             headerText = channel.header;
         }
 
-        const toggleFavoriteTooltip = (
-            <Tooltip id='favoriteTooltip'>
-                {this.state.isFavorite ?
+        let toggleFavoriteTooltip;
+        if (this.state.isFavorite) {
+            toggleFavoriteTooltip = (
+                <Tooltip id='favoriteTooltip'>
                     <FormattedMessage
                         id='channelHeader.removeFromFavorites'
                         defaultMessage='Remove from Favorites'
-                    /> :
+                    />
+                </Tooltip>
+            );
+        } else {
+            toggleFavoriteTooltip = (
+                <Tooltip id='favoriteTooltip'>
                     <FormattedMessage
                         id='channelHeader.addToFavorites'
                         defaultMessage='Add to Favorites'
-                    />}
-            </Tooltip>
-        );
+                    />
+                </Tooltip>
+            );
+        }
+
         const toggleFavorite = (
             <OverlayTrigger
                 delayShow={Constants.OVERLAY_TIME_DELAY}
-- 
cgit v1.2.3-1-g7c22

