mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00:00
UX: Enforce bullet category style in sidebar (#17334)
The other category styles do not fit into how we want the sidebar to look.
This commit is contained in:
parent
56c0d8cf92
commit
4d51f9cad6
@ -49,7 +49,9 @@ export default class CategorySectionLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get text() {
|
get text() {
|
||||||
return htmlSafe(categoryBadgeHTML(this.category, { link: false }));
|
return htmlSafe(
|
||||||
|
categoryBadgeHTML(this.category, { link: false, categoryStyle: "bullet" })
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get badgeCount() {
|
get badgeCount() {
|
||||||
|
@ -141,6 +141,20 @@ acceptance("Sidebar - Categories Section", function (needs) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("category section links uses the bullet style even when category_style site setting has been configured", async function (assert) {
|
||||||
|
this.siteSettings.category_style = "box";
|
||||||
|
const { category1 } = setupUserSidebarCategories();
|
||||||
|
|
||||||
|
await visit("/");
|
||||||
|
|
||||||
|
assert.ok(
|
||||||
|
exists(
|
||||||
|
`.sidebar-section-categories .sidebar-section-link-${category1.slug} .badge-wrapper.bullet`
|
||||||
|
),
|
||||||
|
"category badge uses the bullet style"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("category section links", async function (assert) {
|
test("category section links", async function (assert) {
|
||||||
const { category1, category2 } = setupUserSidebarCategories();
|
const { category1, category2 } = setupUserSidebarCategories();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user