fix(ui): fix list view column spacing, rubber-band selection, and clippy warnings

Add column-gap to list header/items, prevent rubber-band selection from
swallowing clicks on list headers and file items, preserve rubber-band
selection after mouseup, and extract type aliases to resolve clippy
type_complexity warnings.
This commit is contained in:
Jared Wolff
2026-03-05 21:07:19 -05:00
parent d8eecbd9ca
commit 4617c1c1df
7 changed files with 53 additions and 37 deletions
+2
View File
@@ -517,6 +517,8 @@ function setupEventListeners() {
// Deselect all cards when clicking empty area (not on a card, menu, or modal)
// Note: multiSelect._hookGlobalDeselect() handles clearing the internal
// selection state; this handler only covers the legacy CSS class removal.
// Skip if a rubber-band selection just finished — the click is a side-effect.
if (window.__rubberBandJustFinished) return;
if (!e.target.closest('.file-card') && !e.target.closest('.file-item') && !e.target.closest('.context-menu') && !e.target.closest('.about-modal') && !e.target.closest('.batch-action-bar') && !e.target.closest('.list-header.selection-mode')) {
document.querySelectorAll('.file-card.selected').forEach(c => c.classList.remove('selected'));
document.querySelectorAll('.file-item.selected').forEach(c => c.classList.remove('selected'));