forked from vhaudiquet/rhema-together
feat(web): make the room panes resizable
Drag the divider between the conversation and the workspace, or focus it and use the arrow keys. The width stays between 380px and enough room for a 420px conversation, and is stored in localStorage so it survives reloads. Below 1100px the workspace remains a fixed overlay, so the divider is hidden there.
This commit is contained in:
1 parent
e579653f75
commit
5be17cf4ef
2 files changed
+219
-3
No files matched your search
@@ -1117,13 +1117,50 @@ button {
|
||||
bottom: var(--sp-2);
|
||||
}
|
||||
|
||||
.pane-resizer {
|
||||
flex: 0 0 var(--sp-2);
|
||||
position: relative;
|
||||
cursor: col-resize;
|
||||
touch-action: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.pane-resizer::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: calc(50% - 0.5px);
|
||||
width: 1px;
|
||||
background: var(--border);
|
||||
transition: background-color 120ms ease, width 120ms ease, left 120ms ease;
|
||||
}
|
||||
|
||||
.pane-resizer:hover::before,
|
||||
.pane-resizer:focus-visible::before,
|
||||
body.pane-resizing .pane-resizer::before {
|
||||
left: calc(50% - 1px);
|
||||
width: 2px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.pane-resizer:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
body.pane-resizing,
|
||||
body.pane-resizing * {
|
||||
cursor: col-resize !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
.right-pane {
|
||||
flex: 0 0 44%;
|
||||
flex: 0 0 var(--pane-width, 44%);
|
||||
min-width: 380px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
border-left: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
container-type: inline-size;
|
||||
}
|
||||
@@ -1614,6 +1651,10 @@ button {
|
||||
}
|
||||
|
||||
@media (max-width: 1099px) {
|
||||
.pane-resizer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.right-pane {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -1630,6 +1671,12 @@ button {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1100px) {
|
||||
.chat-column {
|
||||
min-width: 420px;
|
||||
}
|
||||
}
|
||||
|
||||
@container (max-width: 430px) {
|
||||
.files {
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
Reference in new issue
Block a user