mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 03:48:23 +00: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: ![image](https://github.com/user-attachments/assets/8780f159-5d24-4ac0-8a4f-43a9b1665532) After: ![image](https://github.com/user-attachments/assets/baf69856-0ece-453f-aa0f-e7be9939af97)
This commit is contained in:
parent
f1bdd86a8c
commit
097d987332
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user