Repository navigation
fix(shell): 页面四边 16px 只在外壳给一次 —— PageShell + arch:check 闸门(#209) - #211
Merged
Merged
Conversation
…:check 闸门(#209) - 内容列 px-4 → p-4,上下左右同一个值、同一个地方给 - 新增 pages/_shared/page-shell.tsx,25 个手抄三层外壳的页面换成 <PageShell> - 去掉 12 个页面根元素上的 py-3 / py-4 md:py-6 / py-8 - 参数配置粘性顶栏不再 -mx-4 出血,搜索框落在 16px - arch:check 新增 page-shell-handwritten / page-root-padding 两条(反向验证过) - pages / shell / ui / scripts 分册与文档站教程同步 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 内容区滚动模式下 sticky 的基准是滚动容器 padding 内沿:参数配置顶栏 / 权限矩阵工具条 改 content-scroll:-top-4(吸顶不再露缝),左栏类改 content-scroll:*:top-0(静止时不再被推下去) - 参数配置顶栏恢复出血(-mx-4 -mt-4 px-4 pt-4),主体 py-5 → pt-5 - arch:check:三元分支 / 同文件组件 / 第二层 div / cn() 都认作根;放行带边框底色的卡片和 [&>x]: 变体;新增 page-root-unscanned;stripComments 保留换行,行号不再偏 - 从 main 重跑 codemod,修正搬动后的缩进(diff -w 与上一版一致) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yilecoding
added a commit
that referenced
this pull request
Nov 2, 2026
#211(PageShell + 内容列 p-4 + arch:check 三条闸门)已经在 main 上修了 #209。 本分支的 #209 部分全部让给 main:_auth.tsx / tab-outlet / 参数配置顶栏 / arch-check(page-vertical-padding 规则)/ 各页根元素一律取 main 的版本。 保留的只有 #210 的部分,在 main 的版本上重新加回:顶部说明改进 PageHeader、 卡片网格 grid-cols-1、调用日志空态 / 群机器人表单的两句提示。 pages 分册里本分支的「页面四边的留白」一节删掉(main 有自己的), grid-cols-1 的结论挪进 ui 分册,pages 分册回到 500 行预算内。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么、为什么
症状:短信日志 / 投递记录 / AI 调用日志三页查询区贴着标签条(顶距 0);ai-provider 等五页 12px;其余页面桌面上顶 24 / 左右 16。全站三种顶距。
根因:页面外壳是三层 div、每页手抄,
py-4 md:py-6写在第三层(shadcn dashboard 模板带来的,那个模板没有标签条)。那三页少抄一层,且互相照抄;之前修过两次都只修了当时那一页,没有任何东西挡下一次。修法
apps/web/src/routes/_auth.tsx内容列px-4→p-4:四边 16px 只有这一个来源packages/platform/src/pages/_shared/page-shell.tsx(fill="always" | "lg" | "none"),25 个手抄外壳的页面换成<PageShell>;另 12 个页面去掉根元素上的上下 paddingpnpm arch:check三条闸门:page-shell-handwritten·page-root-padding(根元素、第一层子 div、三元分支、委托的同文件组件、cn()里的字面量都查)·page-root-unscanned(认不出根就报错)。反向验证见scripts/AGENTS.md/ctx记了结论,文档站中英教程里的外壳示例同步改成<PageShell>看得见的变化(除了顶距统一成 16)
py-5→pt-5pt-4后 sticky 的基准往下挪了 16px(基准是滚动容器 padding 的内沿)。条带类(参数配置顶栏 · 权限矩阵工具条)改content-scroll:-top-4,吸顶时贴住最上沿、不露缝;左栏类(设置屏导航 · 审批中心 · 流程设计器 · 组件沙箱)改content-scroll:*:top-0,吸顶落在 16px。整页滚动模式不变py-8,顶距和别的页一样是 16实测(Playwright,1920 和 390 两档,第一个画出东西的元素距内容列):15 页上 = 左 = 16(文字行 17 是行高半行距);1920 下右也是 16。参数配置:顶栏静止 / 吸顶都是 top 0、左右铺满、搜索框 16;左栏静止 85、吸顶 80。个人中心 / 审批中心左导航 16。
自查清单
pnpm typecheck --force过pnpm lint过pnpm build过pnpm i18n:check && pnpm i18n:jsx过pnpm ctx:check过pnpm arch:check过pnpm e2e全量没在本地跑,交给 CI;本地用临时 Playwright 脚本实测了间距和 stickypackages/platform/src/pages/AGENTS.md、scripts/AGENTS.md关联 issue
Closes #209
🤖 Generated with Claude Code