Skip to content

docs: remove em dashes from component and block doc prose - #4394

Merged
josephfarina merged 1 commit into
mainfrom
navi/docs/slop-22
Jul 28, 2026
Merged

josephfarina merged 1 commit into
mainfrom
navi/docs/slop-22

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

What

Recast prose em dashes in nine .doc.mjs files as the right punctuation for each sentence (colon for a definition intro, semicolon between independent clauses, or a period for a full break), following check 17 of the Doc Reviewer rubric. Prose strings only, meaning preserved.

Files:

  • packages/core/src/Avatar/AvatarStatusDot.doc.mjs (3)
  • packages/core/src/Chat/ChatComposer.doc.mjs (2)
  • packages/core/src/Chat/ChatComposerInput.doc.mjs (1)
  • packages/core/src/Table/useTableRowStatus.doc.mjs (1)
  • packages/core/src/Thumbnail/Thumbnail.doc.mjs (1)
  • packages/core/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs (1)
  • packages/cli/templates/blocks/components/ChatComposer/ChatComposerFlat.doc.mjs (1)
  • packages/cli/templates/blocks/components/DateInput/DateInputFormats.doc.mjs (1)
  • packages/cli/templates/blocks/components/IconButton/IconButtonFloating.doc.mjs (1)

Out of scope (left as-is)

Validation

  • pnpm --filter @astryxdesign/core typecheck:docs passes
  • pnpm exec tsc --project packages/cli/tsconfig.template-docs.json --noEmit passes
  • node .github/scripts/api-cli-parity-test.mjs --no-baseline: 330 pass, 0 fail
  • Each edited file re-parses via dynamic import; dense/props render verified for Thumbnail and ChatComposer

Night Watch — Doc Reviewer

Recast prose em dashes in nine .doc.mjs files as the appropriate
punctuation (colon, semicolon, or sentence break) per the AI-slop prose
rubric. Prose strings only; meaning preserved. Name/displayName
Component - Variant labels, CJK prose, numeric ranges, and the -> arrow
in the ChatComposer elevation description were left untouched.

Files: Avatar/AvatarStatusDot, Chat/ChatComposer, Chat/ChatComposerInput,
Table/useTableRowStatus, Thumbnail, TopNav/TopNavMegaMenuFeaturedCard,
and the ChatComposerFlat, DateInputFormats, and IconButtonFloating block
templates.

Found during Night Watch doc review.
@vercel

vercel Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 26, 2026 9:20am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 26, 2026
github-actions Bot added a commit that referenced this pull request Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Avatar · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 481 -
Complexity N/A Very High (54) -
Chat · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 5337 -
Complexity N/A Very High (437) -
Table · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 1920 -
Complexity N/A Very High (101) -
Thumbnail · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 308 -
Complexity N/A Very High (34) -
TopNav · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 2081 -
Complexity N/A Very High (151) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 0B

Accessibility Audit

Status: 4 accessibility violation(s) found — 4 serious.

Avatar - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 4/16 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Chat - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 2/8 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Table - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 4/24 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Thumbnail - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 2/12 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@josephfarina
josephfarina merged commit e00d4ac into main Jul 28, 2026
18 checks passed
@github-actions
github-actions Bot deleted the navi/docs/slop-22 branch July 29, 2026 06:59
AKnassa added a commit to AKnassa/astryx that referenced this pull request Sep 26, 2026
Resolved conflicts:
- packages/core/src/Chat/ChatComposerInput.tsx: kept the PR's
  handleRef.setValue alongside upstream's `focus: focusEditable`
  (meta#6419/meta#6398 keep an existing in-editor selection on focus); dropped the
  PR's local placeCaretAtEnd helper in favour of upstream's import from
  ./chatComposerSelection; handleKeyDown deps keep upstream's
  onKeyDownProp (meta#4280) and drop onChange, since submit-clear now reports
  through emitChange. The pending-emissions ledger auto-merged over
  upstream's one-shot pendingEchoValueRef, next to meta#6419's
  emitChangeVersionRef.
- packages/core/src/Chat/ChatComposerInput.test.tsx: took upstream's
  imports (waitFor, act, userEvent); the PR's controlled-value and
  trigger-menu tests auto-merged.
- packages/core/src/Chat/ChatComposerInput.doc.mjs: kept the PR's
  handleRef/value prose in upstream's prettier-wrapped layout, and recast
  the English/dense em dashes as punctuation per meta#4394.

Known fallout, fixed in the follow-up review commit (astracat F2): the
required `setValue` member breaks upstream's five-member handle literal in
useChatPasteAsToken.test.ts (TS2741 under the core typecheck).
AKnassa added a commit to AKnassa/astryx that referenced this pull request Sep 26, 2026
)

Follow-up to d3db49a. F1 narrowed echo recognition to the oldest
pending emission, but the public prop docs still promised the old,
absolute behavior ("echoes of onChange are ignored", and onChange as
purely observational even alongside `value`).

F1 (docs) - value/onChange now describe what the sync effect does:
- `value` JSDoc and the en/zh/dense doc.mjs `value` entries: in-order
  echoes of onChange, even late ones, are skipped; any other value
  that differs from the editor content, including a coalesced or
  debounced commit, is applied as an override. A parent that passes
  `value` without committing every onChange may have an override
  equal to its oldest uncommitted emission read as an echo; force it
  with `key` or `handleRef.setValue`.
- `onChange` JSDoc drops "the parent does not need to commit the
  value back"; it and the doc.mjs onChange entries now say to commit
  each emission when passing `value`, pointing at `value`.
- File header, setValue JSDoc and the changeset say "in-order echo".
  The changeset gains one sentence stating the same limits.
- en/dense prose has no em dashes (meta#4394).

Two tests pin the documented behavior:
- 'applies a coalesced commit that differs from the editor content
  as an override' (value='' -> 'a','ab','abc' -> value='ab' => 'ab').
  With the pre-F1 indexOf matching restored it fails:
  expected 'abc' to be 'ab'.
- 'lets setValue force an override equal to the oldest uncommitted
  emission': value='' is skipped as the documented residual, then
  handleRef.setValue('') clears the box.
Docs-only change otherwise; no runtime code touched. Both tests pass
at d3db49a as expected for a docs finding.

F2 unchanged (setValue optional, [feat] + patch). F3 still waits on
cixzhang (breaking or not).

Checks: 7 Chat suites 154/154; core tsc exit 0; eslint and prettier
clean; check-changesets, check-sync, check-knowledge pass;
docPropLiterals + doc-loads 144/144.

This branch was successfully deployed

1 active deployment
Preview — 3a6450f2 Deployed Jul 26, 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