fix(review): render tables + inline video in PR comments, descriptions, and commit messages#1007
Merged
Merged
Conversation
…ions / commit messages The lightweight MarkdownBody renderer (PR comments, PR descriptions, commit messages) had no 'table' case — pipe tables fell through to the paragraph branch and collapsed into one line of raw pipes. Add a compact table renderer reusing parseTableContent from TableBlock (one pipe parser), with inline markdown in cells. Also render a paragraph consisting solely of a link (or bare URL) to a video file (.webm/.mp4/.mov/.m4v/.ogg) as an inline <video controls> player with a fallback link — GitHub can't inline-play API-posted video links, but our review UI now can. MarkdownBody moves to its own module (it was living inside PRSummaryTab while serving three components); importers re-pointed. New markdownBody.test.tsx covers tables, escaped pipes, video links, bare video URLs, and non-video paragraphs via renderToString (runs in plain CI, no DOM needed).
Owner
Author
|
This is now released in version 0.23.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while dogfooding: reviewing PR #957 inside Plannotator, a PR comment containing a markdown table rendered as one collapsed line of pipes, and links to test-recording videos were plain links.
Root cause: the lightweight
MarkdownBodyrenderer (used by the PR-comments panel, PR description tab, and commit-description header — NOT the main document viewer, which has a fullTableBlock) had notablecase, so table blocks fell through to the paragraph branch.Changes:
tablecase reusingparseTableContentfrom@plannotator/ui's TableBlock (single pipe parser), compact styling, inline markdown in cells<video controls>player with a fallback linkMarkdownBodyextracted to its own module (it served three components from insidePRSummaryTab); importers re-pointedmarkdownBody.test.tsx(5 tests, renderToString — runs in plain CI)Verification: typecheck clean · full suite 1897 pass / 0 fail ·
apps/reviewbuilds.