Skip to content

A platform for community discussion. Free, open, simple.

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

Alan Guo Xiang Tanaba7f3cf13c8
diff --git a/app/assets/javascripts/discourse/app/components/sidebar/common/custom-section.hbs b/app/assets/javascripts/discourse/app/components/sidebar/common/custom-section.hbs
index 6f8e3bce36a..f42bc7fd71f 100644
--- a/app/assets/javascripts/discourse/app/components/sidebar/common/custom-section.hbs
+++ b/app/assets/javascripts/discourse/app/components/sidebar/common/custom-section.hbs
@@ -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}}
diff --git a/app/assets/javascripts/discourse/app/components/sidebar/section.hbs b/app/assets/javascripts/discourse/app/components/sidebar/section.hbs
index 570b4415196..2f3baf8ebde 100644
--- a/app/assets/javascripts/discourse/app/components/sidebar/section.hbs
+++ b/app/assets/javascripts/discourse/app/components/sidebar/section.hbs
@@ -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}}
diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/community-section.js b/app/assets/javascripts/discourse/app/lib/sidebar/community-section.js
index 29643939af9..97e653ca46d 100644
--- a/app/assets/javascripts/discourse/app/lib/sidebar/community-section.js
+++ b/app/assets/javascripts/discourse/app/lib/sidebar/community-section.js
@@ -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`
diff --git a/app/assets/javascripts/discourse/tests/acceptance/sidebar-anonymous-community-section-test.js b/app/assets/javascripts/discourse/tests/acceptance/sidebar-anonymous-community-section-test.js
index 35c84f3ea09..c38f84bebbc 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/sidebar-anonymous-community-section-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/sidebar-anonymous-community-section-test.js
@@ -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,22 +14,8 @@ 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"
- );
- });
+ needs.site({});
test("everything section link is shown by default ", async function (assert) {
await visit("/");