mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 17:53:43 +08:00
5ce0697348
Before this commit chat was applying a fixed height on everything under the `/chat` route. It's only really needed on the channel page with the composer at the bottom of the page. This commits makes the following changes: - moves height limitation from `#main-outlet-wrapper` to `.chat-channel` - makes browse channel page and members list page full height and rely on main document scrollbar - adds height computation for draft header and direct message creator block to ensure the height is correct when creating a draft channel - makes chat index full height to rely on the browser scrollbar. As a result the <kbd> + </kbd> button used on mobile to create a direct message as been moved out of `<ChannelsList>` into the chat index template - sidebar height was relying on chat setting a max height, as a result the height computation of sidebar has been changed to work correctly, especially with an opened keyboard on mobile or ipad
80 lines
1.5 KiB
SCSS
80 lines
1.5 KiB
SCSS
@import "common/foundation/mixins";
|
|
|
|
.full-page-chat {
|
|
overflow: hidden; //prevents double scroll
|
|
|
|
.channels-list {
|
|
overflow-y: overlay;
|
|
padding-bottom: 6rem;
|
|
box-sizing: border-box;
|
|
|
|
.channels-list-container {
|
|
background: var(--secondary);
|
|
}
|
|
|
|
.chat-channel-row {
|
|
height: 4em;
|
|
margin: 0;
|
|
padding: 0 1.5rem;
|
|
border-radius: 0;
|
|
border-bottom: 1px solid var(--primary-low);
|
|
|
|
.chat-channel-metadata {
|
|
.chat-channel-unread-indicator {
|
|
font-size: var(--font-down-2);
|
|
margin-top: 0.25rem;
|
|
}
|
|
&__date {
|
|
font-size: var(--font-down-2);
|
|
}
|
|
}
|
|
}
|
|
|
|
.chat-channel-divider {
|
|
font-size: var(--font-up-1);
|
|
|
|
&:first-of-type {
|
|
padding-top: 1rem;
|
|
}
|
|
|
|
.channel-title {
|
|
color: var(--quaternary);
|
|
font-size: var(--font-down-1);
|
|
}
|
|
}
|
|
|
|
.chat-user-avatar {
|
|
+ .chat-channel-title__usernames {
|
|
margin-left: 1rem;
|
|
}
|
|
}
|
|
|
|
.chat-channel-title {
|
|
width: 100%;
|
|
overflow: hidden;
|
|
|
|
&__users-count {
|
|
font-size: var(--font-up-2);
|
|
& + .chat-channel-title__name {
|
|
margin-left: 1rem;
|
|
}
|
|
}
|
|
|
|
&__name {
|
|
margin-left: 0.75em;
|
|
font-size: var(--font-up-1);
|
|
}
|
|
|
|
&__category-badge {
|
|
font-size: var(--font-up-1);
|
|
}
|
|
|
|
&__user-status-message {
|
|
flex-shrink: 3;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
}
|
|
}
|