修复策划工作台窄屏输入区裁切
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
为窄屏策划工作台提供纵向滚动并明确面板高度 补齐窗口外壳层级及响应式断点布局回归测试 同步窄屏滚动验收合同与布局排障经验
This commit is contained in:
@@ -10197,17 +10197,23 @@ button.design-workspace-tree__entry:hover,
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.game-workbench-layout--design {
|
||||
.game-project-workbench--design {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* 两块面板在固定外壳内滚动;覆盖外壳的 height: 100%,避免第二行被裁切。 */
|
||||
.game-project-workbench--design .game-workbench-layout--design {
|
||||
height: auto;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.game-workbench-layout--design .game-workbench-stage,
|
||||
.game-workbench-layout--design .game-workbench-chat {
|
||||
min-height: 560px;
|
||||
.game-workbench-layout--design .game-workbench-stage {
|
||||
height: 560px;
|
||||
}
|
||||
|
||||
.game-workbench-layout--design .game-workbench-chat {
|
||||
min-height: 560px;
|
||||
height: clamp(560px, calc(100dvh - 154px), 900px);
|
||||
}
|
||||
|
||||
|
||||
@@ -420,7 +420,13 @@ describe('陶泥儿对话区:Codex 三段式(顶栏 / 唯一滚动区 / 文
|
||||
describe('策划对话:消息伸缩与长内容边界', () => {
|
||||
function planningDeclarations(className: string, width: number) {
|
||||
const root = document.createElement('div');
|
||||
root.innerHTML = `<div class="game-workbench-layout game-workbench-layout--design">
|
||||
root.innerHTML = `<div class="window-chrome"><div class="window-chrome__content">
|
||||
<div class="launcher-shell platform-theme"><aside></aside><main class="launcher-main">
|
||||
<section class="launcher-page launcher-project-development game-project-workbench game-project-workbench--design">
|
||||
<div class="game-workbench-layout game-workbench-layout--design">
|
||||
<section class="game-workbench-stage"><div class="design-workspace-panel">
|
||||
<div class="design-workspace-panel__body"><div class="design-workspace-tree"></div></div>
|
||||
</div></section>
|
||||
<aside class="game-workbench-chat"><header>策划</header>
|
||||
<section class="project-chat-surface"><div class="project-chat-conversation">
|
||||
<section class="design-agent-controls"></section>
|
||||
@@ -431,7 +437,7 @@ describe('策划对话:消息伸缩与长内容边界', () => {
|
||||
<section class="design-agent-pending-actions"></section>
|
||||
<form class="project-chat-composer"><p class="project-chat-composer-notice"></p></form>
|
||||
</div></section>
|
||||
</aside></div>`;
|
||||
</aside></div></section></main></div></div></div>`;
|
||||
const element = root.querySelector(className)!;
|
||||
// 从 DOM 匹配完整选择器,防止遗漏基础规则或误把 Direct 专用样式算到策划入口。
|
||||
const selectors = rules.flatMap((rule) =>
|
||||
@@ -494,12 +500,47 @@ describe('策划对话:消息伸缩与长内容边界', () => {
|
||||
},
|
||||
);
|
||||
|
||||
it('窄屏工作台为单列,对话仍有明确高度而非随历史撑长', () => {
|
||||
const layout = planningDeclarations('.game-workbench-layout', 390);
|
||||
const chat = planningDeclarations('.game-workbench-chat', 390);
|
||||
expect(declaration(layout, 'grid-template-columns')).toBe('minmax(0, 1fr)');
|
||||
expect(declaration(chat, 'height')).toBe(
|
||||
'clamp(560px, calc(100dvh - 154px), 900px)',
|
||||
it.each([390, 760])(
|
||||
'%ipx:固定外壳内工作台可滚动到对话,两块面板保持明确高度',
|
||||
(width) => {
|
||||
const workbench = planningDeclarations('.game-project-workbench', width);
|
||||
const layout = planningDeclarations('.game-workbench-layout', width);
|
||||
const stage = planningDeclarations('.game-workbench-stage', width);
|
||||
const chat = planningDeclarations('.game-workbench-chat', width);
|
||||
expect(declaration(workbench, 'min-height')).toBe('0');
|
||||
expect(declaration(workbench, 'overflow-y')).toBe('auto');
|
||||
expect(declaration(workbench, 'overflow-x')).toBe('hidden');
|
||||
expect(declaration(layout, 'height')).toBe('auto');
|
||||
expect(declaration(layout, 'grid-template-columns')).toBe(
|
||||
'minmax(0, 1fr)',
|
||||
);
|
||||
expect(declaration(stage, 'height')).toBe('560px');
|
||||
expect(declaration(chat, 'height')).toBe(
|
||||
'clamp(560px, calc(100dvh - 154px), 900px)',
|
||||
);
|
||||
expect(
|
||||
declaration(
|
||||
planningDeclarations('.design-workspace-panel', width),
|
||||
'height',
|
||||
),
|
||||
).toBe('100%');
|
||||
expect(
|
||||
declaration(
|
||||
planningDeclarations('.design-workspace-tree', width),
|
||||
'overflow',
|
||||
),
|
||||
).toBe('auto');
|
||||
},
|
||||
);
|
||||
|
||||
it.each([761, 1280])('%ipx:双栏继续填满外壳剩余高度', (width) => {
|
||||
const workbench = planningDeclarations('.game-project-workbench', width);
|
||||
const layout = planningDeclarations('.game-workbench-layout', width);
|
||||
expect(declaration(workbench, 'overflow')).toBe('hidden');
|
||||
expect(workbench.has('overflow-y')).toBe(false);
|
||||
expect(declaration(layout, 'height')).toBe('100%');
|
||||
expect(declaration(layout, 'grid-template-columns')).toBe(
|
||||
'minmax(0, 1fr) minmax(380px, 0.42fr)',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user