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"
|
@route="adminSiteSettingsCategory"
|
||||||
@model={{category.nameKey}}
|
@model={{category.nameKey}}
|
||||||
class={{category.nameKey}}
|
class={{category.nameKey}}
|
||||||
|
title={{category.name}}
|
||||||
>
|
>
|
||||||
{{category.name}}
|
{{category.name}}
|
||||||
{{#if category.count}}<span
|
{{#if category.count}}
|
||||||
class="count"
|
<span class="count">({{category.count}})</span>
|
||||||
>({{category.count}})</span>{{/if}}
|
{{/if}}
|
||||||
</LinkTo>
|
</LinkTo>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {
|
||||||
count,
|
count,
|
||||||
exists,
|
exists,
|
||||||
query,
|
query,
|
||||||
|
queryAll,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import {
|
import {
|
||||||
click,
|
click,
|
||||||
|
@ -190,4 +191,17 @@ acceptance("Admin - Site Settings", function (needs) {
|
||||||
"blocked_onebox_domains=proper.com"
|
"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