mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 23:14:30 +08:00
67c0498f64
This PR is introducing glimmer usage in the chat-live-pane, for components but also for models. RestModel usage has been dropped in favor of native classes. Other changes/additions in this PR: - sticky dates, scrolling will now keep the date separator of the current section at the top of the screen - better unread management, marking a channel as unread will correctly mark the correct message and not mark the whole channel as read. Tracking state will also now correctly return unread count and unread mentions. - adds an animation on bottom arrow - better scrolling behavior, we should now always correctly keep the scroll position while loading more - reactions are now more reactive, and will update their tooltip without needed to close/reopen it - skeleton has been improved with placeholder images and reactions - when making a reaction on the desktop message actions, the menu won't move anymore - simplify logic and stop maintaining a list of unloaded messages
97 lines
2.1 KiB
SCSS
97 lines
2.1 KiB
SCSS
.chat-message-separator {
|
|
@include unselectable;
|
|
display: flex;
|
|
|
|
&-new {
|
|
position: relative;
|
|
padding: 20px 0;
|
|
|
|
.chat-message-separator__text-container {
|
|
text-align: center;
|
|
position: absolute;
|
|
height: 40px;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
z-index: 1;
|
|
top: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
.chat-message-separator__text {
|
|
color: var(--danger-medium);
|
|
background-color: var(--secondary);
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: var(--font-down-1);
|
|
}
|
|
}
|
|
|
|
.chat-message-separator__line-container {
|
|
width: 100%;
|
|
|
|
.chat-message-separator__line {
|
|
border-top: 1px solid var(--danger-medium);
|
|
}
|
|
}
|
|
}
|
|
|
|
&-date {
|
|
position: absolute;
|
|
width: 100%;
|
|
z-index: 1;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
pointer-events: none;
|
|
|
|
&.last-visit {
|
|
.chat-message-separator__text {
|
|
color: var(--danger-medium);
|
|
}
|
|
|
|
& + .chat-message-separator__line-container {
|
|
.chat-message-separator__line {
|
|
border-color: var(--danger-medium);
|
|
}
|
|
}
|
|
}
|
|
|
|
.chat-message-separator__text-container {
|
|
padding-top: 7px;
|
|
position: sticky;
|
|
top: -1px;
|
|
|
|
&.is-pinned {
|
|
.chat-message-separator__text {
|
|
border: 1px solid var(--primary-medium);
|
|
border-radius: 3px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.chat-message-separator__text {
|
|
@include unselectable;
|
|
background-color: var(--secondary);
|
|
border: 1px solid transparent;
|
|
color: var(--secondary-low);
|
|
font-size: var(--font-down-1);
|
|
padding: 0.25rem 0.5rem;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
& + .chat-message-separator__line-container {
|
|
padding: 20px 0;
|
|
box-sizing: border-box;
|
|
|
|
.chat-message-separator__line {
|
|
border-top: 1px solid var(--secondary-high);
|
|
left: 0;
|
|
margin: 0 0 -1px;
|
|
position: relative;
|
|
right: 0;
|
|
top: -1px;
|
|
}
|
|
}
|
|
}
|
|
}
|