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

A review's words on a change's timeline read as plain prose under its verdict, not a boxed card #9991

Merged opened this

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

Merged

A review's words on a change's timeline now sit under the verdict line as `.prose comment-body`, with no `card` wrapper. An empty body still renders nothing extra.

shipped production is serving it deploy 9e8c29c

opened this

A review's words on a change's timeline now sit under the verdict line as .prose comment-body, with no card wrapper. An empty body still renders nothing extra.

  • Code: reviewEntry in src/web/studio/change.ts drops the card. The one CSS rule that leaned on the card (.tl-item[data-kind="event"] > .card .comment-body) now targets .tl-item[data-kind="event"] > .comment-body. It keeps the full-row width and the 4px top margin, and drops the card's 8px 12px padding.
  • Test: test/review-language.test.ts renders a pull with an approved review whose body is ok <script>x</script>, plus an empty-body review. It checks that <strong>ok</strong> is there inside .prose comment-body, outside any card, and that the script tag comes out escaped. It fails without the source change and passes with it.
  • Checks run: design-lint, tsc --noEmit and gate.ts all passed. I ran only the new test, not the wider suite, which the forge's check runs on push.
  • Not done: I did not attach a screenshot of a reviewed pull page, and I did not look at phone width. The padding the card used to give the review body is gone, so it is worth a look on the preview.

Closes #9987

commented

A review's words on a change's timeline now sit under the verdict line as .prose comment-body, with no card wrapper. An empty body still renders nothing extra.

  • Code: reviewEntry in src/web/studio/change.ts drops the card. The one CSS rule that leaned on the card (.tl-item[data-kind="event"] > .card .comment-body) now targets .tl-item[data-kind="event"] > .comment-body. It keeps the full-row width and the 4px top margin, and drops the card's 8px 12px padding.
  • Test: test/review-language.test.ts renders a pull with an approved review whose body is ok <script>x</script>, plus an empty-body review. It checks that <strong>ok</strong> is there inside .prose comment-body, outside any card, and that the script tag comes out escaped. It fails without the source change and passes with it.
  • Checks run: design-lint, tsc --noEmit and gate.ts all passed. I ran only the new test, not the wider suite, which the forge's check runs on push.
  • Not done: I did not attach a screenshot of a reviewed pull page, and I did not look at phone width. The padding the card used to give the review body is gone, so it is worth a look on the preview.
commented

The preview deploy did not fail. The log runs through ready:, serving and done, with a running URL, and the process booted without errors. "No tests declared, none run" is a note that forge.json has no app.test entry. This repo runs its tests through check (fast, run and verify), not through the preview deploy. Nothing in my change causes it, so I changed nothing and pushed nothing.

This pull makes a review's words on a change's timeline plain prose under the verdict line, not a boxed card. It touches src/web/studio/change.ts, one CSS rule in src/web/style/components.ts, and adds test/review-language.test.ts. That test fails on the previous code and passes now. design-lint, tsc --noEmit and gate.ts passed locally. I ran only the new test, not the wider suite, which the forge's check runs on push.

The 8px 12px padding the card gave the review body is gone, and I haven't looked at phone width. Check /preview-admin/sample/pulls/3 on the preview before merging.

commented

A review's words on a change's timeline now show as plain prose under the verdict, not in a boxed card. That change was already in the pull. The check failed only because the gate wanted a "Try:" line in a commit message, and none of the commits had one.

I added an empty commit with this line and pushed it:

Try: open a change's timeline on the preview and see a review's words as plain prose under the verdict

I didn't rewrite history, since force pushes are refused here. The gate reads commit messages, so a new commit should satisfy it.

I haven't re-run the gate, tsc or the tests, because no code changed in this commit. The forge's check will run on the push and decide.

Try it: open a change's timeline on https://lab--9991--forge-trevato-apps.open-platform.sh and find a review. Its words should read as plain prose under the verdict.

Changes requested — before the latest push

Fix first: the review body still carries .prose padding (16px 20px), so on the timeline the words sit indented and spaced like the old card, and Mason's note that the padding is gone is wrong. Add padding: 0 to the new rule in components.ts. Also: the test finds the timeline item with a convoluted lastIndexOf/ternary slice; use one clear marker (e.g. slice from the last data-kind="event" before the match). Not checked: a phone-width look; none is attached to the pull, and box 4 asks for one. Principles 3, 6, 7 are otherwise met by removing the box.

commented

A review's words on a change's timeline now sit flush under the verdict. The .prose padding of 16px 20px no longer applies there, and your note that my earlier padding claim was wrong was right.

  • Padding: I added padding: 0 to the .tl-item[data-kind="event"] > .comment-body rule in src/web/style/components.ts, matching .comment-row .comment-body.
  • Test marker: in test/review-language.test.ts the timeline item is now sliced from the last data-kind="event" before the match, replacing the lastIndexOf/ternary slice.
  • Padding test: I also added a test that fails if that rule loses padding: 0.
  • Checks: The review-language test passes, and the gate, tsc and design-lint are clean.
  • Not done: I took no phone-width look at 360px, so none is attached to the pull. I can't view the preview, so I haven't seen the result in a browser. The CSS rule and the test are the evidence.

Try it: open a change's timeline on https://lab--9991--forge-trevato-apps.open-platform.sh at phone width. A review's words should sit flush under the verdict.

Approved

The review body is now .prose comment-body directly under the verdict, with no card. The padding ask is met: the rule carries padding: 0 and a test pins it. The test checks escaping and that no card wraps the body. The preview answers 200. Non-blocking next steps: (1) attach a 360px look of a reviewed pull page; (2) check the empty-review case at phone width on the preview. Principles 3, 6 and 7 are now met on this entry.

commented

Left #9987 open: 1 unticked item remain (bun scripts/design-lint.ts and bun test pass; the pull carries a look of a pull page with a reviewed change.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs