fix(ui): 移除顶部页面标签并放大左侧导航
build / build (push) Successful in 1m14s

去掉系统已打开页面页签及无用关闭入口和样式;保留面包屑、来源路径与分页。左侧文字16px、图标20px,导航项最小44px。

验证:顶部页签移除与导航字号回归分别先红后绿,相关测试和类型检查通过;完整门禁与部署验收待执行。
This commit is contained in:
姚章浩
2026-10-24 15:10:10 +08:00
parent 1c065846f6
commit 8d44d54dc7
5 changed files with 37 additions and 129 deletions
+13 -11
View File
@@ -28,7 +28,6 @@ describe('WorkspaceShell', () => {
<WorkspaceShell
workspace={{ openTabs: ['dashboard'], activeTab: 'dashboard' }}
onOpen={vi.fn()}
onClose={vi.fn()}
>
<div>工作区内容</div>
</WorkspaceShell>,
@@ -44,36 +43,38 @@ describe('WorkspaceShell', () => {
expect(html).not.toContain('P2 本地治理环境')
})
it('renders open tabs and marks the active tab', () => {
it('omits the system open-page tab strip while retaining navigation and the current location', () => {
const html = renderToStaticMarkup(
<WorkspaceShell
workspace={{ openTabs: ['dashboard', 'tasks', 'releases'], activeTab: 'tasks' }}
onOpen={vi.fn()}
onClose={vi.fn()}
>
<div>工作区内容</div>
</WorkspaceShell>,
)
expect(html).toContain('aria-label="已打开页面"')
expect(html).not.toContain('aria-label="已打开页面"')
expect(html).not.toContain('class="tab-list"')
expect(html).not.toContain('class="workspace-tab')
expect(html).toContain('来源与目录')
expect(html).toContain('解析监控')
expect(html).toContain('发布管理')
expect(html).toContain('aria-current="page"')
expect(html).toContain('aria-label="当前位置"')
expect(html).toContain('<b>解析监控</b>')
expect(html).toContain('class="nav-item active"')
})
it('offers close controls only for unpinned tabs', () => {
it('does not render obsolete module-tab close controls', () => {
const html = renderToStaticMarkup(
<WorkspaceShell
workspace={{ openTabs: ['dashboard', 'tasks'], activeTab: 'tasks' }}
onOpen={vi.fn()}
onClose={vi.fn()}
>
<div>工作区内容</div>
</WorkspaceShell>,
)
expect(html).toContain('aria-label="关闭解析监控标签"')
expect(html).not.toContain('aria-label="关闭解析监控标签"')
expect(html).not.toContain('aria-label="关闭来源与目录标签"')
})
@@ -82,7 +83,6 @@ describe('WorkspaceShell', () => {
<WorkspaceShell
workspace={{ openTabs: ['dashboard'], activeTab: 'dashboard' }}
onOpen={vi.fn()}
onClose={vi.fn()}
>
<div>工作区内容</div>
</WorkspaceShell>,
@@ -94,11 +94,13 @@ describe('WorkspaceShell', () => {
})
describe('App', () => {
it('renders the dashboard inside the multi-tab workspace by default', () => {
it('renders the dashboard inside the workspace without the system page tabs', () => {
const html = renderToStaticMarkup(<App />)
expect(html).toContain('aria-label="功能导航"')
expect(html).toContain('aria-label="已打开页面"')
expect(html).not.toContain('aria-label="已打开页面"')
expect(html).not.toContain('class="tab-list"')
expect(html).not.toContain('class="workspace-tab')
expect(html).toContain('<h1>来源与目录</h1>')
expect(html).not.toContain('最近任务')
})