0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 19:36:44 +08:00
discourse/themes/horizon/scss/chat.scss
chapoi 1c9be4e00d
UX: Show chat indicator on mobile (#35973)
We overlooked the consequence of removing the chat icon in the header in
#35015 so this commit brings it back, in a different way.
On mobile only, the back button will save space to display the unread
indicator, if needed:

<img width="732" height="1568" alt="CleanShot 2025-11-11 at 15 53 50@2x"
src="https://github.com/user-attachments/assets/6ddff73b-3f5c-493b-ad44-ec130c8be491"
/>

As a consequence, there will be extra white-space between back-button
and channel title: this is intentional, unavoidable (alternative is
layout shift), and in line with dominating message apps.

This commit also consolidates the unread indicator styling a bit more.
2025-11-12 08:54:22 -06:00

105 lines
2 KiB
SCSS
Vendored

@use "lib/viewport";
.full-page-chat.full-page-chat-sidebar-enabled {
border: none;
}
.c-navbar-container {
background-color: var(--d-content-background);
.full-page-chat & {
@include viewport.from(sm) {
padding: 0 1.5em;
}
}
.chat-drawer.is-collapsed & {
background: var(--tertiary-low);
opacity: 0.7;
}
}
body.has-full-page-chat {
background-color: var(--background-color);
}
.chat-drawer-container {
.is-expanded & {
box-shadow: 0 0 0 2px var(--tertiary-medium);
}
.chat-drawer.is-expanded & {
border: none;
}
.c-navbar__title {
padding-left: 0.33em; // visual alignment for chat index, which does not havea a backarrow
}
}
.chat-drawer-outlet-container {
z-index: z("composer", "content");
padding-bottom: 0;
right: var(--main-grid-gap);
&:has(.is-expanded) {
z-index: calc(z("composer", "dropdown") + 1);
}
}
// the below are elements whose z-index needs to be adjusted due to the above change
.chat-message-actions-container {
.has-drawer-chat & {
z-index: calc(z("composer", "dropdown") + 1);
}
}
.fk-d-menu[data-identifier="usercard"] {
.has-drawer-chat & {
z-index: z("modal", "dialog");
}
}
.chat-drawer {
.peek-mode-active & {
max-width: 90vw;
}
}
.chat-drawer .channels-list-container .chat-channel-row {
margin-bottom: var(--spacing-block-xs);
font-size: var(--font-up-1);
border-bottom: none;
&:hover {
background-color: var(--d-sidebar-active-background);
}
}
.channel-title {
font-weight: bold;
text-transform: uppercase;
font-size: var(--font-down-1);
}
.chat-composer__wrapper {
background: var(--d-content-background);
}
.chat-message-actions .more-buttons .btn-icon-text {
&:hover {
background-color: var(--d-selected);
box-shadow: none;
color: var(--primary);
}
}
.chat-drawer-active.chat-drawer-expanded .chat-composer-dropdown__menu-content {
z-index: z("modal", "dialog");
}
.chat-replying-indicator-container {
@include viewport.from(sm) {
margin-left: calc(0.65em + 0.2rem);
}
}