UX: adjustments for experimental bulk select menu (#26474)

This commit is contained in:
Kris 2024-04-02 18:01:21 -04:00 committed by GitHub
parent 8b1b368693
commit b35da59865
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 4 deletions

View File

@ -1,5 +1,6 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import rawRenderGlimmer from "discourse/lib/raw-render-glimmer"; import rawRenderGlimmer from "discourse/lib/raw-render-glimmer";
import i18n from "discourse-common/helpers/i18n";
import BulkSelectTopicsDropdown from "select-kit/components/bulk-select-topics-dropdown"; import BulkSelectTopicsDropdown from "select-kit/components/bulk-select-topics-dropdown";
export default class extends EmberObject { export default class extends EmberObject {
@ -12,7 +13,9 @@ export default class extends EmberObject {
this, this,
"div.bulk-select-topics-dropdown", "div.bulk-select-topics-dropdown",
<template> <template>
<span>{{@data.selectedCount}} selected</span> <span class="bulk-select-topic-dropdown__count">
{{i18n "topics.bulk.selected_count" count=@data.selectedCount}}
</span>
<BulkSelectTopicsDropdown <BulkSelectTopicsDropdown
@bulkSelectHelper={{@data.bulkSelectHelper}} @bulkSelectHelper={{@data.bulkSelectHelper}}
/> />

View File

@ -172,6 +172,20 @@
z-index: 2; z-index: 2;
} }
.bulk-select-topics-dropdown {
.select-kit.single-select.dropdown-select-box .select-kit-row {
.texts .name {
font-weight: normal;
}
.icons {
font-size: var(--font-down-2);
margin-right: 0.75em;
position: relative;
top: 0.15em;
}
}
}
.topic-list { .topic-list {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;

View File

@ -522,7 +522,7 @@ td .main-link {
} }
&.default { &.default {
display: flex; display: flex;
span:not(.bulk-select-topics) { .bulk-select-topic-dropdown__count {
display: none; display: none;
} }
} }
@ -536,9 +536,12 @@ td .main-link {
.bulk-select-topics { .bulk-select-topics {
display: flex; display: flex;
flex-wrap: wrap;
padding-left: 0.85em; padding-left: 0.85em;
.btn { gap: 0.5em;
margin-right: 0.5em; font-size: var(--font-down-1);
.select-kit-collection {
font-size: var(--font-up-1);
} }
} }

View File

@ -2967,6 +2967,7 @@ en:
selected: selected:
one: "You have selected <b>%{count}</b> topic." one: "You have selected <b>%{count}</b> topic."
other: "You have selected <b>%{count}</b> topics." other: "You have selected <b>%{count}</b> topics."
selected_count: "%{count} selected"
change_tags: "Replace Tags" change_tags: "Replace Tags"
append_tags: "Append Tags" append_tags: "Append Tags"
choose_new_tags: "Choose new tags for these topics:" choose_new_tags: "Choose new tags for these topics:"