feat(ui): 文件二级页面间距规整(8px 网格)+ 浮窗默认尺寸改手机竖屏比例
- 文件页 chrome 行统一:路径行与树搜索行同为 41px 高(路径输入框改 border-box 28px 总高)、gap 统一 6px、内边距统一 6px 8px - 树体侧距 6→8px 对齐 chrome 行;markdown 预览 10/14→12/16(与错误 文案块一致);CodeMirror scroller 新增同款 12/16 内边距(预览/编辑 切换文字位置不跳);截断横幅 12→8px - 浮窗默认尺寸 480×360 → 390×780(1:2 手机竖屏比例),创建时先按 视口减 24px 钳制再居中,矮视口得到更矮的窗而非溢出 - 测试/文档同步:state/free-window 预期重算(含 clampMove 回推的 y=24 语义)、e2e 断言宽度上界、AGENTS §7.5 与设计文档
This commit is contained in:
1 parent
f648b0c006
commit
d15645bf23
7 files changed
+59
-36
No files matched your search
+6
-4
@@ -919,8 +919,9 @@ describe('free windows (v0.16.0)', () => {
|
||||
expect(leaf.active).toBe('term:1')
|
||||
expect(floated.floats).toHaveLength(1)
|
||||
expect(floated.floats[0]!.tab).toEqual(git)
|
||||
// Default size centered on the drop point (no viewport → floors only).
|
||||
expect(floated.floats[0]).toMatchObject({ x: 300 - 240, y: 200 - 180, w: 480, h: 360 })
|
||||
// Phone-ratio default (390x780) centered on the drop point (no viewport
|
||||
// → size cap never bites; only the negative y clamps to 0).
|
||||
expect(floated.floats[0]).toMatchObject({ x: 300 - 195, y: 0, w: 390, h: 780 })
|
||||
expect(floated.activePane).toBe(leaf.id)
|
||||
})
|
||||
|
||||
@@ -961,8 +962,9 @@ describe('free windows (v0.16.0)', () => {
|
||||
expect(moved.floats[0]).toMatchObject({ x: 0, y: 0 })
|
||||
// Beyond the right/bottom edge clamps the top-left so the window fits.
|
||||
moved = moveFloat(moved, id, 5000, 5000)
|
||||
expect(moved.floats[0]!.x).toBe(1024 - 480)
|
||||
expect(moved.floats[0]!.y).toBe(768 - 360)
|
||||
// The float was CREATED capped to the viewport: w 390, h 768-24=744.
|
||||
expect(moved.floats[0]!.x).toBe(1024 - 390)
|
||||
expect(moved.floats[0]!.y).toBe(768 - 744)
|
||||
// No-op move returns the same reference (no persist churn).
|
||||
expect(moveFloat(moved, id, moved.floats[0]!.x, moved.floats[0]!.y)).toBe(moved)
|
||||
// Resize: floors, viewport ceiling, and the SE-corner anchor (x/y keep).
|
||||
|
||||
Reference in new issue
Block a user