forked from vhaudiquet/rhema-together
feat(web): expand folders in place in the file browser
Opening a folder replaced the root listing, so every step inward lost the way back and the tree above it. A folder now opens under its parent, nested folders open under theirs, and the root stays visible. Each folder is read again when it is expanded, so files a turn added or removed show up the next time the folder opens. The size column hides below 260px of list width, where the indent leaves no room for both a name and a size.
This commit is contained in:
1 parent
b5babb682e
commit
7d98b04d63
2 files changed
+139
-101
No files matched your search
+43
-37
@@ -1684,6 +1684,7 @@ body.pane-resizing * {
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
.files-resizer {
|
||||
@@ -1729,50 +1730,14 @@ body.files-resizing-y * {
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
.crumbs {
|
||||
.tree-head {
|
||||
flex: 0 0 auto;
|
||||
padding: var(--sp-2);
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-1);
|
||||
}
|
||||
|
||||
.crumbs-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-1);
|
||||
flex-wrap: wrap;
|
||||
min-width: 0;
|
||||
font-size: var(--fs-small);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.crumb {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
color: var(--muted);
|
||||
font-size: var(--fs-small);
|
||||
line-height: var(--lh-body);
|
||||
overflow-wrap: anywhere;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.crumb:hover {
|
||||
color: var(--text);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.crumb-back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-1);
|
||||
align-self: flex-start;
|
||||
color: var(--muted);
|
||||
font-size: var(--fs-small);
|
||||
}
|
||||
|
||||
.file-list {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -1787,6 +1752,7 @@ body.files-resizing-y * {
|
||||
align-items: center;
|
||||
gap: var(--sp-1);
|
||||
padding: var(--sp-1) var(--sp-2);
|
||||
padding-left: calc(var(--sp-2) + var(--tree-depth, 0) * var(--sp-3));
|
||||
border: 1px solid transparent;
|
||||
border-radius: var(--r-control);
|
||||
background: transparent;
|
||||
@@ -1817,6 +1783,42 @@ body.files-resizing-y * {
|
||||
font-size: var(--fs-small);
|
||||
}
|
||||
|
||||
.tree-caret {
|
||||
flex: 0 0 auto;
|
||||
color: var(--faint);
|
||||
transition: transform 120ms ease;
|
||||
}
|
||||
|
||||
.tree-caret.open {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.tree-caret-gap {
|
||||
flex: 0 0 auto;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.tree-note {
|
||||
margin: 0;
|
||||
padding: var(--sp-1) var(--sp-2);
|
||||
padding-left: calc(var(--sp-2) + var(--tree-depth, 0) * var(--sp-3) + var(--sp-6));
|
||||
color: var(--faint);
|
||||
font-size: var(--fs-small);
|
||||
line-height: var(--lh-body);
|
||||
}
|
||||
|
||||
.tree-note.error {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
/* In a narrow list the name matters more than the size, and the indent
|
||||
for nested rows leaves no room for both. */
|
||||
@container (max-width: 260px) {
|
||||
.file-row-size {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.files-viewer {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
@@ -2543,4 +2545,8 @@ details:not([open]) > *:not(summary) {
|
||||
.sidebar {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.tree-caret {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user