mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 23:44:37 +08:00
UX: sidebar more link for categories & tags (#18199)
This commit is contained in:
parent
08009cd4d1
commit
321aa4b4b4
@ -27,4 +27,10 @@
|
|||||||
{{html-safe this.noCategoriesText}}
|
{{html-safe this.noCategoriesText}}
|
||||||
</Sidebar::SectionMessage>
|
</Sidebar::SectionMessage>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<Sidebar::SectionLink
|
||||||
|
@linkName="more-categories"
|
||||||
|
@content={{i18n "category.all"}}
|
||||||
|
@route="discovery.categories"
|
||||||
|
@class="sidebar-more-link"
|
||||||
|
/>
|
||||||
</Sidebar::Section>
|
</Sidebar::Section>
|
||||||
|
@ -22,4 +22,10 @@
|
|||||||
{{html-safe this.noTagsText}}
|
{{html-safe this.noTagsText}}
|
||||||
</Sidebar::SectionMessage>
|
</Sidebar::SectionMessage>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
<Sidebar::SectionLink
|
||||||
|
@linkName="more-tags"
|
||||||
|
@content={{i18n "tagging.all_tags"}}
|
||||||
|
@route="tags"
|
||||||
|
@class="sidebar-more-link"
|
||||||
|
/>
|
||||||
</Sidebar::Section>
|
</Sidebar::Section>
|
||||||
|
@ -42,7 +42,9 @@ acceptance(
|
|||||||
await visit("/");
|
await visit("/");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(".sidebar-section-categories .sidebar-section-link"),
|
count(
|
||||||
|
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
|
||||||
|
),
|
||||||
1,
|
1,
|
||||||
"there should only be one section link under the section"
|
"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("/");
|
await visit("/");
|
||||||
|
|
||||||
const categorySectionLinks = queryAll(
|
const categorySectionLinks = queryAll(
|
||||||
".sidebar-section-categories .sidebar-section-link"
|
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
|
||||||
);
|
);
|
||||||
|
|
||||||
const categoryNames = [...categorySectionLinks].map((categorySectionLink) =>
|
const categoryNames = [...categorySectionLinks].map((categorySectionLink) =>
|
||||||
@ -179,7 +181,9 @@ acceptance("Sidebar - Logged on user - Categories Section", function (needs) {
|
|||||||
await visit("/");
|
await visit("/");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(".sidebar-section-categories .sidebar-section-link"),
|
count(
|
||||||
|
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
|
||||||
|
),
|
||||||
3,
|
3,
|
||||||
"there should only be 3 section link under the section"
|
"there should only be 3 section link under the section"
|
||||||
);
|
);
|
||||||
|
@ -123,7 +123,7 @@ acceptance("Sidebar - Logged on user - Tags section", function (needs) {
|
|||||||
await visit("/");
|
await visit("/");
|
||||||
|
|
||||||
const tagSectionLinks = queryAll(
|
const tagSectionLinks = queryAll(
|
||||||
".sidebar-section-tags .sidebar-section-link"
|
".sidebar-section-tags .sidebar-section-link:not(.sidebar-more-link)"
|
||||||
);
|
);
|
||||||
|
|
||||||
const tagNames = [...tagSectionLinks].map((tagSectionLink) =>
|
const tagNames = [...tagSectionLinks].map((tagSectionLink) =>
|
||||||
@ -141,7 +141,9 @@ acceptance("Sidebar - Logged on user - Tags section", function (needs) {
|
|||||||
await visit("/");
|
await visit("/");
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(".sidebar-section-tags .sidebar-section-link"),
|
count(
|
||||||
|
".sidebar-section-tags .sidebar-section-link:not(.sidebar-more-link)"
|
||||||
|
),
|
||||||
4,
|
4,
|
||||||
"4 section links under the section"
|
"4 section links under the section"
|
||||||
);
|
);
|
||||||
|
@ -3886,7 +3886,7 @@ en:
|
|||||||
google: "Google Calendar"
|
google: "Google Calendar"
|
||||||
ics: "ICS"
|
ics: "ICS"
|
||||||
tagging:
|
tagging:
|
||||||
all_tags: "All Tags"
|
all_tags: "All tags"
|
||||||
other_tags: "Other Tags"
|
other_tags: "Other Tags"
|
||||||
selector_all_tags: "all tags"
|
selector_all_tags: "all tags"
|
||||||
selector_no_tags: "no tags"
|
selector_no_tags: "no tags"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user