From ade5802ed1ecabdc388c9838d23eec2a9c46e096 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 19 Nov 2015 01:11:06 +0500 Subject: Posts structure improvement --- web/react/components/channel_header.jsx | 38 +- web/react/components/post.jsx | 59 ++- web/react/components/post_body.jsx | 44 +- web/react/components/post_header.jsx | 8 +- web/react/components/post_info.jsx | 43 +- web/react/components/rhs_comment.jsx | 63 +-- web/react/components/rhs_root_post.jsx | 74 +-- web/react/components/search_results_item.jsx | 41 +- web/react/components/time_since.jsx | 2 +- .../user_settings/custom_theme_chooser.jsx | 5 +- web/react/utils/channel_intro_mssages.jsx | 1 + web/react/utils/utils.jsx | 30 +- web/sass-files/sass/partials/_base.scss | 1 + web/sass-files/sass/partials/_headers.scss | 32 +- web/sass-files/sass/partials/_markdown.scss | 2 +- web/sass-files/sass/partials/_post.scss | 499 +++++++++++---------- web/sass-files/sass/partials/_post_right.scss | 33 +- web/sass-files/sass/partials/_responsive.scss | 329 ++------------ web/sass-files/sass/partials/_search.scss | 2 +- web/sass-files/sass/partials/_sidebar--right.scss | 14 - 20 files changed, 529 insertions(+), 791 deletions(-) (limited to 'web') diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index ffe7cbb5d..e46b2ccd7 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -27,6 +27,7 @@ const ActionTypes = Constants.ActionTypes; const Popover = ReactBootstrap.Popover; const OverlayTrigger = ReactBootstrap.OverlayTrigger; +const Tooltip = ReactBootstrap.Tooltip; export default class ChannelHeader extends React.Component { constructor(props) { @@ -121,6 +122,7 @@ export default class ChannelHeader extends React.Component { } const channel = this.state.channel; + const recentMentionsTooltip = {'Recent Mentions'}; const popoverContent = (
- - - - + + {'@'} + +
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index 2b9586345..474478de2 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -141,6 +141,8 @@ export default class Post extends React.Component { var postType = ''; if (type !== 'Post') { postType = 'post--comment'; + } else if (commentCount > 0) { + postType = 'post--root'; } var currentUserCss = ''; @@ -170,14 +172,11 @@ export default class Post extends React.Component { } profilePic = ( -
- -
+ ); } @@ -187,32 +186,26 @@ export default class Post extends React.Component { id={'post_' + post.id} className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss} > - {profilePic}
- - - +
{profilePic}
+
+ + +
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 975ac64dc..e1c057775 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -257,7 +257,7 @@ export default class PostBody extends React.Component { } return ( -
+

{header} {this.state.youtubeTitle} @@ -329,7 +329,7 @@ export default class PostBody extends React.Component { } comment = ( -

+

{'Commented on '}{name}{apostrophe}{' message: '} -

+
); - - postClass += ' post-comment'; } let loading; if (post.state === Constants.POST_FAILED) { - postClass += ' post-fail'; + postClass += ' post--fail'; loading = ( +
{comment} -
- {loading} - +
+ {loading} + +
+ + {fileAttachmentHolder} + {this.embed}
- - {fileAttachmentHolder} - {this.embed}
); } diff --git a/web/react/components/post_header.jsx b/web/react/components/post_header.jsx index 45e60c767..e8b162fc2 100644 --- a/web/react/components/post_header.jsx +++ b/web/react/components/post_header.jsx @@ -26,14 +26,14 @@ export default class PostHeader extends React.Component { ); } - botIndicator =
  • {'BOT'}
  • ; + botIndicator =
  • {'BOT'}
  • ; } return ( -