Skip to content

docs(layout): app-shell 的 Header Bar / Content Area 两处数值按 AppShell.tsx 现状改写 (#3914) - #3945

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-3914-appshell-docs-numbers
Aug 9, 2026
Merged

docs(layout): app-shell 的 Header Bar / Content Area 两处数值按 AppShell.tsx 现状改写 (#3914)#3945
yinlianghui merged 1 commit into
mainfrom
claude/issue-3914-appshell-docs-numbers

Conversation

@yinlianghui

@yinlianghuiyinlianghui commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes#3914

docs-only。文档向代码对齐,未改packages/layout/src/AppShell.tsx

前提复核(origin/main @ ebb579dbb)

两处不符都仍然成立,行号与 issue 一致(用 git grep origin/main 复核,非工作树):

  • content/docs/layout/app-shell.mdx:64 = - Fixed height (64px / 4rem)
  • content/docs/layout/app-shell.mdx:71 = - Responsive padding (4 on mobile, 6 on desktop)
  • packages/layout/src/AppShell.tsx:249 header 类含 h-14(= 3.5rem = 56px);h-1[0-9] 在该文件唯一命中此行,没有别处覆盖成 64px(h-16 不存在)
  • packages/layout/src/AppShell.tsx:257 main 类为 flex-1 min-w-0 overflow-auto p-3 sm:p-4 md:p-6 pb-20 sm:pb-4 md:pb-6

改了什么(2 行 → 3 行)

  1. Header Bar 高度:64px / 4remh-14(3.5rem / 56px),并写明「每个断点都是这个高度,没有响应式变体」。
  2. Content Area padding:「4 on mobile, 6 on desktop」→ 三档如实列出(p-3 / sm:p-4 / md:p-6),另起一条补上此前完全未记的移动端 pb-20(5rem)。

pb-20 的用途不是猜的:移动端底部有一条 fixed bottom-0 ... sm:hidden 的底栏(packages/app-shell/src/layout/AppSidebar.tsx:744packages/layout/src/AppSchemaRenderer.tsx:217),它的可见断点与 pb-20 sm:pb-4 的生效断点正好互补 —— 底栏只在 sm 以下出现,加高的底部留白也只在 sm 以下生效。

措辞取向(照抄 #3786 的抗漂移写法)

参照 #3786page-header.mdx 的 Styling → Container 立的写法:把 Tailwind 类名本身作为首要事实、数值只作括注,并显式交代断点覆盖面(「at every breakpoint — there is no responsive variant」)。这样读者能拿文档里的类名直接去源码里对,而不是拿一个孤立数字无从验证 —— 这正是 issue 里点名的失效模式。

验证

  • node scripts/check-doc-links.mjsLinks are valid across 7 scan roots.(exit 0)
  • 全仓 pnpm exec turbo run type-check --concurrency=278 successful, 78 total(exit 0);因 docs-only 不触及任何 TS 输入,这一轮 78/78 全为 turbo 缓存命中,所以另跑了一次强制编译取真实输出:--filter @object-ui/site --force28 successful, 28 total / Cached: 0(@object-ui/sitecontent/docs 的消费者,见 apps/site/source.config.ts:6)
  • node scripts/check-changeset-presence.mjsNo source of a released package changed in this range, so no changeset is owed.(exit 0)—— 按门自身判定,docs-only 不欠 changeset
  • 卫生:控制字节自查 grep -naP 零命中;改动文件不含 fable;⛔ 未碰 content/docs/releases/

顺手记下、不在本 PR 修的同文件/同组件漂移

按 Prime Directive #10 单独开卡,不夹带进这个 PR:


🤖 Generated with Claude Code

https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt

…AppShell.tsx (#3914)
The Header Bar height was documented as "64px / 4rem" (that is `h-16`), but
the header has been `h-14` (3.5rem / 56px). The Content Area padding was
documented as "4 on mobile, 6 on desktop", but it is a three-step scale
(`p-3` / `sm:p-4` / `md:p-6`) and the mobile-only `pb-20` bottom padding was
not documented at all.
Docs follow the code here; AppShell.tsx is unchanged. Phrasing reuses the
drift-resistant style #3786 established for page-header's Styling section:
name the Tailwind class as the primary fact and state the breakpoint
coverage explicitly, so a reader can check the claim against the source.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
@vercel

vercelBot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectuiIgnoredIgnoredAug 9, 2026 1:40pm

Request Review

@yinlianghuiClaude

Copy link
Copy Markdown
CollaboratorAuthor

验收通过(objectui 分片 PM,session session_01GTRjn8xBqp75dk7kFupVRt)#3914(docs-only)

实物核验:head 48eb983,单文件 +3/-2。CI 亲读终态:17 检查全 completed、0 失败。要点:两处数值按 #3786 抗漂移写法改写(class 为主、数值括注);pb-20 的存在理由经实测锚定(移动底栏 sm:hiddenpb-20 sm:pb-4 断点互补)而非猜测;缓存回放的 type-check 诚实declared并对真实消费包强制重编;changeset 按门判定不欠。范围外:#3946(文档三处宣称不存在的 SidebarTrigger —— 对齐文档 vs 补触发器是产品选择)留分诊定级,#3947(死 import)持有。


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 9, 2026 13:46
@yinlianghui
yinlianghui added this pull request to the merge queueAug 9, 2026
Merged via the queue into main with commit fd6dd2dAug 9, 2026
18 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-3914-appshell-docs-numbers branch August 9, 2026 13:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

@yinlianghui@claude