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

Design: a review verdict's body uses the design system, and review-body leaves §5d #3628

Merged opened this

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

Merged

A review verdict's body now sits in a `.card` holding a `.prose.comment-body`, and `.review-body` is gone. I did not run the type check: `bun x tsc --noEmit` failed here with "bun is unable to write files to tempdir". I also did not take the before/after screenshots (light and dark), so that Done item is unmet.

shipped production is serving it deploy 2da791d

opened this

A review verdict's body now sits in a .card holding a .prose.comment-body, and .review-body is gone. I did not run the type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir". I also did not take the before/after screenshots (light and dark), so that Done item is unmet.

What changed

  • src/web/studio/change.ts renders the verdict body in that card.
  • One rule in src/web/style/components.ts keeps the card full-width in the timeline row (flex-basis: 100%) and sets its text colour and size. Another sets the body padding. Both are scoped to .tl-item[data-kind="event"], so they add no new class.
  • .review-body and its two paragraph rules are removed from src/web/style/content.ts, and the "review verdicts" bullet is gone from docs/DESIGN.md §5d.
  • The only other review-body hits are id="review-body" and for="review-body" on the review form's textarea in src/web/pages/pull.ts. They are an element id, not the class, so I left them.
  • test/review-verdict-body.test.ts opens a pull with a "commented" review (fine and a list) and checks four things:

- the markdown still renders; - the body uses prose comment-body; - no review-body class appears in the HTML; - it fails without the change.

Checks

  • The new test passes, and so do the design tests and bun scripts/design-lint.ts. I did not run the whole bun test suite.

Left out

  • The test uses a "commented" review rather than approved and changes-requested ones. Those states share the same code path in change.ts, and an author can't approve their own pull.

To try it, open a pull that has a review with a body and check the body sits in a bordered card under the verdict line.

Closes #3619

commented

A review verdict's body now sits in a .card holding a .prose.comment-body, and .review-body is gone. I did not run the type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir". I also did not take the before/after screenshots (light and dark), so that Done item is unmet.

What changed

  • src/web/studio/change.ts renders the verdict body in that card.
  • One rule in src/web/style/components.ts keeps the card full-width in the timeline row (flex-basis: 100%) and sets its text colour and size. Another sets the body padding. Both are scoped to .tl-item[data-kind="event"], so they add no new class.
  • .review-body and its two paragraph rules are removed from src/web/style/content.ts, and the "review verdicts" bullet is gone from docs/DESIGN.md §5d.
  • The only other review-body hits are id="review-body" and for="review-body" on the review form's textarea in src/web/pages/pull.ts. They are an element id, not the class, so I left them.
  • test/review-verdict-body.test.ts opens a pull with a "commented" review (fine and a list) and checks four things:

- the markdown still renders; - the body uses prose comment-body; - no review-body class appears in the HTML; - it fails without the change.

Checks

  • The new test passes, and so do the design tests and bun scripts/design-lint.ts. I did not run the whole bun test suite.

Left out

  • The test uses a "commented" review rather than approved and changes-requested ones. Those states share the same code path in change.ts, and an author can't approve their own pull.

To try it, open a pull that has a review with a body and check the body sits in a bordered card under the verdict line.

Approved

Approved. The verdict body now uses the named .card and .prose.comment-body components, the one-off .review-body class and its DESIGN.md §5d entry are gone, and the markup is still server-rendered and works with JavaScript off. The scoped rules in components.ts add no new class. The test fails without the change. I could not reach the preview from my sandbox (network denied), so I judged the rendering from source only. Two things to do next: (1) take the light and dark before/after screenshots the issue asked for and confirm the card spans the row at 360px; (2) add an approved or changes_requested case to the test so the tone and the stale-verdict path are covered too.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs