Skip to content

feat(webkit): [ENG-47606] add DocProse, the documentation typography contract - #906

Merged
gabriel-lisboa-azion merged 0 commit into
feat/webkit-documentationfrom
feat/ENG-47606-doc-prose
Aug 25, 2026
Merged

gabriel-lisboa-azion merged 0 commit into
feat/webkit-documentationfrom
feat/ENG-47606-doc-prose

Conversation

@gabriel-lisboa-azion

@gabriel-lisboa-azion gabriel-lisboa-azion commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds DocProse under the new documentation category — the typography contract a documentation page wraps its body in. It styles descendants rather than itself, so it works over any markdown/MDX pipeline's output, hand-written markup, or CMS HTML. The design system ships no renderer; the consumer brings their own.
  • Every prose rule carries :not([data-doc-chrome],[data-doc-chrome]_*), so the contract stops at a documentation component's edge instead of restyling the webkit internals it wraps (a Message body, a CodeBlock's lines, an Accordion trigger's heading).
  • It has no measure of its own — it is pure typography, and the consumer caps the reading column with .layout-column-docs.

How to test

  1. pnpm storybook:dev → Components / Documentation / DocProse. The DocProse story shows the full ladder; Chrome boundary shows a data-doc-chrome subtree keeping its own styling while the prose around it does not.
  2. In the browser, in both themes, confirm the in-content ladder: h2 32 (48 at xl) / h3 24 / h4 16 / prose 16 / block 24, and that it reads the same at 390px and 1440px. The ladder is pinned by descending responsive pairs, so a rung that moves with width is a bug.
  3. cd packages/webkit && npx vitest run src/components/documentation/doc-prose/doc-prose.test.ts — 8/8 pass in Chromium.
  4. node packages/webkit/scripts/check-size.mjs — doc-prose 1.02 KB against a 1.5 KB budget.
  5. node packages/webkit/scripts/check-authoring.mjs and node .claude/hooks/validate-story-source.mjs --all — both clean.

Notes


Delivery

The Documentation family is delivered on the feature branch feat/docs-components-bundle, not piecemeal to main — so main takes the whole family as one merge, while review stays per-component.

Merge order, bottom-up — each PR's base is the one before it, and each retargets automatically as its parent lands:

#904 → #905 → #906 → #907 → #908 → #909 → #910 → #911 → #912 → #913 → #914 → #915 → #916 → #917 → #918 → feat/docs-components-bundle → main

#904 the documentation category (standards only)
#905 theme: the docs measure + the prose and mono body registers
#906–#918 DocProse · DocCallout · DocCard · DocCardGroup · DocItem · DocSteps + DocStep · DocFrame · DocUpdate · DocPrompt · DocTooltip · DocPagination · DocPageHeader · DocOnThisPage

@gabriel-lisboa-azion
gabriel-lisboa-azion requested a review from a team as a code owner August 22, 2026 14:15
@isaque-bock-azion
isaque-bock-azion changed the base branch from feat/ENG-47561-docs-measure-and-mono-body to feat/webkit-documentation August 24, 2026 13:04
@isaque-bock-azion
isaque-bock-azion force-pushed the feat/ENG-47606-doc-prose branch from 3f69b5e to de9875a Compare August 25, 2026 22:42
@gabriel-lisboa-azion
gabriel-lisboa-azion merged commit de9875a into main Aug 25, 2026
15 of 17 checks passed
@gabriel-lisboa-azion
gabriel-lisboa-azion deleted the feat/ENG-47606-doc-prose branch August 25, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants