From a9d5ac0931dce04b950666f50532700802763f56 Mon Sep 17 00:00:00 2001 From: kdletters <61648117+kdletters@users.noreply.github.com> Date: Thu, 17 Sep 2026 14:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=9D=BF=E5=BA=93?= =?UTF-8?q?=E9=A1=B5=E6=97=A0=E6=B3=95=E4=B8=8A=E4=B8=8B=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 模板库页面根节点补 platform-theme / platform-theme--light 与 h-full + overflow-y-auto:shell 只给 .launcher-main 下带 platform-theme 的直接子元素 height:100% + overflow:auto,缺这个类时整页没有滚动容器,模板一多就滚不动 - 补回归单测:页面根节点必须同时具备 platform-theme 与 overflow-y-auto --- .../src/view/template-library/index.tsx | 2 +- .../tests/templateLibraryView.test.tsx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/view/template-library/index.tsx b/apps/ai-game-creator-shell/src/view/template-library/index.tsx index 7d93b1c2c..520c9192e 100644 --- a/apps/ai-game-creator-shell/src/view/template-library/index.tsx +++ b/apps/ai-game-creator-shell/src/view/template-library/index.tsx @@ -233,7 +233,7 @@ export default function TemplateLibraryView({ return (
diff --git a/apps/ai-game-creator-shell/tests/templateLibraryView.test.tsx b/apps/ai-game-creator-shell/tests/templateLibraryView.test.tsx index b9b747bae..d98547ff3 100644 --- a/apps/ai-game-creator-shell/tests/templateLibraryView.test.tsx +++ b/apps/ai-game-creator-shell/tests/templateLibraryView.test.tsx @@ -135,6 +135,17 @@ describe('TemplateLibraryView', () => { ).toBeTruthy(); }); + it('renders the page as the launcher scroll container', () => { + // 回归点:`.launcher-main` 只给带 platform-theme 的直接子元素 height:100% + overflow:auto, + // 缺这个类时整页没有滚动容器(模板一多就滚不动)。 + const { container } = render( + {}} />, + ); + const page = container.querySelector('section[aria-label="模板库"]'); + expect(page?.className).toContain('platform-theme'); + expect(page?.className).toContain('overflow-y-auto'); + }); + it('offers 更新 instead of 下载 when the installed version is stale', () => { const stale = template({ id: 'blank-web',