UX: show caret only in topic footer buttons dropdown select boxes (#9816)

UX: show caret only in topic footer buttons dropdown select boxes (#9816)

diff --git a/app/assets/javascripts/discourse/app/widgets/topic-timeline.js b/app/assets/javascripts/discourse/app/widgets/topic-timeline.js
index 9d2ffd6..55dcafa 100644
--- a/app/assets/javascripts/discourse/app/widgets/topic-timeline.js
+++ b/app/assets/javascripts/discourse/app/widgets/topic-timeline.js
@@ -390,7 +390,8 @@ createWidget("timeline-footer-controls", {
             showFullTitle: false,
             appendReason: false,
             placement: "bottom-end",
-            mountedAsWidget: true
+            mountedAsWidget: true,
+            showCaret: false
           },
           ["notificationLevel"]
         )
diff --git a/app/assets/javascripts/select-kit/app/components/pinned-options.js b/app/assets/javascripts/select-kit/app/components/pinned-options.js
index 0a3e924..f220617 100644
--- a/app/assets/javascripts/select-kit/app/components/pinned-options.js
+++ b/app/assets/javascripts/select-kit/app/components/pinned-options.js
@@ -9,6 +9,10 @@ export default DropdownSelectBoxComponent.extend({
   pluginApiIdentifiers: ["pinned-options"],
   classNames: ["pinned-options"],
 
+  selectKitOptions: {
+    showCaret: true
+  },
+
   modifySelection(content) {
     const pinnedGlobally = this.get("topic.pinned_globally");
     const pinned = this.value;
diff --git a/app/assets/javascripts/select-kit/app/components/topic-notifications-button.js b/app/assets/javascripts/select-kit/app/components/topic-notifications-button.js
index dd5c985..5832939 100644
--- a/app/assets/javascripts/select-kit/app/components/topic-notifications-button.js
+++ b/app/assets/javascripts/select-kit/app/components/topic-notifications-button.js
@@ -9,6 +9,7 @@ export default Component.extend({
   placement: "bottom-start",
   notificationLevel: null,
   topic: null,
+  showCaret: true,
 
   @action
   changeTopicNotificationLevel(levelId) {
diff --git a/app/assets/javascripts/select-kit/app/components/topic-notifications-options.js b/app/assets/javascripts/select-kit/app/components/topic-notifications-options.js
index ae3dd48..5548eb2 100644
--- a/app/assets/javascripts/select-kit/app/components/topic-notifications-options.js
+++ b/app/assets/javascripts/select-kit/app/components/topic-notifications-options.js
@@ -9,7 +9,8 @@ export default NotificationsButtonComponent.extend({
 
   selectKitOptions: {
     i18nPrefix: "i18nPrefix",
-    i18nPostfix: "i18nPostfix"
+    i18nPostfix: "i18nPostfix",
+    showCaret: true
   },
 
   i18nPrefix: "topic.notifications",
diff --git a/app/assets/javascripts/select-kit/app/templates/components/dropdown-select-box/dropdown-select-box-header.hbs b/app/assets/javascripts/select-kit/app/templates/components/dropdown-select-box/dropdown-select-box-header.hbs
index 8ce66b4..297c4fd 100644
--- a/app/assets/javascripts/select-kit/app/templates/components/dropdown-select-box/dropdown-select-box-header.hbs
+++ b/app/assets/javascripts/select-kit/app/templates/components/dropdown-select-box/dropdown-select-box-header.hbs
@@ -7,4 +7,6 @@
   shouldDisplayClearableButton=shouldDisplayClearableButton
 }}
 
-{{d-icon caretIcon class="caret-icon"}}
+{{#if selectKit.options.showCaret}}
+  {{d-icon caretIcon class="caret-icon"}}
+{{/if}}
diff --git a/app/assets/javascripts/select-kit/app/templates/components/topic-notifications-button.hbs b/app/assets/javascripts/select-kit/app/templates/components/topic-notifications-button.hbs
index b111dd6..50dd20e 100644
--- a/app/assets/javascripts/select-kit/app/templates/components/topic-notifications-button.hbs
+++ b/app/assets/javascripts/select-kit/app/templates/components/topic-notifications-button.hbs
@@ -6,6 +6,7 @@
     showFullTitle=showFullTitle
     placement=placement
     preventsClickPropagation=true
+    showCaret=showCaret
   )
 }}
 

GitHub sha: 9482ddff

1 Like

This commit appears in #9816 which was merged by jjaffeux.