UX: Show titles on site settings navigation menu items (#20794)
In some languages, labels on the site settings navigation menu get truncated. This adds titles to menu items, so users can see untruncated labels on hover.
This commit is contained in:
parent
bc8ab33708
commit
19b0dbe59d
|
@ -37,11 +37,12 @@
|
|||
@route="adminSiteSettingsCategory"
|
||||
@model={{category.nameKey}}
|
||||
class={{category.nameKey}}
|
||||
title={{category.name}}
|
||||
>
|
||||
{{category.name}}
|
||||
{{#if category.count}}<span
|
||||
class="count"
|
||||
>({{category.count}})</span>{{/if}}
|
||||
{{#if category.count}}
|
||||
<span class="count">({{category.count}})</span>
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
count,
|
||||
exists,
|
||||
query,
|
||||
queryAll,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import {
|
||||
click,
|
||||
|
@ -190,4 +191,17 @@ acceptance("Admin - Site Settings", function (needs) {
|
|||
"blocked_onebox_domains=proper.com"
|
||||
);
|
||||
});
|
||||
|
||||
test("nav menu items have titles", async (assert) => {
|
||||
await visit("/admin/site_settings");
|
||||
|
||||
const navItems = queryAll(".admin-nav .nav-stacked li a");
|
||||
navItems.each((_, item) => {
|
||||
assert.equal(
|
||||
item.title,
|
||||
item.innerText,
|
||||
"menu item has title, and the title is equal to menu item's label"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue