UX: Improve display of short site description in header dropdown (#21628)

This commit is contained in:
Alan Guo Xiang Tan 2023-05-18 11:16:21 +09:00 committed by GitHub
parent 25276f62f9
commit 4ec9a947dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 13 deletions

View File

@ -5,14 +5,8 @@
@headerActions={{this.section.headerActions}}
@headerActionsIcon={{this.section.headerActionIcon}}
@class={{this.section.dragCss}}
@sectionDescription={{this.section.description}}
>
{{#if this.section.displayShortSiteDescription}}
<Sidebar::SectionMessage>
{{this.siteSettings.short_site_description}}
</Sidebar::SectionMessage>
{{/if}}
{{#each this.section.links as |link|}}
{{#if link.shouldDisplay}}
{{#if link.external}}

View File

@ -44,6 +44,12 @@
{{/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,8 +131,12 @@ export default class CommunitySection {
});
}
get displayShortSiteDescription() {
return !this.currentUser && !!this.siteSettings.short_site_description;
get description() {
if (!this.currentUser && !!this.siteSettings.short_site_description) {
return this.siteSettings.short_site_description;
} else {
return "";
}
}
get decoratedTitle() {

View File

@ -52,6 +52,10 @@
}
}
}
.sidebar-section-message {
padding: 0;
}
}
.sidebar-custom-sections .d-icon-globe {

View File

@ -52,10 +52,6 @@
padding-top: 0;
padding-bottom: 0.25em;
}
.sidebar-section-message {
padding: 0;
}
}
.sidebar-section-wrapper {