Remove workspace header actions

This commit is contained in:
2026-07-20 11:57:32 +08:00
parent 5abc9b634b
commit 2c7fd6b7f9
2 changed files with 6 additions and 6 deletions

View File

@@ -34,6 +34,8 @@ const collectMetrics = async () => page.evaluate(() => {
const sidebar = document.querySelector('.channel-sidebar') const sidebar = document.querySelector('.channel-sidebar')
const stage = document.querySelector('.stage') const stage = document.querySelector('.stage')
const inspector = document.querySelector('.inspector') const inspector = document.querySelector('.inspector')
const workspaceActions = [...document.querySelectorAll('.workspace-page .overview-head .arco-btn')]
.map((button) => button.textContent?.trim())
const dashboard = document.querySelector('.dashboard-button') const dashboard = document.querySelector('.dashboard-button')
const project = document.querySelector('.project-button') const project = document.querySelector('.project-button')
const create = document.querySelector('.create-project') const create = document.querySelector('.create-project')
@@ -76,6 +78,7 @@ const collectMetrics = async () => page.evaluate(() => {
channelSidebar: rect(sidebar), channelSidebar: rect(sidebar),
stage: rect(stage), stage: rect(stage),
inspector: rect(inspector), inspector: rect(inspector),
workspaceActions,
dashboardButton: rect(dashboard), dashboardButton: rect(dashboard),
dashboardButtonActive: dashboard?.classList.contains('active') ?? false, dashboardButtonActive: dashboard?.classList.contains('active') ?? false,
projectButton: rect(project), projectButton: rect(project),
@@ -128,6 +131,9 @@ if (!metrics.dashboardButtonActive) failures.push('expected dashboard button to
if (metrics.projectButtonActive) failures.push('expected first project button not to be active on workspace landing page') if (metrics.projectButtonActive) failures.push('expected first project button not to be active on workspace landing page')
if (metrics.channelSidebar) failures.push(`expected workspace to hide channel sidebar, got ${JSON.stringify(metrics.channelSidebar)}`) if (metrics.channelSidebar) failures.push(`expected workspace to hide channel sidebar, got ${JSON.stringify(metrics.channelSidebar)}`)
if (metrics.inspector) failures.push(`expected workspace to hide inspector, got ${JSON.stringify(metrics.inspector)}`) if (metrics.inspector) failures.push(`expected workspace to hide inspector, got ${JSON.stringify(metrics.inspector)}`)
if (metrics.workspaceActions.some((text) => text?.includes('团队视图') || text?.includes('进入重点项目'))) {
failures.push(`expected workspace header actions to remove team view and focused project buttons, got ${JSON.stringify(metrics.workspaceActions)}`)
}
if (!metrics.projectRail || !metrics.stage) { if (!metrics.projectRail || !metrics.stage) {
failures.push(`missing workspace layout regions: rail=${JSON.stringify(metrics.projectRail)}, stage=${JSON.stringify(metrics.stage)}`) failures.push(`missing workspace layout regions: rail=${JSON.stringify(metrics.projectRail)}, stage=${JSON.stringify(metrics.stage)}`)
} else { } else {

View File

@@ -5,8 +5,6 @@ import {
IconEmail, IconEmail,
IconFile, IconFile,
IconRobot, IconRobot,
IconRight,
IconUserGroup,
} from '@arco-design/web-react/icon' } from '@arco-design/web-react/icon'
import { aiSessions, inbox, notes, projects, tasks } from './projects/project-data' import { aiSessions, inbox, notes, projects, tasks } from './projects/project-data'
import type { Project } from './projects/project-types' import type { Project } from './projects/project-types'
@@ -32,10 +30,6 @@ export function WorkspacePage({ onSelectProject }: { onSelectProject: (project:
<Text type="secondary"></Text> <Text type="secondary"></Text>
<Title heading={4}></Title> <Title heading={4}></Title>
</div> </div>
<Space>
<Button icon={<IconUserGroup />}></Button>
<Button type="primary" icon={<IconRight />}></Button>
</Space>
</div> </div>
<Row gutter={12} className="metric-row"> <Row gutter={12} className="metric-row">