Skip to content

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

UX: improve layout of chat browse in drawer mode (#43748)

Krisa280cdceb165
diff --git a/app/assets/stylesheets/common/components/d-filter-controls.scss b/app/assets/stylesheets/common/components/d-filter-controls.scss
index d997bf67c98..f84bfc83c17 100644
--- a/app/assets/stylesheets/common/components/d-filter-controls.scss
+++ b/app/assets/stylesheets/common/components/d-filter-controls.scss
@@ -26,7 +26,7 @@
&__dropdowns {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(10em, 1fr));
+ grid-template-columns: repeat(auto-fit, minmax(5em, 1fr));
gap: var(--space-2);
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs
index 7df1a2ec1c3..b2b3ff1fad2 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs
@@ -59,7 +59,7 @@ export default <template>
<ToggleChannelMembershipButton
@channel={{@channel}}
@options={{hash
- leaveClass="btn-transparent --danger chat-channel-card__leave-btn"
+ leaveClass="btn-default btn-small chat-channel-card__leave-btn"
labelType="short"
}}
/>
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-list-options-button.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-list-options-button.gjs
index 8c817e2e193..096654230bb 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-list-options-button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-list-options-button.gjs
@@ -35,7 +35,7 @@ export default class ChatChannelListOptionsButton extends Component {
<template>
<DButton
- class="chat-channel-list-options-button title-action"
+ class="btn-transparent chat-channel-list-options-button title-action"
...attributes
@action={{this.openMenu}}
@forwardEvent={{true}}
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 7f99fca6f99..e0da5e1da47 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
@@ -635,7 +635,7 @@ export default class ChatRouteChannelInfoSettings extends Component {
@onLeave={{this.onLeaveChannel}}
@options={{hash
joinClass="btn-primary"
- leaveClass="btn-danger"
+ leaveClass="btn-default"
joinIcon="right-to-bracket"
leaveIcon="right-from-bracket"
leaveDestructive=true
diff --git a/plugins/chat/assets/stylesheets/common/chat-browse.scss b/plugins/chat/assets/stylesheets/common/chat-browse.scss
index 894594f0064..c04940c9c82 100644
--- a/plugins/chat/assets/stylesheets/common/chat-browse.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-browse.scss
@@ -1,4 +1,5 @@
@use "lib/viewport";
+@use "lib/container";
.chat-browse-view {
position: relative;
@@ -26,8 +27,7 @@
grid-template-columns: repeat(2, 1fr);
gap: 1.25rem;
- @include viewport.until(md) {
- grid-template-columns: repeat(1, 1fr);
+ @include container.until(md) {
gap: 1rem;
}
}
diff --git a/plugins/chat/assets/stylesheets/common/chat-channel-card.scss b/plugins/chat/assets/stylesheets/common/chat-channel-card.scss
index 7233af0c8c9..0be50f5092b 100644
--- a/plugins/chat/assets/stylesheets/common/chat-channel-card.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-channel-card.scss
@@ -1,11 +1,14 @@
+@use "lib/container";
+
.chat-channel-card {
--chat-channel-card-border: transparent;
display: grid;
grid-template-areas:
- "title cta"
- "membercount ."
- "description description";
- grid-template-rows: auto auto 1fr;
+ "title"
+ "membercount"
+ "description"
+ "cta";
+ grid-template-rows: auto auto auto 1fr;
align-items: center;
position: relative;
padding: 0.75rem 1rem;
@@ -15,6 +18,15 @@
min-width: 0;
border-left: 5px solid transparent;
border-color: var(--chat-channel-card-border);
+ gap: var(--space-1) var(--space-2);
+
+ @include container.from(sm) {
+ grid-template-areas:
+ "title cta"
+ "membercount membercount"
+ "description description";
+ grid-template-rows: auto auto 1fr;
+ }
&.--closed,
&.--archived {
@@ -23,10 +35,12 @@
&__header {
@include ellipsis;
- align-items: center;
display: flex;
- grid-area: title;
height: min-content;
+
+ @include container.from(sm) {
+ grid-area: title;
+ }
}
&__read-restricted,
@@ -46,45 +60,58 @@
@include line-clamp(2);
align-self: flex-start;
color: var(--primary-medium);
- padding-top: 0.5rem;
- grid-area: description;
+ font-size: var(--font-down-1-rem);
+
+ @include container.from(sm) {
+ grid-area: description;
+ font-size: var(--font-0);
+ }
}
&__members {
font-size: var(--font-down-1-rem);
- grid-area: membercount;
+
+ @include container.from(sm) {
+ grid-area: membercount;
+ }
}
&__name {
@include ellipsis;
+
+ .emoji {
+ vertical-align: -0.1em;
+ }
}
&__name-container {
display: flex;
- gap: 0.25em;
align-items: center;
color: var(--primary);
- font-size: var(--font-up-1-rem);
text-decoration: none;
min-width: 0;
+ @include container.from(sm) {
+ font-size: var(--font-up-1-rem);
+ }
+
&:visited,
&:hover {
color: var(--primary);
}
}
- &__leave-btn {
- padding-right: 0;
-
- &:focus {
- @include default-focus;
- }
- }
-
&__cta {
display: flex;
align-items: center;
- justify-content: flex-end;
+
+ @include container.until(sm) {
+ margin-top: auto;
+ grid-area: cta;
+ }
+
+ @include container.from(sm) {
+ justify-content: flex-end;
+ }
}
}
diff --git a/plugins/discourse-events/assets/stylesheets/common/livestream.scss b/plugins/discourse-events/assets/stylesheets/common/livestream.scss
index 51be48ac006..cf8b8c118f7 100644
--- a/plugins/discourse-events/assets/stylesheets/common/livestream.scss
+++ b/plugins/discourse-events/assets/stylesheets/common/livestream.scss
@@ -21,12 +21,6 @@ body.chat-enabled.livestream-topic.confirmed-event-assistance {
}
}
-.livestream-rsvp__going-button {
- @container (width < 40rem) {
- width: 100%;
- }
-}
-
.discourse-calendar-livestream-zoom-entry {
display: flex;
flex-direction: column;