Replace collapsible sidebar panels with tab-based navigation for vaults and tags with debounced filtering and dynamic placeholder text

This commit is contained in:
2026-03-22 22:42:35 -04:00
parent 6a782750de
commit 0d60dd8acc
3 changed files with 162 additions and 250 deletions
+62 -152
View File
@@ -548,29 +548,6 @@ select {
flex-shrink: 0;
}
.sidebar.vault-collapsed .tag-cloud-section {
flex: 1 1 auto;
min-height: 0;
max-height: none;
height: auto;
padding-top: 0;
}
.sidebar.vault-collapsed .sidebar-tree {
flex: 0 0 auto;
min-height: 0;
padding-bottom: 0;
}
.sidebar.vault-collapsed .tag-resize-handle {
border-top: none;
height: 0;
}
.sidebar.tag-collapsed .sidebar-tree {
flex: 1 1 auto;
min-height: 0;
}
/* --- Sidebar filter --- */
.sidebar-filter {
@@ -658,82 +635,77 @@ select {
color: var(--accent);
}
.sidebar-tree {
flex: 1;
overflow: hidden;
padding: 12px 0;
min-height: 80px;
/* --- Sidebar tabs --- */
.sidebar-tabs {
display: flex;
flex-direction: column;
flex-shrink: 0;
border-bottom: 1px solid var(--border);
padding: 0 8px;
gap: 2px;
background: var(--bg-sidebar);
}
.sidebar-tree::-webkit-scrollbar {
width: 6px;
}
.sidebar-tree::-webkit-scrollbar-thumb {
background: var(--scrollbar);
border-radius: 3px;
}
.sidebar-section-title {
.sidebar-tab {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
padding: 9px 8px 8px;
border: none;
border-bottom: 2px solid transparent;
background: transparent;
color: var(--text-muted);
font-family: 'JetBrains Mono', monospace;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
padding: 0;
}
.sidebar-panel-toggle {
width: 100%;
border: none;
background: transparent;
color: var(--text-muted);
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 8px 16px 10px;
letter-spacing: 0.07em;
cursor: pointer;
transition: color 150ms ease, background 150ms ease;
transition: color 150ms ease, border-color 150ms ease;
margin-bottom: -1px;
white-space: nowrap;
}
.sidebar-panel-toggle:hover {
.sidebar-tab:hover {
color: var(--text-primary);
background: var(--bg-hover);
}
.sidebar-panel-toggle .icon,
.sidebar-panel-toggle [data-lucide] {
color: inherit;
.sidebar-tab.active {
color: var(--accent);
border-bottom-color: var(--accent);
}
.sidebar-tab .icon {
flex-shrink: 0;
color: inherit;
}
.sidebar-panel-content.collapsed {
max-height: 0 !important;
opacity: 0;
overflow: hidden;
pointer-events: none;
}
.sidebar-panel-content {
min-height: 0;
overflow: hidden;
opacity: 1;
transition: max-height 340ms ease, opacity 220ms ease;
}
#vault-panel-content {
/* --- Sidebar tab panels --- */
.sidebar-tab-panel {
display: none;
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
max-height: 1000px;
scroll-behavior: smooth;
flex-direction: column;
}
#tag-panel-content {
max-height: 320px;
.sidebar-tab-panel.active {
display: flex;
flex-direction: column;
}
.sidebar-tab-panel::-webkit-scrollbar {
width: 6px;
}
.sidebar-tab-panel::-webkit-scrollbar-thumb {
background: var(--scrollbar);
border-radius: 3px;
}
#sidebar-panel-vaults .sidebar-dropdown {
padding: 10px 12px 6px;
}
.tree-item {
@@ -817,31 +789,32 @@ select {
.filter-result-item {
align-items: flex-start;
gap: 8px;
border-radius: 8px;
white-space: normal;
overflow: visible;
border-radius: 6px;
}
.filter-result-text {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.filter-result-primary,
.filter-result-secondary {
min-width: 0;
overflow-wrap: anywhere;
word-break: break-word;
white-space: normal;
}
.filter-result-primary {
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.filter-result-secondary {
color: var(--text-muted);
font-size: 0.78rem;
font-size: 0.75rem;
word-break: break-all;
opacity: 0.8;
}
.sidebar-filter-empty {
@@ -857,68 +830,13 @@ select {
border-radius: 4px;
}
/* --- Tag resize handle --- */
.tag-resize-handle {
height: 5px;
cursor: ns-resize;
background: transparent;
border-top: 1px solid var(--border);
flex-shrink: 0;
transition: background 150ms ease;
}
.tag-resize-handle:hover,
.tag-resize-handle.active {
background: var(--accent);
opacity: 0.5;
}
/* --- Tag Cloud --- */
.tag-cloud-section {
padding: 12px 0 0;
height: 180px;
min-height: 60px;
max-height: 400px;
overflow: hidden;
flex-shrink: 0;
display: flex;
flex-direction: column;
transition: height 340ms ease, min-height 340ms ease, max-height 340ms ease, flex 340ms ease;
}
.tag-cloud-section.collapsed-panel {
height: auto;
min-height: 0;
max-height: none;
overflow: hidden;
flex: 0 0 auto;
}
.tag-cloud-section::-webkit-scrollbar {
width: 6px;
}
.tag-cloud-section::-webkit-scrollbar-thumb {
background: var(--scrollbar);
border-radius: 3px;
}
.tag-cloud-title {
font-family: 'JetBrains Mono', monospace;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
margin-bottom: 0;
}
.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 0 16px 12px;
}
.tag-cloud-section:not(.collapsed-panel) #tag-panel-content {
overflow-y: auto;
flex: 1 1 auto;
padding: 14px 16px 16px;
align-content: flex-start;
}
.tag-item {
@@ -939,14 +857,6 @@ select {
display: none;
}
.tag-resize-handle.hidden {
display: none;
}
.sidebar.vault-collapsed .tag-panel-toggle {
border-top: 1px solid var(--border);
}
/* --- Sidebar resize handle (horizontal) --- */
.sidebar-resize-handle {
width: 5px;