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

This commit is contained in:
Joffrey JAFFEUX 2020-05-18 14:07:40 +02:00 committed by GitHub
parent f968155288
commit 9482ddff73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 3 deletions

View File

@ -390,7 +390,8 @@ createWidget("timeline-footer-controls", {
showFullTitle: false, showFullTitle: false,
appendReason: false, appendReason: false,
placement: "bottom-end", placement: "bottom-end",
mountedAsWidget: true mountedAsWidget: true,
showCaret: false
}, },
["notificationLevel"] ["notificationLevel"]
) )

View File

@ -9,6 +9,10 @@ export default DropdownSelectBoxComponent.extend({
pluginApiIdentifiers: ["pinned-options"], pluginApiIdentifiers: ["pinned-options"],
classNames: ["pinned-options"], classNames: ["pinned-options"],
selectKitOptions: {
showCaret: true
},
modifySelection(content) { modifySelection(content) {
const pinnedGlobally = this.get("topic.pinned_globally"); const pinnedGlobally = this.get("topic.pinned_globally");
const pinned = this.value; const pinned = this.value;

View File

@ -9,6 +9,7 @@ export default Component.extend({
placement: "bottom-start", placement: "bottom-start",
notificationLevel: null, notificationLevel: null,
topic: null, topic: null,
showCaret: true,
@action @action
changeTopicNotificationLevel(levelId) { changeTopicNotificationLevel(levelId) {

View File

@ -9,7 +9,8 @@ export default NotificationsButtonComponent.extend({
selectKitOptions: { selectKitOptions: {
i18nPrefix: "i18nPrefix", i18nPrefix: "i18nPrefix",
i18nPostfix: "i18nPostfix" i18nPostfix: "i18nPostfix",
showCaret: true
}, },
i18nPrefix: "topic.notifications", i18nPrefix: "topic.notifications",

View File

@ -7,4 +7,6 @@
shouldDisplayClearableButton=shouldDisplayClearableButton shouldDisplayClearableButton=shouldDisplayClearableButton
}} }}
{{d-icon caretIcon class="caret-icon"}} {{#if selectKit.options.showCaret}}
{{d-icon caretIcon class="caret-icon"}}
{{/if}}

View File

@ -6,6 +6,7 @@
showFullTitle=showFullTitle showFullTitle=showFullTitle
placement=placement placement=placement
preventsClickPropagation=true preventsClickPropagation=true
showCaret=showCaret
) )
}} }}