From a049b8f596e3b7dda4892350376ca0d25d501896 Mon Sep 17 00:00:00 2001 From: Kris Date: Thu, 29 Jul 2021 12:11:15 -0400 Subject: [PATCH] UX: User bookmark page style adjustments (#13869) --- .../templates/components/bookmark-list.hbs | 43 +++++++---------- .../app/templates/components/topic-status.hbs | 2 +- .../stylesheets/common/base/_topic-list.scss | 1 + .../common/components/bookmark-list.scss | 46 +++++++++++-------- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs b/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs index 1c6e64243c3..491b062a57b 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs @@ -2,66 +2,55 @@ {{#load-more selector=".bookmark-list .bookmark-list-item" action=loadMore}} - {{#if site.mobileView}} - - - - {{else}} + {{#unless site.mobileView}} - {{/if}} + {{/unless}} {{#each content as |bookmark|}} - {{#if site.mobileView}} - - {{/if}} {{#unless site.mobileView}}
 {{i18n "topic.title"}} {{i18n "topic.title"}}    
- {{#if bookmark.post_user_avatar_template}} - - {{avatar bookmark.postUser avatarTemplatePath="avatar_template" usernamePath="username" namePath="name" imageSize="small"}} - - {{/if}} - {{#if bookmark.post_user_avatar_template}} - + {{avatar bookmark.postUser avatarTemplatePath="avatar_template" usernamePath="username" namePath="name" imageSize="small"}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/topic-status.hbs b/app/assets/javascripts/discourse/app/templates/components/topic-status.hbs index 1852bcbf402..559fb0cc278 100644 --- a/app/assets/javascripts/discourse/app/templates/components/topic-status.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/topic-status.hbs @@ -30,4 +30,4 @@ {{~#if topicInvisible~}} {{invisibleIcon}} {{~/if~}} -{{plugin-outlet name="after-topic-status" tagName="" args=(hash topic=topic)}} +{{plugin-outlet name="after-topic-status" tagName="" args=(hash topic=topic)~}} diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index 671e45bcb97..f7421d090d1 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -160,6 +160,7 @@ margin-top: 0.5em; margin-bottom: 0.5em; font-size: $font-down-2; + word-break: break-word; } } diff --git a/app/assets/stylesheets/common/components/bookmark-list.scss b/app/assets/stylesheets/common/components/bookmark-list.scss index 07042a6e640..1777e6b1df3 100644 --- a/app/assets/stylesheets/common/components/bookmark-list.scss +++ b/app/assets/stylesheets/common/components/bookmark-list.scss @@ -28,7 +28,6 @@ $mobile-breakpoint: 700px; } @media (max-width: $mobile-breakpoint) { .main-link { - padding-left: 0.5em; padding-right: 0.5em; } } @@ -45,28 +44,20 @@ $mobile-breakpoint: 700px; } .bookmark-metadata { font-size: $font-down-2; - display: flex; - margin-bottom: 0.2em; + margin-bottom: 0.25em; &-item { - margin-right: 0.5em; - display: flex; - align-items: center; + display: inline-block; + margin-right: 1em; + margin-bottom: 0.25em; + line-height: $line-height-medium; + span { + word-break: break-word; + } } .d-icon { - // not aligning center because of multi-line notes - align-self: flex-start; - margin-right: 0.2em; - padding-top: 0.12em; - } - - @media (max-width: $mobile-breakpoint) { - flex-direction: column; - &-item { - display: block; - margin-bottom: 0.2em; - } + margin-right: 0.25em; } } .bookmark-status-with-link { @@ -74,8 +65,27 @@ $mobile-breakpoint: 700px; flex-direction: row; align-items: center; + .mobile-view & { + margin-bottom: 0.15em; + } .topic-statuses { float: none; + &:empty { + // avoids extra margin + display: none; + } + } + } + + .post-excerpt { + overflow: hidden; + padding-right: 1em; + } + + .mobile-view & { + .avatar { + float: left; + margin: 0.27em 0.27em 0 0; } } }