Style/game play #543

Merged
k88936 merged 10 commits from style/game-play into master 2026-09-30 13:55:57 +08:00
Member

close #538

close #538
k88936 added 9 commits 2026-09-30 13:36:21 +08:00
- GameGalleryPage 的 hero 按钮不再取 visibleGames[0] 直接开详情,改为把游戏列表滚进视野
- 滚动按平台页签面板(.platform-tab-panel)算相对偏移并走 scrollTo({behavior:'smooth'}),缺少 scrollTo 时退化成直接赋值
- 新增 gameListRef 锚在列表工具栏,退役只服务该按钮的 featuredGame 派生
- GameDistributionPages.test.tsx 新增「首屏「立即试玩」滚动到列表,而不是打开第一款游戏详情」,断言未触发 onOpenDetail 且滚动落在页签面板上
- 里程碑文档新增「网页侧交互修正(2026-09-30)」记录该修正与验证命令
- PlatformEntryActiveFlowShell 在 game-play 舞台给页签容器加 platform-tab-panel--game-play,不再挂 overflow-auto,也不再叠加双份内边距
- index.css 新增 .platform-tab-panel--game-play,面板 overflow:hidden 并去掉右侧留白
- gameDistribution.css 让 .game-play-page 改 height:100%/min-height:0、播放器 flex:1 1 auto/min-height:0,删除移动端把页面撑高的 calc(100dvh - 8rem)
- 矮视口(max-height:26rem,横屏手机)压扁启动面板并隐藏封面,保证「开始游戏」可达,页面与面板本身仍不滚动
- PlatformEntryActiveFlowShell.test.tsx 双向锁定游玩舞台页签容器不滚动、游戏广场等舞台仍保持滚动
- check-game-distribution-web-e2e.mjs 移动端段新增「移动端游玩页不可滚动(面板与整页都不溢出)」断言
- 里程碑文档补上该修复的根因、口径与验证记录
- .game-player-launch 纵向对齐由 center 改为 safe center(保留 center 作旧浏览器回退),溢出时退回 start,不再把标题裁到 scrollTop=0 也够不到的位置
- 同步修正 ≤820px 与 max-height:26rem 两处媒体查询里的 align-content
- 把 overflow-y: auto 提到 .game-player-launch 基础规则,启动卡片成为唯一的内部滚动兜底,页面与 .platform-tab-panel 仍保持 overflow:hidden
- pitfalls 记录该故障模式(居中溢出叠加内部滚动会让负方向那半不可达)与真实 Chromium 夹具判据
- 里程碑文档补上 safe center 口径与取证说明
- .my-game-list 改 grid-template-columns: minmax(0, 1fr),单列 auto 轨道不再被内容最小宽度撑开
- .my-game-card 加 min-width: 0 与 overflow: hidden,卡片可被压缩并裁掉溢出,与 .game-card 同口径
- .my-game-card__title 加 min-width: 0 与 overflow-wrap: anywhere,长标题不撑宽标题行
- pitfalls 记录该机制(auto 轨道最小尺寸 = 内容最小宽度 + nowrap 简介 + 缺 min-width:0)与 Chromium 夹具判据
- 里程碑文档补上该修复与 390/360 视口的测量结论
- 删除 .platform-tab-panel 里写死的 padding-right: 0.25rem:它是不分层规则,优先级高于 Tailwind @layer utilities 的 padding-inline,把右内边距钉成 0
- 同时删除 @media (max-width: 639px) .platform-tab-panel 与 .platform-desktop-shell--workbench .platform-tab-panel 里各自重复的 padding-right: 0
- 左右留白统一交给使用处的 px-3 / sm:px-6;没有 px 类的舞台(创作主页、我的、游玩页)保持 0/0
- 实测:390 下面板 12/12、列表左右留白 28/28;820 下 24/24、44/44(改前为 12/0、28/16 与 24/0、44/20),横向溢出仍为 0
- pitfalls 与里程碑文档同步该根因(unlayered 覆盖 Tailwind 层级)与测量结论
- GameGalleryPage 新增 .game-page-actions 一行,把「发布游戏」「我的游戏」从 hero 下方的工具栏动作区移出,右对齐放在 hero 上方
- 工具栏只保留「游戏广场」标题与搜索框,不再和入口按钮挤在一行
- .game-page-actions 设 flex-end、0.6rem 间距与 1.1rem 底部间距;两个入口都不可用时整行不渲染,hero 位置不变
- 实测 390/360/820 三档:按钮在 hero 之上、与 hero 间距 18px、右边缘与 hero 对齐
- 里程碑文档记录该布局调整
- GameDetailPage 左上角「返回游戏广场」简化为「返回」,不再写死跳广场
- 详情/游玩页返回优先 window.history.back(),由 popstate 还原真实来源页(我的游戏/广场)
- activeAppPageRoutes 给应用历史条目补深度标记并新增 hasAppHistoryBackEntry()
- 深链直开等无可回退条目时用 replaceAppHistoryPath 兜底回广场或详情
- 新增 activeAppPageRoutes 深度语义用例与 PlatformEntryActiveFlowShell「游戏详情返回」两条用例
- 同步里程碑文档 2026-09-30 与 pitfalls 同日条目
- .platform-tab-panel--game-play 覆盖带上 .platform-desktop-shell--workbench 祖先,压过 overflow: auto
- E2E 游玩页断言补整页与面板的横向溢出测量,避免面板 overflow-x: hidden 静默裁切漏检
- 修正 E2E 探针里重复的 panelOverflowY 键名,拆成 panelOverflowY 与 panelOverflowStyle
- 同步里程碑文档与 pitfalls 同日条目(单类名覆盖被祖先规则压掉、守卫实际为空)
游戏分发四个页面的返回按钮文案统一成「返回」
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m27s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m57s
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 / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
3b76c2611e
- GamePlayPage 返回详情 → 返回(含启动超时面板里的按钮)
- MyGamesPage 与 GamePublishPage(三处分支)返回游戏广场 → 返回
- 目标页仍由各自 onBack 决定,按钮不再承诺可能不对的目的地
- GameDistributionPages.test.tsx 超时用例断言改为 /^返回$/u
- 同步里程碑文档与玩法链路文档的返回文案描述
k88936 added 1 commit 2026-09-30 13:38:47 +08:00
Merge remote-tracking branch 'origin/master' into style/game-play
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m26s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m56s
Project CI / Backend tests (pull_request) Successful in 4m27s
Project CI / Frontend tests (pull_request) Successful in 2m21s
Project CI / Native shell tests (pull_request) Successful in 6m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m16s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m53s
Project CI / Repository checks (pull_request) Successful in 2m38s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m1s
a7caaa6ade
# Conflicts:
#	docs/project-memory/shared-memory/pitfalls.md
k88936 merged commit 5e2d47919e into master 2026-09-30 13:55:57 +08:00
k88936 deleted branch style/game-play 2026-09-30 13:55:58 +08:00
Author
Member

TODO:

─── src/components/platform-entry/PlatformEntryActiveFlowShell.tsx:482-482 ───

[maintainability · low] The /games/detail?id= route template is now built in two places in this
file: here in backFromGamePlay and in openGameDetail (line 447). If the route or query key ever
changes, these can drift. Consider extracting a shared helper (e.g., buildGameDetailPath(gameId))
that both callbacks use.

─── src/components/platform-entry/PlatformEntryActiveFlowShell.tsx:466-469 ───
[maintainability · low] The hasAppHistoryBackEntry() → window.history.back() guard plus the
replaceAppHistoryPath + setSelectionStage fallback is duplicated between backFromGameDetail
and backFromGamePlay. Extracting a small helper such as backOrReplace(stage, path) would keep
the back semantics consistent as more stages adopt native back navigation.

TODO: > ─── src/components/platform-entry/PlatformEntryActiveFlowShell.tsx:482-482 ─── > > [maintainability · low] The `/games/detail?id=` route template is now built in two places in this > file: here in `backFromGamePlay` and in `openGameDetail` (line 447). If the route or query key ever > changes, these can drift. Consider extracting a shared helper (e.g., `buildGameDetailPath(gameId)`) > that both callbacks use. > > > > ─── src/components/platform-entry/PlatformEntryActiveFlowShell.tsx:466-469 ─── > [maintainability · low] The `hasAppHistoryBackEntry() → window.history.back()` guard plus the > `replaceAppHistoryPath` + `setSelectionStage` fallback is duplicated between `backFromGameDetail` > and `backFromGamePlay`. Extracting a small helper such as `backOrReplace(stage, path)` would keep > the back semantics consistent as more stages adopt native back navigation. >
Sign in to join this conversation.