feat: compact breadcrumb menu + 'X more' Notion-style in workspace
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

1. Compact breadcrumb hover menu:
   - Reduced font-size: header-breadcrumb 14→13px, breadcrumb-link 14→13px
   - Dropdown menus: fd-nav-menu min-width 240→200px, padding reduced
   - fd-nav-item: padding 6px8→4px6, font 14→13px, gap 8→6px
   - fd-nav-section: font 11→10px, padding reduced
   - fd-nav-ico: size 16→14px, width 20→18px
   - fd-nav-arrow: size 16→14px, margin-left 4→2px

2. 'X more' Notion-style (tree view):
   - Shows first 5 items in displayTree, hides rest
   - 6th item shows 'X more...' with count of remaining items
   - Click to expand and show all items
   - 'Show less' button to collapse back to 5
   - showAll state auto-resets on folder navigation, sort, filter
   - Styling: semi-transparent hover effect on ws-more-item
This commit is contained in:
2026-07-18 10:18:08 -04:00
parent 37c8e99151
commit 5b56f970ee
2 changed files with 43 additions and 20 deletions
+26 -3
View File
@@ -74,6 +74,10 @@
.ws-tree-item:hover .pin-icon{opacity:1;}
.pin-icon.pinned{opacity:1;color:var(--accent);}
/* "X more" toggle in tree view */
.ws-more-item{cursor:pointer;opacity:.7;transition:opacity 150ms;}
.ws-more-item:hover{opacity:1;background:var(--bg-tertiary);}
/* Multi-select */
.item-checkbox{width:14px;height:14px;flex-shrink:0;cursor:pointer;accent-color:var(--accent);opacity:0;transition:opacity 150ms;}
.ws-tree-item:hover .item-checkbox,.ws-tree-item.selected .item-checkbox{opacity:1;}
@@ -339,6 +343,7 @@ window._wsInitData = (function() {
showCreate:false,
showRename:false,
showDelete:false,
showAll:false,
createType:'file',
newName:'',
parentFolder:null,
@@ -1070,6 +1075,7 @@ window._wsInitData = (function() {
this._markTree(roots, 0);
this.tree = roots;
this.displayTree = [...roots];
this.showAll = false;
this.breadcrumb = d.breadcrumb || [];
this.currentFolder = folderId || 0;
this._saveExpandedState();
@@ -1192,7 +1198,7 @@ window._wsInitData = (function() {
// ── Sort ──
doSort() {
var s = this.sortBy;
if (!s) { this.displayTree = [...this.tree]; return; }
if (!s) { this.displayTree = [...this.tree]; this.showAll = false; return; }
var sorted = this.tree.slice();
if (s === 'name-asc') sorted.sort(function(a,b) { return (a.name||'').localeCompare(b.name||''); });
else if (s === 'name-desc') sorted.sort(function(a,b) { return (b.name||'').localeCompare(a.name||''); });
@@ -1429,7 +1435,7 @@ window._wsInitData = (function() {
doFilter() {
var q = (this.searchQuery || '').toLowerCase().trim();
var ft = this.filterType || '';
if (!q && !ft && !this.tagFilter) { this.displayTree = [...this.tree]; this._computeFilteredTableItems(); return; }
if (!q && !ft && !this.tagFilter) { this.displayTree = [...this.tree]; this.showAll = false; this._computeFilteredTableItems(); return; }
if (this.tagFilter) {
// Filter tree by tag
this.displayTree = this._filterTreeByTag([...this.tree], this.tagFilter);
@@ -2147,7 +2153,7 @@ console.log('FLOWDECK v2.4.6 — IIFE done, _wsInitData keys:', Object.keys(wind
<span class="name folder" style="font-weight:600;">..</span>
</div>
</li>
<template x-for="node in displayTree" :key="node.id">
<template x-for="node in (showAll ? displayTree : displayTree.slice(0, 5))" :key="node.id">
<li>
<div class="ws-tree-item" :style="{paddingLeft:(node.depth||0)*20+'px'}"
draggable="true"
@@ -2212,6 +2218,23 @@ console.log('FLOWDECK v2.4.6 — IIFE done, _wsInitData keys:', Object.keys(wind
</ul>
</li>
</template>
<!-- "X more" toggle -->
<li x-show="displayTree.length > 5 && !showAll" style="list-style:none;">
<div class="ws-tree-item ws-more-item" @click="showAll = true" style="padding-left:4px;cursor:pointer;">
<span style="width:16px;flex-shrink:0;"></span>
<span class="icon">⋯</span>
<span class="name folder" style="color:var(--text-secondary);font-style:italic;"
x-text="displayTree.length - 5 + ' more...'"></span>
</div>
</li>
<!-- "Show less" toggle -->
<li x-show="displayTree.length > 5 && showAll" style="list-style:none;">
<div class="ws-tree-item ws-more-item" @click="showAll = false" style="padding-left:4px;cursor:pointer;">
<span style="width:16px;flex-shrink:0;"></span>
<span class="icon">🔼</span>
<span class="name folder" style="color:var(--text-secondary);">Show less</span>
</div>
</li>
</ul>
</div>
+17 -17
View File
@@ -844,7 +844,7 @@ input, select, textarea { font-family: inherit; color: inherit; }
display: flex;
align-items: center;
gap: 2px;
font-size: 14px;
font-size: 13px;
overflow: visible;
flex: 1;
min-width: 0;
@@ -880,7 +880,7 @@ input, select, textarea { font-family: inherit; color: inherit; }
border: none;
background: transparent;
font: inherit;
font-size: 14px;
font-size: 13px;
line-height: 1.4;
cursor: pointer;
border-radius: 4px;
@@ -932,25 +932,25 @@ button.breadcrumb-current { max-width: 260px; }
position: absolute;
top: calc(100% + 4px);
left: 0;
min-width: 240px;
max-width: 320px;
min-width: 200px;
max-width: 280px;
overflow: visible;
background: var(--bg-modal, #fff);
border: 1px solid var(--border);
border-radius: var(--radius-lg, 8px);
box-shadow: var(--shadow-popover, 0 6px 24px rgba(0,0,0,0.25));
z-index: 2000;
padding: 6px;
padding: 4px;
}
.fd-nav-submenu {
top: -6px;
top: -4px;
left: calc(100% + 2px);
}
.fd-nav-section {
padding: 4px 8px 6px;
font-size: 11px;
padding: 3px 8px 4px;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.02em;
color: var(--text-tertiary);
@@ -958,8 +958,8 @@ button.breadcrumb-current { max-width: 260px; }
}
.fd-nav-empty {
padding: 8px 10px;
font-size: 13px;
padding: 6px 8px;
font-size: 12px;
color: var(--text-tertiary);
}
@@ -967,10 +967,10 @@ button.breadcrumb-current { max-width: 260px; }
position: relative;
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
gap: 6px;
padding: 4px 6px;
border-radius: 6px;
font-size: 14px;
font-size: 13px;
color: var(--text-primary);
cursor: pointer;
white-space: nowrap;
@@ -982,8 +982,8 @@ button.breadcrumb-current { max-width: 260px; }
}
.fd-nav-ico {
font-size: 16px;
width: 20px;
font-size: 14px;
width: 18px;
text-align: center;
flex-shrink: 0;
}
@@ -996,9 +996,9 @@ button.breadcrumb-current { max-width: 260px; }
.fd-nav-arrow {
color: var(--text-tertiary);
font-size: 16px;
font-size: 14px;
flex-shrink: 0;
margin-left: 4px;
margin-left: 2px;
}
/* ── Dropdown panel (reusable) ── */