fix: 侧栏收起图标对齐 + 有项目时不再误显“还没有工作区”
- Bug1 侧栏(rail)收起时图标飘逸:wgRail 改为 12px 轨距、SectionHeader 垂直堆叠、 IconButton 放大为 36px 圆、TreeBody 隐藏,对齐官方 36px 中轴轨距 - Bug2 空状态误判:原仅判断 groups.length===0,导致无分组但有项目时仍顶置“还没有工作区” 改为 groups.length===0 && topLevel.length===0 && !topLevelDropActive(拖拽出组显示插入线而非空提示) 参考 docs/BUGFIX_侧栏与空状态_20250824.md,构建与 68 项测试通过
This commit is contained in:
parent
fcaf221ac0
commit
942babe9ed
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -866,7 +866,7 @@ export function GroupsBrowser({
|
|||
/>
|
||||
) : (
|
||||
<div className="wgList" role="tree" aria-label={t('section.workspaces')}>
|
||||
{groups.length === 0 && (
|
||||
{groups.length === 0 && topLevel.length === 0 && !topLevelDropActive && (
|
||||
<div className="wgEmpty">{workspacePhase === 'ready' ? t('empty.noWorkspaces') : t('empty.none')}</div>
|
||||
)}
|
||||
{groups.map((category) => (
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
flex-direction: column;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wgSectionHeader {
|
||||
|
|
@ -370,8 +373,29 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 8px 0;
|
||||
gap: 12px;
|
||||
padding: 8px 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wgRail .wgSectionHeader {
|
||||
flex-direction: column;
|
||||
width: 36px;
|
||||
height: auto;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
align-self: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wgRail .wgIconButton {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.wgRail .wgTreeBody {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wgAddError {
|
||||
|
|
|
|||
Loading…
Reference in New Issue