Public: anyone can read this; the crew can change it.

Comments are a component in docs/design/areas/comments.md, and .comment, .comment-body and .comment-form leave §5d #5536

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The new `docs/design/areas/comments.md` makes comments one documented component: a comment card, its rendered markdown, and the form that writes one. It follows `docs/design/areas/README.md` and covers three classes. For each it names the function that writes the markup and the stylesheet rules that style it:

shipped production is serving it deploy 23f74da

opened this

The new docs/design/areas/comments.md makes comments one documented component: a comment card, its rendered markdown, and the form that writes one. It follows docs/design/areas/README.md and covers three classes. For each it names the function that writes the markup and the stylesheet rules that style it:

  • .comment: written by commentCard() in src/web/comments.ts and reviewRows() in src/web/diff-view.ts. Styled in src/web/style/components.ts, plus .dc-review .comment in src/web/style/content.ts.
  • .comment-body: written by commentCard(), reviewRows() and reviewEntry() in src/web/studio/change.ts. Styled in src/web/style/components.ts.
  • .comment-form: written by composer() and editForm() in src/web/pages/thread.ts, reviewRows(), and studioApp() in src/web/studio/app.ts (the "Tell the crew" box). Styled in src/web/style/components.ts and src/web/style/content.ts (the narrow-screen action line and the review-thread margin).

In docs/DESIGN.md §5d, only those three classes' lines under style/components.ts are deleted. No markup or stylesheet rule changed, so every page looks the same. All three classes still have both markup and rules, so none needs a retirement issue.

bun scripts/design-lint.ts passes, and so do test/design-audit.test.ts, test/design-lint.test.ts and test/design-map.test.ts (24 pass, 0 fail). To check it, read docs/design/areas/comments.md and confirm with grep -rn 'class="[^"]*\bcomment' src/web.

🤖 Generated with Claude Code

Closes #5521

commented

The new docs/design/areas/comments.md makes comments one documented component: a comment card, its rendered markdown, and the form that writes one. It follows docs/design/areas/README.md and covers three classes. For each it names the function that writes the markup and the stylesheet rules that style it:

  • .comment: written by commentCard() in src/web/comments.ts and reviewRows() in src/web/diff-view.ts. Styled in src/web/style/components.ts, plus .dc-review .comment in src/web/style/content.ts.
  • .comment-body: written by commentCard(), reviewRows() and reviewEntry() in src/web/studio/change.ts. Styled in src/web/style/components.ts.
  • .comment-form: written by composer() and editForm() in src/web/pages/thread.ts, reviewRows(), and studioApp() in src/web/studio/app.ts (the "Tell the crew" box). Styled in src/web/style/components.ts and src/web/style/content.ts (the narrow-screen action line and the review-thread margin).

In docs/DESIGN.md §5d, only those three classes' lines under style/components.ts are deleted. No markup or stylesheet rule changed, so every page looks the same. All three classes still have both markup and rules, so none needs a retirement issue.

bun scripts/design-lint.ts passes, and so do test/design-audit.test.ts, test/design-lint.test.ts and test/design-map.test.ts (24 pass, 0 fail). To check it, read docs/design/areas/comments.md and confirm with grep -rn 'class="[^"]*\bcomment' src/web.

🤖 Generated with Claude Code

Approved

Docs-only move, and it checks out against the source. I grepped src/web: .comment is written in comments.ts:41 and diff-view.ts:312, .comment-body in comments.ts:56, diff-view.ts:321 and studio/change.ts:180, and .comment-form in thread.ts:255 and :502, diff-view.ts:327 and studio/app.ts:305. The style rules the doc names are in components.ts and content.ts. The file follows areas/README.md, and the three lines leave §5d, which is only allowed to shrink. No markup or CSS changed, so there is no experience change to review.

Two things I would do next:

  1. The doc points at functions and file paths, which drift. Have the design check fail when a named writer function no longer exists.
  2. .tell-here .comment-form in components.ts:687 and .tl-item[data-kind="event"] .comment-body are two more places that restyle these classes. Mention them in the doc so the next person finds every rule.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs