UX: Drop display of short_site_description site settings in sidebar (#21759)

Why are we making this change?

Currently, we are displaying the value of the `short_site_description`
site setting in the sidebar only for anonymous user. However, the
display of the description seems out of place in both the `sidebar` and
`header dropdown` navigation menu and do not think the sidebar is the
right place to display it anymore.
This commit is contained in:
Alan Guo Xiang Tan 2023-05-26 16:04:55 +09:00 committed by GitHub
parent a22f83b7f7
commit aba7f3cf13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 31 deletions

View File

@ -5,7 +5,6 @@
@headerActions={{this.section.headerActions}}
@headerActionsIcon={{this.section.headerActionIcon}}
@class={{this.section.dragCss}}
@sectionDescription={{this.section.description}}
>
{{#each this.section.links as |link|}}
{{#if link.shouldDisplay}}

View File

@ -44,12 +44,6 @@
{{/if}}
</div>
{{#if @sectionDescription}}
<Sidebar::SectionMessage>
{{@sectionDescription}}
</Sidebar::SectionMessage>
{{/if}}
{{#if this.displaySectionContent}}
<ul class="sidebar-section-content" id={{this.sidebarSectionContentID}}>
{{yield}}

View File

@ -131,14 +131,6 @@ export default class CommunitySection {
});
}
get description() {
if (!this.currentUser && !!this.siteSettings.short_site_description) {
return this.siteSettings.short_site_description;
} else {
return "";
}
}
get decoratedTitle() {
return I18n.t(
`sidebar.sections.${this.section.title.toLowerCase()}.header_link_text`

View File

@ -5,7 +5,6 @@ import { test } from "qunit";
import {
acceptance,
exists,
query,
queryAll,
} from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers";
@ -15,23 +14,9 @@ acceptance("Sidebar - Anonymous user - Community Section", function (needs) {
navigation_menu: "sidebar",
faq_url: "https://discourse.org",
});
needs.site({});
test("display short site description site setting when it is set", async function (assert) {
this.siteSettings.short_site_description =
"This is a short description about the site";
await visit("/");
assert.strictEqual(
query(
".sidebar-section[data-section-name='community'] .sidebar-section-message"
).textContent.trim(),
this.siteSettings.short_site_description,
"displays the short site description under the community section"
);
});
test("everything section link is shown by default ", async function (assert) {
await visit("/");