UX: sidebar more link for categories & tags (#18199)

This commit is contained in:
Kris 2022-09-12 13:25:25 -04:00 committed by GitHub
parent 08009cd4d1
commit 321aa4b4b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 6 deletions

View File

@ -27,4 +27,10 @@
{{html-safe this.noCategoriesText}}
</Sidebar::SectionMessage>
{{/if}}
<Sidebar::SectionLink
@linkName="more-categories"
@content={{i18n "category.all"}}
@route="discovery.categories"
@class="sidebar-more-link"
/>
</Sidebar::Section>

View File

@ -22,4 +22,10 @@
{{html-safe this.noTagsText}}
</Sidebar::SectionMessage>
{{/if}}
<Sidebar::SectionLink
@linkName="more-tags"
@content={{i18n "tagging.all_tags"}}
@route="tags"
@class="sidebar-more-link"
/>
</Sidebar::Section>

View File

@ -42,7 +42,9 @@ acceptance(
await visit("/");
assert.strictEqual(
count(".sidebar-section-categories .sidebar-section-link"),
count(
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
),
1,
"there should only be one section link under the section"
);
@ -159,7 +161,7 @@ acceptance("Sidebar - Logged on user - Categories Section", function (needs) {
await visit("/");
const categorySectionLinks = queryAll(
".sidebar-section-categories .sidebar-section-link"
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
);
const categoryNames = [...categorySectionLinks].map((categorySectionLink) =>
@ -179,7 +181,9 @@ acceptance("Sidebar - Logged on user - Categories Section", function (needs) {
await visit("/");
assert.strictEqual(
count(".sidebar-section-categories .sidebar-section-link"),
count(
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
),
3,
"there should only be 3 section link under the section"
);

View File

@ -123,7 +123,7 @@ acceptance("Sidebar - Logged on user - Tags section", function (needs) {
await visit("/");
const tagSectionLinks = queryAll(
".sidebar-section-tags .sidebar-section-link"
".sidebar-section-tags .sidebar-section-link:not(.sidebar-more-link)"
);
const tagNames = [...tagSectionLinks].map((tagSectionLink) =>
@ -141,7 +141,9 @@ acceptance("Sidebar - Logged on user - Tags section", function (needs) {
await visit("/");
assert.strictEqual(
count(".sidebar-section-tags .sidebar-section-link"),
count(
".sidebar-section-tags .sidebar-section-link:not(.sidebar-more-link)"
),
4,
"4 section links under the section"
);

View File

@ -3886,7 +3886,7 @@ en:
google: "Google Calendar"
ics: "ICS"
tagging:
all_tags: "All Tags"
all_tags: "All tags"
other_tags: "Other Tags"
selector_all_tags: "all tags"
selector_no_tags: "no tags"