修复模板库页无法上下滚动
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 6m53s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m13s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m15s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 6m22s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 5m33s
Project CI / Frontend tests (pull_request) Failing after 4m26s
Project CI / AI game creator shell web tests (pull_request) Failing after 4m35s
Project CI / Native shell tests (pull_request) Successful in 9m6s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 6m53s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m13s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m15s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 6m22s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 5m33s
Project CI / Frontend tests (pull_request) Failing after 4m26s
Project CI / AI game creator shell web tests (pull_request) Failing after 4m35s
Project CI / Native shell tests (pull_request) Successful in 9m6s
- 模板库页面根节点补 platform-theme / platform-theme--light 与 h-full + overflow-y-auto:shell 只给 .launcher-main 下带 platform-theme 的直接子元素 height:100% + overflow:auto,缺这个类时整页没有滚动容器,模板一多就滚不动 - 补回归单测:页面根节点必须同时具备 platform-theme 与 overflow-y-auto
This commit is contained in:
@@ -233,7 +233,7 @@ export default function TemplateLibraryView({
|
||||
|
||||
return (
|
||||
<section
|
||||
className="grid w-full content-start gap-4 px-6 pb-10 pt-5 max-[760px]:px-4"
|
||||
className="platform-theme platform-theme--light grid h-full min-h-0 w-full content-start gap-4 overflow-x-hidden overflow-y-auto px-6 pb-10 pt-5 max-[760px]:px-4"
|
||||
aria-label="模板库"
|
||||
>
|
||||
<header className="flex flex-wrap items-center gap-3">
|
||||
|
||||
@@ -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(
|
||||
<TemplateLibraryView controller={controller()} onBack={() => {}} />,
|
||||
);
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user