From b2453735b2109f8039204e59cece98cbac7bc3e7 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Tue, 30 May 2017 20:19:29 +0500 Subject: Minor Ui improvements (#6515) * PLT-6645 - Improving copy pasting behaviour * PLT-6149 - Fixing edited indicator in search --- .../post_view/components/post_header.jsx | 12 ++++----- .../components/post_view/components/post_info.jsx | 16 ++++++------ webapp/components/rhs_comment.jsx | 22 ++++++++-------- webapp/components/rhs_root_post.jsx | 16 ++++++------ webapp/components/search_results_item.jsx | 29 ++++++++++++++-------- 5 files changed, 51 insertions(+), 44 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/post_view/components/post_header.jsx b/webapp/components/post_view/components/post_header.jsx index ce67cd653..570a04f8f 100644 --- a/webapp/components/post_view/components/post_header.jsx +++ b/webapp/components/post_view/components/post_header.jsx @@ -53,7 +53,7 @@ export default class PostHeader extends React.Component { ); } - botIndicator =
  • {Constants.BOT_NAME}
  • ; + botIndicator =
    {Constants.BOT_NAME}
    ; } else if (isSystemMessage) { userProfile = ( -
  • {userProfile}{colon}
  • +
    +
    {userProfile}{colon}
    {botIndicator} -
  • +
    -
  • - +
    + ); } } diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index 06e7b33fd..74ce32817 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -388,16 +388,16 @@ export default class PostInfo extends React.Component { let options; if (isEphemeral) { options = ( -
  • +
    {this.createRemovePostButton()} -
  • + ); } else if (!isPending) { const dropdown = this.createDropdown(isSystemMessage); if (dropdown) { options = ( -
  • +
    {react} {comments} -
  • + ); } } @@ -424,8 +424,8 @@ export default class PostInfo extends React.Component { } return ( - + ); } } diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx index ce6360c7e..85c2fc1de 100644 --- a/webapp/components/rhs_comment.jsx +++ b/webapp/components/rhs_comment.jsx @@ -436,7 +436,7 @@ export default class RhsComment extends React.Component { ); } - botIndicator =
  • {'BOT'}
  • ; + botIndicator =
    {'BOT'}
    ; } else if (isSystemMessage) { userProfile = ( +
    {this.createRemovePostButton()} - +
    ); } else if (!isSystemMessage) { options = ( -
  • +
    {reactOverlay} {this.createDropdown(isSystemMessage)} {react} -
  • + ); } @@ -613,12 +613,12 @@ export default class RhsComment extends React.Component {
    {profilePicContainer}
    -
      -
    • +
      +
      {userProfile} -
    • +
    {botIndicator} -
  • +
    {this.renderTimeTag(post, timeOptions)} {pinnedBadge} -
  • +
    {options} - +
    {loading} diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index 408bce395..f48b4e86a 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -454,7 +454,7 @@ export default class RhsRootPost extends React.Component { ); } - botIndicator =
  • {'BOT'}
  • ; + botIndicator =
    {'BOT'}
    ; } else if (isSystemMessage) { userProfile = ( {profilePicContainer}
    -
      -
    • {userProfile}
    • +
      +
      {userProfile}
      {botIndicator} -
    • +
      {this.renderTimeTag(post, timeOptions)} {pinnedBadge} -
    • -
    • +
    • +
      {reactOverlay} {rootOptions} {react} - -
    +
    +
    {Constants.BOT_NAME}; + botIndicator =
    {Constants.BOT_NAME}
    ; } const profilePic = ( @@ -169,6 +169,11 @@ export default class SearchResultsItem extends React.Component { compactClass = ' post--compact'; } + let postClass = ''; + if (PostUtils.isEdited(this.props.post)) { + postClass += ' post--edited'; + } + let fileAttachment = null; if (post.file_ids && post.file_ids.length > 0) { fileAttachment = ( @@ -202,7 +207,7 @@ export default class SearchResultsItem extends React.Component { ); rhsControls = ( -
  • +
    -
  • +
    ); message = ( @@ -289,8 +294,8 @@ export default class SearchResultsItem extends React.Component {
    {profilePicContainer}
    -
      -
    • +
      +
      -
    • +
    {botIndicator} -
  • +
    {this.renderTimeTag(post)} {pinnedBadge} {flagContent} -
  • +
    {rhsControls} - +
    - {message} - {fileAttachment} +
    + {message} + {fileAttachment} +
    -- cgit v1.2.3-1-g7c22