A platform for community discussion. Free, open, simple.
UX: hide double empty state on chat thread (#42087)
chapoi1bbe819f9bd4
diff --git a/plugins/chat/assets/stylesheets/common/chat-channel-preview-card.scss b/plugins/chat/assets/stylesheets/common/chat-channel-preview-card.scssindex 29f44388788..9723772e287 100644--- a/plugins/chat/assets/stylesheets/common/chat-channel-preview-card.scss+++ b/plugins/chat/assets/stylesheets/common/chat-channel-preview-card.scss@@ -1,3 +1,14 @@+@use "lib/viewport";++.chat-thread:has(.chat-channel-preview-card) {+ .--channel-thread & {+ @include viewport.from(sm) {+ padding-bottom: var(--space-8);+ box-sizing: border-box;+ }+ }+}+.chat-channel-preview-card {display: grid;grid-template-columns: auto 1fr auto;@@ -18,6 +29,12 @@min-width: 60%;box-sizing: border-box;+ .--channel-thread & {+ @include viewport.from(sm) {+ display: none;+ }+ }+&.--no-access {grid-template-columns: auto 1fr;grid-template-areas:diff --git a/plugins/chat/spec/system/visit_channel_spec.rb b/plugins/chat/spec/system/visit_channel_spec.rbindex 9bf462d4b8b..6b921d59a31 100644--- a/plugins/chat/spec/system/visit_channel_spec.rb+++ b/plugins/chat/spec/system/visit_channel_spec.rb@@ -142,7 +142,7 @@ RSpec.describe "Visit channel" doit "allows to join it" dochat.visit_thread(thread)- expect(page).to have_css(".toggle-channel-membership-button.-join", count: 2)+ expect(page).to have_css(".toggle-channel-membership-button.-join", count: 1)endendend