Skip to content

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

UX: make chat drawer settingspage full height (#27385)

chapoib6c2430bf601
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-settings.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-settings.gjs
index bf798dd9818..6e339010800 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-settings.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/routes/channel-info-settings.gjs
@@ -579,6 +579,12 @@ export default class ChatRouteChannelInfoSettings extends Component {
{{/if}}
<form.section class="--leave-channel" as |section|>
+ {{#if @channel.chatable.group}}
+ <div class="c-channel-settings__leave-info">
+ {{icon "exclamation-triangle"}}
+ {{i18n "chat.channel_settings.leave_groupchat_info"}}
+ </div>
+ {{/if}}
<section.row>
<:action>
<ToggleChannelMembershipButton
@@ -593,12 +599,6 @@ export default class ChatRouteChannelInfoSettings extends Component {
/>
</:action>
</section.row>
- {{#if @channel.chatable.group}}
- <div class="c-channel-settings__leave-info">
- {{icon "exclamation-triangle"}}
- {{i18n "chat.channel_settings.leave_groupchat_info"}}
- </div>
- {{/if}}
</form.section>
</ChatForm>
</div>
diff --git a/plugins/chat/assets/stylesheets/common/chat-drawer.scss b/plugins/chat/assets/stylesheets/common/chat-drawer.scss
index a2753a1fb29..411e16fe351 100644
--- a/plugins/chat/assets/stylesheets/common/chat-drawer.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-drawer.scss
@@ -90,10 +90,25 @@ html.rtl {
.chat-drawer-content {
@include chat-scrollbar();
+ display: flex;
+ flex-direction: column;
box-sizing: border-box;
height: 100%;
min-height: 1px;
position: relative;
overflow-y: auto;
overscroll-behavior: contain;
+
+ .c-channel-settings {
+ flex-grow: 1;
+
+ .chat-form {
+ height: 100%;
+ }
+
+ .chat-form__section.--leave-channel {
+ margin-top: auto;
+ margin-bottom: 0;
+ }
+ }
}