ux(classifier): stack the folder count below the folder name

The "direct+total folders/files" badge was right-aligned on the folder row;
move it under the name. The name + count now live in a vertical .folder-namebox
(flex column, flex:1), and the row aligns items to the top so the toggle/icon
sit on the name line with the count beneath. Dropped the count's right margin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZDDC 2026-06-15 10:09:46 -05:00
parent 4830cec2f8
commit 2989e6e847
2 changed files with 18 additions and 6 deletions

View file

@ -184,7 +184,7 @@
/* Folder Item */
.folder-item {
display: flex;
align-items: center;
align-items: flex-start; /* toggle/icon sit on the name line; count drops below */
padding: 0.5rem;
cursor: pointer;
border-radius: var(--radius);
@ -269,8 +269,15 @@
color: var(--text-muted);
}
.folder-name {
/* Name + count stacked vertically (count below the name, not right-aligned). */
.folder-namebox {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.folder-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -279,7 +286,6 @@
.folder-count {
font-size: 11px;
color: var(--text-muted);
margin-left: 0.5rem;
}
.folder-children {

View file

@ -336,18 +336,24 @@
if (agg === 'excluded') item.classList.add('excluded');
}
// Folder name
// Name + counts stacked vertically: the count badge sits BELOW the name
// rather than right-aligned on the row.
const namebox = document.createElement('div');
namebox.className = 'folder-namebox';
const name = document.createElement('span');
name.className = 'folder-name';
name.textContent = folder.name;
item.appendChild(name);
namebox.appendChild(name);
// Subfolder / file counts (immediate). Greyed via the row's .scanning
// class until the subtree is fully scanned.
const count = document.createElement('span');
count.className = 'folder-count';
populateCount(count, folder);
item.appendChild(count);
namebox.appendChild(count);
item.appendChild(namebox);
// Extract button for ZIP roots
if (folder.isZipRoot) {