Skip to content

docs(CodeBlock): the record states startLineNumber's file coordinates - #9934

Merged
cixzhang merged 2 commits into
mainfrom
docs/codeblock-startlinenumber-record
Nov 4, 2026
Merged

cixzhang merged 2 commits into
mainfrom
docs/codeblock-startlinenumber-record

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

User impact

None at runtime: this records behavior that already shipped. Builders reading CodeBlock's record now find what startLineNumber does. Reviewers have a governing record for the prop's row in the API report.

Change

component:CodeBlock gains FR14:

  • startLineNumber (default 1) sets the number of the first line in the source file;
  • the gutter shows file coordinates (startLineNumber + index), so an excerpt reads with its real line numbers;
  • a value below 1 clamps to 1;
  • highlightLines uses the same file coordinates, and an out-of-range entry renders no highlight;
  • displayed and copied source text stay unchanged (FR1).

The record also gains an "Additive API (FR14)" compatibility line, a verification row, and the focused test in verified_by. Every statement matches the prop's JSDoc and CodeBlock.startLineNumber.test.tsx (default, a three-line excerpt from line 40, a highlight inside it and entries outside it, a value of 0, exact copy).

Record only: no source and no Changeset.

Writing rubric results

R1 narration: none; FR14 and the compatibility line describe what CodeBlock does now, in the present tense.
R2 research: none.
R3 evidence: FR14's basis is "released public type and JSDoc; shipped API" and its verification names the test file; no pull request is cited.
R4 rejected alternatives: none.
R5 change references: none added to the record.
R6 open questions: none added.

Testing

  • pnpm check:knowledge: templates and records are aligned.

Posted by Cindy's agent on her behalf.

… (FR14)

The prop shipped with its behavior in JSDoc and tests; the component
record now owns it, so the regenerated API report row has a governing
record.
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 4, 2026 11:06am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Nov 4, 2026, 11:01 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 4, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 4, 2026
@cixzhang

cixzhang commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 50525e1

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 4, 2026
@cixzhang
cixzhang merged commit 2951a3a into main Nov 4, 2026
56 checks passed
@github-actions
github-actions Bot deleted the docs/codeblock-startlinenumber-record branch November 5, 2026 06:03
This was referenced Nov 6, 2026

This branch was successfully deployed

1 active deployment
Preview — 50525e19 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant