mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: add HTML class for composer preview to manage sidebar height (#30956)
This adds the class `composer-has-preview` to the HTML element when the composer is opened and the preview is visible. This allows us to adjust the sidebar height, so that the previewless composer can overlap the sidebar and better utilize the available space. Before:  After: 
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
>
|
||||
<div class="grippie"></div>
|
||||
{{#if this.composer.visible}}
|
||||
{{html-class (if this.composer.showPreview "composer-has-preview")}}
|
||||
<ComposerMessages
|
||||
@composer={{this.composer.model}}
|
||||
@messageCount={{this.composer.messageCount}}
|
||||
|
||||
@@ -88,6 +88,10 @@
|
||||
|
||||
// allows sidebar to scroll to the bottom when the composer is open
|
||||
height: calc(100% - var(--composer-height, 0px));
|
||||
|
||||
html:not(.composer-has-preview) & {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-sections {
|
||||
|
||||
Reference in New Issue
Block a user