From bbb4e196124920243fbec951a9a4522faf5f79cf Mon Sep 17 00:00:00 2001 From: Kris Date: Tue, 26 Sep 2023 17:50:09 -0400 Subject: [PATCH] UX: improve history modal layout (#23675) --- .../components/modal/history/revisions.hbs | 25 ++++--- .../components/modal/history/topic-footer.hbs | 60 +++++++++-------- .../discourse/app/lib/render-tag.js | 3 + .../stylesheets/common/base/history.scss | 66 +++++++++++++++---- app/assets/stylesheets/desktop/history.scss | 23 ------- app/assets/stylesheets/mobile/history.scss | 22 +++---- config/locales/client.en.yml | 1 - 7 files changed, 115 insertions(+), 85 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/modal/history/revisions.hbs b/app/assets/javascripts/discourse/app/components/modal/history/revisions.hbs index eeedf274618..2ee07d1c216 100644 --- a/app/assets/javascripts/discourse/app/components/modal/history/revisions.hbs +++ b/app/assets/javascripts/discourse/app/components/modal/history/revisions.hbs @@ -1,7 +1,7 @@
{{#if @model.title_changes}}
-

{{html-safe @titleDiff}}

+

{{html-safe @titleDiff}}

{{/if}} {{#if @mobileView}} @@ -39,15 +39,20 @@ {{/if}} {{/if}} {{#if @model.tags_changes}} -
- {{i18n "tagging.changed"}} - {{#each @previousTagChanges as |t|}} - {{discourse-tag t.name style=(if t.deleted "diff-del")}} - {{/each}} - →  - {{#each @currentTagChanges as |t|}} - {{discourse-tag t.name style=(if t.inserted "diff-ins")}} - {{/each}} +
+ + {{#each @previousTagChanges as |t|}} + {{discourse-tag t.name extraClass=(if t.deleted "diff-del")}} + {{/each}} + + {{#if (and @mobileView @previousTagChanges @currentTagChanges)}} + →  + {{/if}} + + {{#each @currentTagChanges as |t|}} + {{discourse-tag t.name extraClass=(if t.inserted "diff-ins")}} + {{/each}} +
{{/if}} {{#if @model.featured_link_changes}} diff --git a/app/assets/javascripts/discourse/app/components/modal/history/topic-footer.hbs b/app/assets/javascripts/discourse/app/components/modal/history/topic-footer.hbs index 436ae424b58..97f18c9f839 100644 --- a/app/assets/javascripts/discourse/app/components/modal/history/topic-footer.hbs +++ b/app/assets/javascripts/discourse/app/components/modal/history/topic-footer.hbs @@ -1,37 +1,41 @@
- - +
+ + +
{{html-safe @revisionsText}}
- - +
+ + +