mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Use the same text for linking to more categories and tags in sidebar (#18275)
Before this change, anonymous user and a logged in user used different
text for the links to the categories and tags routes.
Follow-up to 321aa4b4b4
This commit is contained in:
parent
9a76456986
commit
754ad42344
@ -14,9 +14,6 @@
|
|||||||
@prefixColor={{sectionLink.prefixColor}} >
|
@prefixColor={{sectionLink.prefixColor}} >
|
||||||
</Sidebar::SectionLink>
|
</Sidebar::SectionLink>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<Sidebar::SectionLink
|
|
||||||
@linkName="more-categories"
|
<Sidebar::Common::AllCategoriesSectionLink />
|
||||||
@content={{i18n "sidebar.more"}}
|
|
||||||
@route="discovery.categories"
|
|
||||||
/>
|
|
||||||
</Sidebar::Section>
|
</Sidebar::Section>
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
@models={{sectionLink.models}} >
|
@models={{sectionLink.models}} >
|
||||||
</Sidebar::SectionLink>
|
</Sidebar::SectionLink>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<Sidebar::SectionLink
|
|
||||||
@linkName="more-tags"
|
<Sidebar::Common::AllTagsSectionLink />
|
||||||
@content={{i18n "sidebar.more"}}
|
|
||||||
@route="tags"
|
|
||||||
/>
|
|
||||||
</Sidebar::Section>
|
</Sidebar::Section>
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
<Sidebar::SectionLink
|
||||||
|
@linkName="all-categories"
|
||||||
|
@content={{i18n "sidebar.all_categories"}}
|
||||||
|
@route="discovery.categories"
|
||||||
|
/>
|
@ -0,0 +1,3 @@
|
|||||||
|
import templateOnly from "@ember/component/template-only";
|
||||||
|
|
||||||
|
export default templateOnly();
|
@ -0,0 +1,5 @@
|
|||||||
|
<Sidebar::SectionLink
|
||||||
|
@linkName="all-tags"
|
||||||
|
@content={{i18n "sidebar.all_tags"}}
|
||||||
|
@route="tags"
|
||||||
|
/>
|
@ -0,0 +1,3 @@
|
|||||||
|
import templateOnly from "@ember/component/template-only";
|
||||||
|
|
||||||
|
export default templateOnly();
|
@ -27,10 +27,6 @@
|
|||||||
{{html-safe this.noCategoriesText}}
|
{{html-safe this.noCategoriesText}}
|
||||||
</Sidebar::SectionMessage>
|
</Sidebar::SectionMessage>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<Sidebar::SectionLink
|
|
||||||
@linkName="more-categories"
|
<Sidebar::Common::AllCategoriesSectionLink />
|
||||||
@content={{i18n "category.all"}}
|
|
||||||
@route="discovery.categories"
|
|
||||||
@class="sidebar-more-link"
|
|
||||||
/>
|
|
||||||
</Sidebar::Section>
|
</Sidebar::Section>
|
||||||
|
@ -22,10 +22,6 @@
|
|||||||
{{html-safe this.noTagsText}}
|
{{html-safe this.noTagsText}}
|
||||||
</Sidebar::SectionMessage>
|
</Sidebar::SectionMessage>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<Sidebar::SectionLink
|
|
||||||
@linkName="more-tags"
|
<Sidebar::Common::AllTagsSectionLink />
|
||||||
@content={{i18n "tagging.all_tags"}}
|
|
||||||
@route="tags"
|
|
||||||
@class="sidebar-more-link"
|
|
||||||
/>
|
|
||||||
</Sidebar::Section>
|
</Sidebar::Section>
|
||||||
|
@ -27,8 +27,8 @@ acceptance("Sidebar - Anonymous Categories Section", function (needs) {
|
|||||||
assert.strictEqual(categories[4].textContent.trim(), "ux");
|
assert.strictEqual(categories[4].textContent.trim(), "ux");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("a.sidebar-section-link-more-categories"),
|
exists("a.sidebar-section-link-all-categories"),
|
||||||
"more link is visible"
|
"all categories link is visible"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -46,8 +46,8 @@ acceptance("Sidebar - Anonymous Categories Section", function (needs) {
|
|||||||
assert.strictEqual(categories[2].textContent.trim(), "blog");
|
assert.strictEqual(categories[2].textContent.trim(), "blog");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("a.sidebar-section-link-more-categories"),
|
exists("a.sidebar-section-link-all-categories"),
|
||||||
"more link is visible"
|
"all categories link is visible"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -30,8 +30,8 @@ acceptance("Sidebar - Anonymous Tags Section", function (needs) {
|
|||||||
assert.strictEqual(categories[2].textContent.trim(), "fun");
|
assert.strictEqual(categories[2].textContent.trim(), "fun");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("a.sidebar-section-link-more-tags"),
|
exists("a.sidebar-section-link-all-tags"),
|
||||||
"more link is visible"
|
"all tags link is visible"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -60,8 +60,8 @@ acceptance("Sidebar - Anonymous Tags Section - default tags", function (needs) {
|
|||||||
assert.strictEqual(categories[1].textContent.trim(), "meta");
|
assert.strictEqual(categories[1].textContent.trim(), "meta");
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
exists("a.sidebar-section-link-more-tags"),
|
exists("a.sidebar-section-link-all-tags"),
|
||||||
"more link is visible"
|
"all tags link is visible"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@ acceptance(
|
|||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(
|
count(
|
||||||
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
|
".sidebar-section-categories .sidebar-section-link:not(.sidebar-section-link-all-categories)"
|
||||||
),
|
),
|
||||||
1,
|
1,
|
||||||
"there should only be one section link under the section"
|
"there should only be one section link under the section"
|
||||||
@ -161,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:not(.sidebar-more-link)"
|
".sidebar-section-categories .sidebar-section-link:not(.sidebar-section-link-all-categories)"
|
||||||
);
|
);
|
||||||
|
|
||||||
const categoryNames = [...categorySectionLinks].map((categorySectionLink) =>
|
const categoryNames = [...categorySectionLinks].map((categorySectionLink) =>
|
||||||
@ -182,7 +182,7 @@ acceptance("Sidebar - Logged on user - Categories Section", function (needs) {
|
|||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(
|
count(
|
||||||
".sidebar-section-categories .sidebar-section-link:not(.sidebar-more-link)"
|
".sidebar-section-categories .sidebar-section-link:not(.sidebar-section-link-all-categories)"
|
||||||
),
|
),
|
||||||
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:not(.sidebar-more-link)"
|
".sidebar-section-tags .sidebar-section-link:not(.sidebar-section-link-all-tags)"
|
||||||
);
|
);
|
||||||
|
|
||||||
const tagNames = [...tagSectionLinks].map((tagSectionLink) =>
|
const tagNames = [...tagSectionLinks].map((tagSectionLink) =>
|
||||||
@ -142,7 +142,7 @@ acceptance("Sidebar - Logged on user - Tags section", function (needs) {
|
|||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
count(
|
count(
|
||||||
".sidebar-section-tags .sidebar-section-link:not(.sidebar-more-link)"
|
".sidebar-section-tags .sidebar-section-link:not(.sidebar-section-link-all-tags)"
|
||||||
),
|
),
|
||||||
4,
|
4,
|
||||||
"4 section links under the section"
|
"4 section links under the section"
|
||||||
|
@ -4097,6 +4097,8 @@ en:
|
|||||||
other: "%{count} new"
|
other: "%{count} new"
|
||||||
toggle_section: "toggle section"
|
toggle_section: "toggle section"
|
||||||
more: "More..."
|
more: "More..."
|
||||||
|
all_categories: "All categories"
|
||||||
|
all_tags: "All tags"
|
||||||
sections:
|
sections:
|
||||||
messages:
|
messages:
|
||||||
header_link_text: "Messages"
|
header_link_text: "Messages"
|
||||||
|
Loading…
Reference in New Issue
Block a user