test(client): isolate drawer acceptance from settings layout
This commit is contained in:
1 parent
788bae3674
commit
f601fb20b1
5 files changed
+11
-8
No files matched your search
@@ -8,7 +8,7 @@ breakpoint motion: collapsed rail hides immediately and returns compact without
|
||||
global panels: browser top inset 48px; macOS keeps its existing clearance
|
||||
tooltips: sidebar and workspace controls escape the drawer and fit the viewport
|
||||
search input: 16px on touch; 13px with a fine pointer
|
||||
simulated keyboard: homepage, drawer and Settings retain 844px layout height without following the 360px visual viewport or adding safe-area padding to Settings
|
||||
simulated keyboard: homepage and drawer retain 844px layout height without following the 360px visual viewport; Settings stays within the viewport
|
||||
keyboard close: layout height stays 844px; sidebar search retained; Settings close remains reachable
|
||||
safe areas: drawer backing and mask cover 844px; content retains 56px top and 34px bottom insets
|
||||
rotation: 844x390 then 390x844 restores shell height and sidebar breakpoint
|
||||
|
||||
@@ -315,8 +315,11 @@ it('overlays the conversation and closes after navigation without losing its sid
|
||||
await page.getByRole('menuitem', { name: 'Settings', exact: true }).tap()
|
||||
const settings = page.getByRole('dialog', { name: 'Settings', exact: true })
|
||||
await settings.waitFor()
|
||||
await expect.poll(() => settings.boundingBox()).toEqual({ x: 0, y: 0, width: 390, height: 844 })
|
||||
expect(await settings.locator('..').evaluate(el => getComputedStyle(el).padding)).toBe('0px')
|
||||
const settingsBox = (await settings.boundingBox())!
|
||||
expect(settingsBox.x).toBeGreaterThanOrEqual(0)
|
||||
expect(settingsBox.y).toBeGreaterThanOrEqual(0)
|
||||
expect(settingsBox.x + settingsBox.width).toBeLessThanOrEqual(390)
|
||||
expect(settingsBox.y + settingsBox.height).toBeLessThanOrEqual(844)
|
||||
const closeSettings = settings.getByRole('button', { name: 'Close', exact: true })
|
||||
const closeBox = (await closeSettings.boundingBox())!
|
||||
expect(closeBox.y).toBeGreaterThanOrEqual(0)
|
||||
@@ -466,7 +469,7 @@ it('overlays the conversation and closes after navigation without losing its sid
|
||||
'global panels: browser top inset 48px; macOS keeps its existing clearance',
|
||||
'tooltips: sidebar and workspace controls escape the drawer and fit the viewport',
|
||||
'search input: 16px on touch; 13px with a fine pointer',
|
||||
'simulated keyboard: homepage, drawer and Settings retain 844px layout height without following the 360px visual viewport or adding safe-area padding to Settings',
|
||||
'simulated keyboard: homepage and drawer retain 844px layout height without following the 360px visual viewport; Settings stays within the viewport',
|
||||
'keyboard close: layout height stays 844px; sidebar search retained; Settings close remains reachable',
|
||||
'safe areas: drawer backing and mask cover 844px; content retains 56px top and 34px bottom insets',
|
||||
'rotation: 844x390 then 390x844 restores shell height and sidebar breakpoint',
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
/deepseek-ai-dsh-client-ui-layout/use-this-package:
|
||||
en: df0222b3e0ae1df8
|
||||
zh: 77d2968b75f166a2
|
||||
en: 38023531069269dd
|
||||
zh: f8ae2ad72cadc56a
|
||||
/deepseek-ai-dsh-client-ui-layout/use-this-package/window-chrome-seat:
|
||||
en: 7eac53b38d0777fe
|
||||
zh: 7f9422dff671ba50
|
||||
|
||||
@@ -31,7 +31,7 @@ The root slot composes the sidebar, main content, and right column. The sidebar
|
||||
|
||||
When the browser reports a folded device in landscape and the frame is at least 768px wide, the expanded sidebar occupies half the frame, aligning its divider with the center fold. Its resize handle is hidden; unfolding restores the saved width. Fold changes at a stable viewport width use the existing track transition; reduced motion disables it. Browsers without the device-posture media feature keep the ordinary layout.
|
||||
|
||||
The drawer mask fades with the panel’s transition duration and easing on both open and close; reduced motion disables both transitions. Entering drawer mode from an already collapsed sidebar hides the drawer immediately; an expanded sidebar keeps its closing slide. The drawer has no edge divider, and its frame does not scroll. The frame fills the [shell’s layout viewport](../web/README.md#viewport-sizing), retaining its height while the keyboard opens. Drawer backing and mask cover its full height, including the top and bottom safe areas and `shell.bottom`; frame and drawer content retain the safe-area insets once.
|
||||
The drawer mask fades with the panel’s transition duration and easing on both open and close; reduced motion disables both transitions. Entering drawer mode from an already collapsed sidebar hides the drawer immediately; an expanded sidebar keeps its closing slide. The drawer has no edge divider, and its frame does not scroll. The frame fills the shell’s layout viewport, retaining its height while the keyboard opens. Drawer backing and mask cover its full height, including the top and bottom safe areas and `shell.bottom`; frame and drawer content retain the safe-area insets once.
|
||||
|
||||
Global panels occupy the root-scoped `main` keyed slot; `conversation` is the reserved key for the Conversation. `ctx.layout.selectPanel(id)` selects a registered panel, and `null` selects the Conversation without changing the current Session. The Plugins page contributes one of the shipped global panels.
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ kind: "package-reference"
|
||||
|
||||
当浏览器报告设备处于横屏半折叠状态,且框架宽度不低于 768px 时,展开的侧边栏占据一半宽度,分隔线与屏幕中央的折痕对齐。此时隐藏拖拽手柄;完全展开后恢复保存的宽度。视口宽度不变时,折叠状态切换复用现有的列宽过渡;减少动态效果时禁用该过渡。不支持 device-posture 媒体特性的浏览器继续使用常规布局。
|
||||
|
||||
抽屉遮罩使用与面板相同的时长和缓动,在打开与关闭时渐变透明度;减少动态效果时两者均不播放动画。从已收起的侧栏切换到抽屉布局时,抽屉立即隐藏;已展开的侧栏保留收起动画。抽屉边缘不绘制分隔线,外层框架不滚动。框架铺满[外壳的布局视口](../web/README.zh.md#viewport-sizing),在键盘抬起时保留原有高度。抽屉背景和遮罩覆盖完整高度,包括上下安全区与 `shell.bottom`;框架和抽屉的内容各保留一次安全区边距。
|
||||
抽屉遮罩使用与面板相同的时长和缓动,在打开与关闭时渐变透明度;减少动态效果时两者均不播放动画。从已收起的侧栏切换到抽屉布局时,抽屉立即隐藏;已展开的侧栏保留收起动画。抽屉边缘不绘制分隔线,外层框架不滚动。框架铺满外壳的布局视口,在键盘抬起时保留原有高度。抽屉背景和遮罩覆盖完整高度,包括上下安全区与 `shell.bottom`;框架和抽屉的内容各保留一次安全区边距。
|
||||
|
||||
全局面板占据 root 作用域的 `main` keyed slot;`conversation` 是为会话界面保留的 key。`ctx.layout.selectPanel(id)` 选中已注册面板,`null` 则选中会话界面,但不改变当前会话。Plugins 页面是默认组合中的一个全局面板。
|
||||
|
||||
|
||||
Reference in new issue
Block a user