mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
- Clicking a card in the channel tree took the member to that card's board. It now opens the card in the middle pane with its conversation beside it, whatever board it is on, and the page stays where it is. The card's conversation comes from a publication of its own (chatViewCardComments) with the tree's limits - a board the member sees, a role that reads comments, only their cards on an assigned-only board - and its writers' names; the comment box follows the card's own board. - Folding the Channels or Comments pane left only an icon: the double caret stays now, pointing the way the pane opens, mirrored with the others right to left. Tests: chatView.test.cjs (no navigation, the subscription, the card's board for commenting, the publication's limits, the carets), email-chat-views.e2e.js (another board's card in the middle without leaving the page, carets visible on folded panes). Thanks to xet7 !
348 lines
7.0 KiB
CSS
348 lines
7.0 KiB
CSS
/* Board View / Chat: Slack / Rocket.Chat's three panes in the board's own
|
|
theme. No colour of its own: the accent is the theme's (--theme-accent,
|
|
falling back to WeKan blue as paginationControls.css does), surfaces are
|
|
translucent over the board background, text inherits.
|
|
|
|
The container is laid out LEFT TO RIGHT in every language and the pane
|
|
order is decided in chatView.js (paneOrder), so a right-to-left language
|
|
gets the mirror image exactly once; the pane CONTENTS follow the page's own
|
|
direction. */
|
|
|
|
.chat-view {
|
|
direction: ltr;
|
|
display: flex;
|
|
align-items: stretch;
|
|
height: calc(100vh - 110px);
|
|
min-height: 320px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-view[data-dir="rtl"] .chat-view-pane {
|
|
direction: rtl;
|
|
}
|
|
|
|
.chat-view-pane {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
background: rgba(255, 255, 255, 0.85);
|
|
color: #172b4d;
|
|
}
|
|
|
|
.chat-view-tree,
|
|
.chat-view-chat {
|
|
flex-grow: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-view-card {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.chat-view-pane-folded {
|
|
flex: 0 0 36px;
|
|
align-items: center;
|
|
padding-top: 8px;
|
|
}
|
|
|
|
.chat-view-pane-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.chat-view-pane-title {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* A folded pane keeps its double caret, above the pane's icon. */
|
|
.chat-view-pane-folded button {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
/* Right to left the tree is on the right and the chat on the left, so every
|
|
double caret points the other way. */
|
|
.chat-view[data-dir="rtl"] .chat-view-fold-caret {
|
|
transform: scaleX(-1);
|
|
}
|
|
|
|
.chat-view-pane-header button,
|
|
.chat-view-pane-folded button {
|
|
margin: 0 !important;
|
|
padding: 4px 8px;
|
|
background: transparent;
|
|
color: inherit;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* The draggable borders. */
|
|
.chat-view-resizer {
|
|
flex: 0 0 6px;
|
|
cursor: col-resize;
|
|
background: rgba(0, 0, 0, 0.08);
|
|
touch-action: none;
|
|
}
|
|
|
|
.chat-view-resizer:hover,
|
|
.chat-view-resizer:focus {
|
|
background: var(--theme-accent, #01628c);
|
|
outline: none;
|
|
}
|
|
|
|
/* The tree. */
|
|
.chat-view-tree ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.chat-view-workspaces {
|
|
overflow-y: auto;
|
|
padding: 6px 0;
|
|
}
|
|
|
|
.chat-view-node > ul,
|
|
.chat-view-collapse > ul {
|
|
padding-inline-start: 14px;
|
|
}
|
|
|
|
/* The caret before the icon: it points to where the text runs (right, or
|
|
left in a right-to-left language) when closed, and down when open. */
|
|
.chat-view-caret {
|
|
flex: 0 0 auto;
|
|
width: 0.8em;
|
|
text-align: center;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
.chat-view-tree[dir="rtl"] .chat-view-caret {
|
|
transform: scaleX(-1);
|
|
}
|
|
.chat-view-node.is-open > .chat-view-row > .chat-view-caret {
|
|
transform: rotate(90deg);
|
|
}
|
|
.chat-view-tree[dir="rtl"] .chat-view-node.is-open > .chat-view-row > .chat-view-caret {
|
|
transform: rotate(90deg) scaleX(-1);
|
|
}
|
|
/* A card has no caret: its # holds the same place. */
|
|
.chat-view-channel > .chat-view-row > .chat-view-hash {
|
|
width: 0.8em;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Opening and closing slide: the rows under a node grow from nothing to
|
|
their height (a 0fr to 1fr grid row) - and simply show or hide for a
|
|
member who asked the system for reduced motion. */
|
|
.chat-view-collapse {
|
|
display: grid;
|
|
grid-template-rows: 0fr;
|
|
transition: grid-template-rows 0.2s ease;
|
|
}
|
|
.chat-view-collapse > ul {
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
visibility: hidden;
|
|
transition: visibility 0.2s;
|
|
}
|
|
.chat-view-node.is-open > .chat-view-collapse {
|
|
grid-template-rows: 1fr;
|
|
}
|
|
.chat-view-node.is-open > .chat-view-collapse > ul {
|
|
visibility: visible;
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.chat-view-collapse,
|
|
.chat-view-collapse > ul,
|
|
.chat-view-caret {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
/* Messages this member has not read, under that row. */
|
|
.chat-view-unread {
|
|
flex: 0 0 auto;
|
|
margin-inline-start: auto;
|
|
min-width: 1.6em;
|
|
padding: 0 6px;
|
|
border-radius: 9px;
|
|
background: var(--theme-accent, #01628c);
|
|
color: #fff;
|
|
font-size: 0.75em;
|
|
font-weight: bold;
|
|
line-height: 1.6;
|
|
text-align: center;
|
|
}
|
|
.chat-view-all-cards {
|
|
flex: 0 0 auto;
|
|
margin: 0;
|
|
padding: 0 4px;
|
|
border: 0;
|
|
background: none;
|
|
color: inherit;
|
|
opacity: 0.5;
|
|
cursor: pointer;
|
|
}
|
|
.chat-view-row:hover .chat-view-all-cards,
|
|
.chat-view-all-cards:focus-visible,
|
|
.chat-view-all-cards[aria-pressed="true"] {
|
|
opacity: 1;
|
|
}
|
|
.chat-view-row:focus-visible {
|
|
outline: 2px solid currentColor;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
.chat-view-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 3px 12px;
|
|
border-radius: 4px;
|
|
color: inherit;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.chat-view-row:hover {
|
|
background: rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.chat-view-row-title {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chat-view-node-heading {
|
|
margin: 10px 0 2px;
|
|
padding-inline-start: 12px;
|
|
font-size: 0.8em;
|
|
text-transform: uppercase;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.chat-view-board.is-current > .chat-view-row {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.chat-view-hash {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.chat-view-channel.is-selected > .chat-view-row {
|
|
background: var(--theme-accent, #01628c);
|
|
color: #fff;
|
|
}
|
|
|
|
/* The card: the same card details as everywhere, held in the pane instead
|
|
of floating beside a minicard. */
|
|
.chat-view-card-body {
|
|
flex: 1 1 auto;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.chat-view-card-body .card-details {
|
|
position: static !important;
|
|
inset: auto !important;
|
|
width: auto !important;
|
|
max-width: none !important;
|
|
height: auto !important;
|
|
max-height: none !important;
|
|
transform: none !important;
|
|
visibility: visible !important;
|
|
box-shadow: none !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.chat-view-empty {
|
|
padding: 16px;
|
|
}
|
|
|
|
/* The chat. */
|
|
.chat-view-messages {
|
|
flex: 1 1 auto;
|
|
overflow-y: auto;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.chat-view-message {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
padding: 6px 0;
|
|
}
|
|
|
|
.chat-view-message-body {
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.chat-view-message-author {
|
|
font-weight: bold;
|
|
margin-inline-end: 8px;
|
|
}
|
|
|
|
.chat-view-message-time {
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.chat-view-message-text {
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.chat-view-message.is-mine .chat-view-message-author {
|
|
color: var(--theme-accent, #01628c);
|
|
}
|
|
|
|
.chat-view-compose {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.chat-view-compose textarea {
|
|
flex: 1 1 auto;
|
|
min-height: 2.5em;
|
|
margin: 0;
|
|
resize: vertical;
|
|
}
|
|
|
|
.chat-view-compose button {
|
|
margin: 0 !important;
|
|
align-self: flex-end;
|
|
}
|
|
|
|
/* A dark theme: the panes darken with it. */
|
|
body.dark-mode .chat-view-pane,
|
|
.board-color-dark .chat-view-pane {
|
|
background: rgba(30, 30, 30, 0.88);
|
|
color: #eee;
|
|
}
|
|
|
|
/* Narrow windows: one pane at a time is all that fits; the tree and the chat
|
|
stack above and below the card. */
|
|
@media (max-width: 800px) {
|
|
.chat-view {
|
|
flex-direction: column;
|
|
height: auto;
|
|
}
|
|
|
|
.chat-view-pane {
|
|
flex-basis: auto !important;
|
|
}
|
|
|
|
.chat-view-resizer {
|
|
display: none;
|
|
}
|
|
}
|