docs(layout): page-header 的 Responsive Behavior 按 PageHeader 现状改写 Spacing 一行 (#3902) - #3915
Merged
Merged
Conversation
…cing 一行 (#3902) `content/docs/layout/page-header.mdx:229` 的「Spacing: Adjusts padding for different screen sizes」是 #3786 修掉的那个假断言的第四份副本: `packages/layout/src/PageHeader.tsx:210` 的根 class 是 `flex flex-col gap-3 pb-4 border-b`,padding 与 gap 都没有断点变体;整个文件 里唯一带断点前缀的类是标题的 `md:text-3xl`(:231)。PR3905 落地后,Styling → Container 说「at every breakpoint — there is no responsive variant」,四行之后 的 Responsive Behavior 却说 padding 随屏幕尺寸调整 —— 同一页自相矛盾。 按现实改写这一行,并沿用 #3786 在 Container 节定下的措辞;真正随断点变化的 标题字号只做指向(Styling → Title 已有该数值),不再复制具体数值,避免这个 断言长出第五份副本。同小节 Mobile / Desktop 两行已核为真(标题行 `flex flex-wrap` :211、右槽 `ml-auto` :235),不动。
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Fixes #3902
问题
content/docs/layout/page-header.mdx:229(Responsive Behavior 小节)写着「Spacing: Adjusts padding for different screen sizes」—— 这是 #3786 修掉的那个假断言
(
pb-4on mobile /pb-8on desktop)的第四份副本。PR #3905 把 Styling → Container收敛成「
pb-4at every breakpoint — there is no responsive variant」之后,这一页变成自相矛盾:Container 说没有断点变体,四行之后的 Responsive Behavior 说 padding 会随
屏幕尺寸调整。读者信哪一条,取决于他翻到哪一节。
事实核对
基线
origin/main@c2ecbaed9(已含 PR #3905 的合并点50fa3766e),逐词对照packages/layout/src/PageHeader.tsx::210根 classflex flex-col gap-3 pb-4 border-b——pb-4、gap-3都没有断点前缀;:211的gap-x-4 gap-y-2、:235的gap-2同样没有:231的md:text-3xl是整个文件里唯一带断点前缀的类(grep -cE '\b(sm|md|lg|xl|2xl):'= 1):142已写明text-2xlon mobile /text-3xlon desktop同小节另两行已核为真,未改动:Actions 换行由标题行的
flex flex-wrap(:211)兑现,右对齐由右槽的
ml-auto(:235)兑现。改法
只改
:229这一行(1 行增 / 1 行删,单文件):page-header.mdx的 Styling/Container 两条数值与 PageHeader.tsx 不符(pb-8 on desktop、gap-4) #3786 在 Container 节定下的句式,保持同页两节口径一致;数值 —— 这个断言已经长到第四份副本,复制数值就是第五份的种子。
同页其余部分(含 #3786 / PR #3905 已收敛的 Styling 三节、以及 #3906 在议的定位问题)一律未碰。
验证
node scripts/check-doc-links.mjs→Links are valid across 7 scan roots.node scripts/check-control-bytes.mjs→OK (scanned 3792 tracked text file(s); skipped 85 binary);另按字节纪律自查
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]'于改动文件零命中。node scripts/check-changeset-presence.mjs→ 「No source of a released package changed inthis range, so no changeset is owed.」(纯 docs,未动任何发版包的
src/),故本 PR 不带 changeset。pnpm exec turbo run type-check --concurrency=2→Tasks: 78 successful, 78 total(md-only 保险)。反向验证:本改动是散文断言的改写,不含任何可执行分支,没有「把删掉的肢体装回去看诊断变红」
的可测等价物 —— 按注释-only 惯例豁免,如实记录。替代证据是上面那张改写句与代码逐词对照表
(每个短语都能指回一处 file:line)加门禁前后皆绿。
越界发现(未在本 PR 修)
app-shell.mdx的 Header Bar / Content Area 两处数值与AppShell.tsx不符(「64px / 4rem」实为h-14=56px;「4 on mobile」实为p-3,且 mobile 的pb-20未记) #3914:content/docs/layout/app-shell.mdx:64/:71的两处数值与AppShell.tsx:249/
:257不符(「64px / 4rem」实为h-14= 56px;「4 on mobile」实为p-3,且 mobile 的pb-20未记)—— 同一类数值漂移,但属另一文件、另一组件,不在本单判定面内。Generated by Claude Code