feat(tasks): 树模式补上单个收起 / 全部收起 / 全部展开
维护者反馈「树目录还缺单个收起/全部收起/全部展开的按钮」。读码确认:树**根本没有
按节点的展开收起**(只有页级的已结算聚合规则,aria-expanded 还是硬编码 true),
所以这三件事在树的语境里确实都不存在。
- 单个收起/展开:有子节点的行右侧一个 16px chevron(收起 →、展开 ⌄),位置与画布
卡片小条的 chevron 一致;叶子行不画(死控件);点它 stopPropagation,不会顺带
打开详情窗;行上补 aria-expanded。
- 全部收起/全部展开:控制条里两个**文字**单元格(与其它 28px 控件同形)。用文字而非
更多 chevron —— 旁边的「折叠已完成的节点」开关已经占了那套图形语汇,两套轴不能共用。
全部收敛到「有子节点」的节点(只留拓扑根),全部展清空该集合。
- 键盘补标准树绑定:→ 展开(已展开则进入子级)、← 收起(已收起则退回父级)。
- 折叠集存在 SubagentView,图/树切换不丢;与「已结算聚合」是两条互不干扰的轴。
词条 4 个 × 20 词典(tasksTree{Collapse,Expand}{All,Row})。测试 +4 条(单个收放、
叶子无控件、集群全收/全展、方向键收放)。全套 2260 passed / 17 skipped(194 文件)、
tsc 与 eslint 零告警、构建通过;新构建已装进 sidebar-test,:3080 挂载 0 pageerror。
This commit is contained in:
1 parent
48a8e9095c
commit
e849874673
27 files changed
+408
-6
No files matched your search
@@ -696,6 +696,29 @@
|
||||
color: var(--dsw-alias-state-business-primary);
|
||||
}
|
||||
|
||||
/* A WORDED cell of the cluster (the tree's collapse/expand-all pair): the same
|
||||
28px control shape as the glyph cells, sized by its label. Words rather than
|
||||
more chevrons, because the settled-leaf switch beside them already wears that
|
||||
vocabulary. */
|
||||
.controlText {
|
||||
box-sizing: border-box;
|
||||
height: 28px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 8px;
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--dsw-alias-label-secondary);
|
||||
font: var(--dsw-font-xxxs-11);
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.controlText:hover {
|
||||
color: var(--dsw-alias-label-primary);
|
||||
}
|
||||
|
||||
/* The zoom readout is the cluster's one non-button cell: same 28px height,
|
||||
micro type, tabular figures so the row of numbers does not jitter. */
|
||||
.controlZoomLevel {
|
||||
@@ -778,6 +801,31 @@
|
||||
padding-left: 14px;
|
||||
}
|
||||
|
||||
/* The row's own disclosure control: at the row's END, the same 16px cell and
|
||||
the same chevron the canvas card's bar wears — one tree, one place to look for
|
||||
"open / close this node's children". A leaf renders none. */
|
||||
.treeDisclosure {
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-self: flex-start;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 8px 0 0 auto;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background: transparent;
|
||||
color: var(--dsw-alias-label-tertiary);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.treeDisclosure:hover {
|
||||
background: var(--dsw-alias-interactive-bg-hover);
|
||||
color: var(--dsw-alias-label-primary);
|
||||
}
|
||||
|
||||
/* One child wrapper: the elbow that ties it to its parent's thread. The segment
|
||||
spans the whole subtree of a middle sibling (so the thread stays continuous)
|
||||
and stops at the row's own marker for the LAST one, so a group's thread ends
|
||||
|
||||
Reference in new issue
Block a user