From 54bd6bd2c3f368dc3c73318d275b4d24eb2958d3 Mon Sep 17 00:00:00 2001 From: janzenisaac <50783505+janzenisaac@users.noreply.github.com> Date: Mon, 15 Nov 2021 10:47:29 -0600 Subject: [PATCH] UX: Update reassign dropdown styles (#242) - Make drop down options regular font weight - Add icon to drop down options --- .../initializers/extend-for-assigns.js.es6 | 21 ++++++++++++++++--- assets/stylesheets/assigns.scss | 10 ++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6 b/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6 index 5e7ed28..f21ab61 100644 --- a/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6 +++ b/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6 @@ -127,7 +127,14 @@ function registerTopicFooterButtons(api) { classNames: ["reassign"], content() { const content = [ - { id: "unassign", name: I18n.t("discourse_assign.unassign.title") }, + { + id: "unassign", + name: htmlSafe( + `${iconHTML("user-times")} ${I18n.t( + "discourse_assign.unassign.title" + )}` + ), + }, ]; if ( this.topic.isAssigned() && @@ -136,12 +143,20 @@ function registerTopicFooterButtons(api) { ) { content.push({ id: "reassign-self", - name: I18n.t("discourse_assign.reassign.to_self"), + name: htmlSafe( + `${iconHTML("user-plus")} ${I18n.t( + "discourse_assign.reassign.to_self" + )}` + ), }); } content.push({ id: "reassign", - name: I18n.t("discourse_assign.reassign.title_w_ellipsis"), + name: htmlSafe( + `${iconHTML("group-plus")} ${I18n.t( + "discourse_assign.reassign.title_w_ellipsis" + )}` + ), }); return content; }, diff --git a/assets/stylesheets/assigns.scss b/assets/stylesheets/assigns.scss index f14db89..09a6cdf 100644 --- a/assets/stylesheets/assigns.scss +++ b/assets/stylesheets/assigns.scss @@ -107,10 +107,18 @@ } } -.topic-footer-dropdown { +#topic-footer-dropdown-reassign { + .name { + font-weight: normal !important; + } .avatar { margin-right: 0.25em; } + .d-icon, + i.fa { + margin-right: 0.25em; + color: var(--primary-medium); + } } // Group assigns sidebar nav