浏览代码

WIP: 移除移动端品牌文字

[gstack-context]
Decisions: 移动顶部栏与抽屉只显示 Logo;保留返回对话无障碍标签;桌面品牌不变
Remaining: 完整测试、重启 8800、真实移动端验收
Tried: 390px 移动端用例已通过
[/gstack-context]
samien 2 月之前
父节点
当前提交
f4d3b6393b
共有 2 个文件被更改,包括 7 次插入 和 2 次删除
  1. 2 2
      src/client/components/app/WorkspaceShell.vue
  2. 5 0
      tests/e2e/workspace.spec.ts

+ 2 - 2
src/client/components/app/WorkspaceShell.vue

@@ -160,7 +160,7 @@ onBeforeUnmount(() => {
         <AppIcon name="menu" :size="20" />
         <AppIcon name="menu" :size="20" />
       </button>
       </button>
       <button class="mobile-brand" type="button" aria-label="返回对话" @click="navigate('/chat')">
       <button class="mobile-brand" type="button" aria-label="返回对话" @click="navigate('/chat')">
-        <BrandMark :size="28" label compact />
+        <BrandMark :size="28" compact />
       </button>
       </button>
       <button class="icon-button" type="button" :aria-label="theme === 'dark' ? '切换浅色主题' : '切换深色主题'" @click="emit('toggleTheme')">
       <button class="icon-button" type="button" :aria-label="theme === 'dark' ? '切换浅色主题' : '切换深色主题'" @click="emit('toggleTheme')">
         <AppIcon :name="theme === 'dark' ? 'sun' : 'moon'" />
         <AppIcon :name="theme === 'dark' ? 'sun' : 'moon'" />
@@ -287,7 +287,7 @@ onBeforeUnmount(() => {
     >
     >
       <div class="mobile-drawer__header">
       <div class="mobile-drawer__header">
         <button class="sidebar-brand" type="button" aria-label="返回对话" @click="navigate('/chat')">
         <button class="sidebar-brand" type="button" aria-label="返回对话" @click="navigate('/chat')">
-          <BrandMark :size="32" label compact />
+          <BrandMark :size="32" compact />
         </button>
         </button>
         <button class="icon-button" type="button" aria-label="关闭导航" @click="mobileDrawerOpen = false">
         <button class="icon-button" type="button" aria-label="关闭导航" @click="mobileDrawerOpen = false">
           <AppIcon name="close" />
           <AppIcon name="close" />

+ 5 - 0
tests/e2e/workspace.spec.ts

@@ -704,6 +704,11 @@ test('uses the mobile composer and keeps the closed drawer inert', async ({ page
   const drawer = page.locator('.mobile-drawer')
   const drawer = page.locator('.mobile-drawer')
   await expect(drawer).toHaveAttribute('aria-hidden', 'true')
   await expect(drawer).toHaveAttribute('aria-hidden', 'true')
   await expect(drawer).toHaveAttribute('inert', '')
   await expect(drawer).toHaveAttribute('inert', '')
+  await expect(page.locator('.mobile-header .brand-mark__plate')).toBeVisible()
+  await expect(page.locator('.mobile-header .brand-mark__name')).toHaveCount(0)
+  await page.getByRole('button', { name: '打开导航' }).click()
+  await expect(drawer.locator('.brand-mark__plate')).toBeVisible()
+  await expect(drawer.locator('.brand-mark__name')).toHaveCount(0)
   await expect(page.locator('.composer-shell')).toHaveCSS('min-height', '118px')
   await expect(page.locator('.composer-shell')).toHaveCSS('min-height', '118px')
   await expect(page.locator('.composer-textarea')).toHaveCSS('font-size', '16px')
   await expect(page.locator('.composer-textarea')).toHaveCSS('font-size', '16px')
 })
 })