修复统一创作页软键盘黑底

让统一创作页根容器保留平台背景并限制滚动穿透

让统一创作页内容区占满剩余高度,避免短表单露出宿主黑底

补充统一创作页回归测试、玩法链路文档和 Hermes 踩坑记录
This commit is contained in:
2026-06-07 15:40:07 +08:00
parent 63444d047f
commit 3965f34b02
4 changed files with 15 additions and 5 deletions

View File

@@ -59,13 +59,15 @@ describe('UnifiedCreationPage', () => {
.getByText('敲木鱼工作台')
.closest('.unified-creation-page__content')
?.className,
).toContain('min-h-max');
).toContain('flex-1');
expect(
screen
.getByText('敲木鱼工作台')
.closest('.unified-creation-page__content')
?.className,
).not.toContain('min-h-0');
).toContain('min-h-0');
expect(root?.className).toContain('overflow-y-auto');
expect(root?.className).toContain('overscroll-contain');
expect(root?.className).toContain('bg-[image:var(--platform-body-fill)]');
});
});

View File

@@ -18,7 +18,7 @@ export function UnifiedCreationPage({
}: UnifiedCreationPageProps) {
return (
<div
className="unified-creation-page platform-remap-surface mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col overflow-y-auto overflow-x-hidden px-3 pt-2 sm:px-4 sm:pt-3"
className="unified-creation-page platform-remap-surface mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col overflow-y-auto overflow-x-hidden overscroll-contain bg-[image:var(--platform-body-fill)] px-3 pt-2 sm:px-4 sm:pt-3"
data-play-id={spec.playId}
data-field-kinds={spec.fields.map((field) => field.kind).join(',')}
data-workspace-stage={spec.workspaceStage}
@@ -65,7 +65,7 @@ export function UnifiedCreationPage({
))}
</ul>
</div>
<div className="unified-creation-page__content flex min-h-max flex-col pb-3 sm:pb-4">
<div className="unified-creation-page__content flex min-h-0 flex-1 flex-col pb-3 sm:pb-4">
{children}
</div>
</div>