From f8d3f9d4ecbb86c01f4cb13a5e41029b2330cc73 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Wed, 3 Feb 2016 23:54:48 +0500 Subject: Multiple UI Improvements --- web/react/components/channel_loader.jsx | 10 +++ web/react/components/search_results_item.jsx | 118 +++++++++++++++------------ web/sass-files/sass/partials/_headers.scss | 1 + web/sass-files/sass/partials/_post.scss | 2 +- web/sass-files/sass/partials/_search.scss | 24 +++--- 5 files changed, 90 insertions(+), 65 deletions(-) diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index 712d6885f..cb1da90de 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -84,6 +84,16 @@ export default class ChannelLoader extends React.Component { } }); + $('body').on('mouseenter mouseleave', '.search-item__container .post', function mouseOver(ev) { + if (ev.type === 'mouseenter') { + $(this).closest('.search-item__container').find('.date-separator').addClass('hovered--after'); + $(this).closest('.search-item__container').next('div').find('.date-separator').addClass('hovered--before'); + } else { + $(this).closest('.search-item__container').find('.date-separator').removeClass('hovered--after'); + $(this).closest('.search-item__container').next('div').find('.date-separator').removeClass('hovered--before'); + } + }); + $('body').on('mouseenter mouseleave', '.post.post--comment.same--root', function mouseOver(ev) { if (ev.type === 'mouseenter') { $(this).parent('div').prev('.date-separator, .new-separator').addClass('hovered--comment'); diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx index 0ad091d5b..544ba920a 100644 --- a/web/react/components/search_results_item.jsx +++ b/web/react/components/search_results_item.jsx @@ -59,64 +59,74 @@ export default class SearchResultsItem extends React.Component { }; return ( -
-
{channelName}
-
-
- +
+
+
+
-
- -
- +
+
{channelName}
+
+
+
+
+ +
+ +
+
diff --git a/web/sass-files/sass/partials/_headers.scss b/web/sass-files/sass/partials/_headers.scss index e73680b38..4a4de5c3b 100644 --- a/web/sass-files/sass/partials/_headers.scss +++ b/web/sass-files/sass/partials/_headers.scss @@ -173,6 +173,7 @@ .team__name { line-height: 22px; margin-top: -2px; + float: left; } .user__name { @include single-transition(all, 0.1s, linear); diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index 73c7bd9cb..3f80e6664 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -769,7 +769,7 @@ body.ios { .comment-icon { display: inline-block; - top: 3px; + top: 2px; position: relative; margin-right: 3px; fill: inherit; diff --git a/web/sass-files/sass/partials/_search.scss b/web/sass-files/sass/partials/_search.scss index cb125bff0..693c59a31 100644 --- a/web/sass-files/sass/partials/_search.scss +++ b/web/sass-files/sass/partials/_search.scss @@ -90,6 +90,7 @@ -webkit-overflow-scrolling: touch; @include flex(1 1 auto); height: calc(100% - 56px); + padding-top: 10px; } .search-results-header { @@ -104,19 +105,22 @@ border-bottom: $border-gray; } -.search-item-container { - border-top: $border-gray; - padding: 10px 1em; - margin: 0; +.search-item__container { - &:first-child { - border: none; - } + .post { + padding: 0 1em 1em; + margin: 0; - .search-channel__name { - font-weight: 600; - margin: 0 0 10px 0; + &:first-child { + border: none; + } + + .search-channel__name { + font-weight: 600; + margin: 0 0 10px 0; + } } + } .search-item__jump { -- cgit v1.2.3-1-g7c22