Diff Review
A code change under review: the diff lines appear, a comment thread opens under a line, gets a reply and is resolved, then the change is approved. Visitors can move through the lines with the arrow keys, open and resolve threads, and approve or request changes.
pixikit.com/docs/blocks/illustrations/diff-review
Customize
Autoplay
Loop
Props
18| Name | Type | Default | Description |
|---|---|---|---|
file | string | "lib/total.ts" | The file name in the top bar. |
lines | DiffReviewLine[] | DEFAULT_LINES | The diff lines, top to bottom. |
reviewers | string[] | DEFAULT_REVIEWERS | The names of the reviewers shown at the bottom, one avatar each. |
stateLabels | [string, string, string] | DEFAULT_STATES | The pill text for the review, approved and changes states. |
approveLabel | string | "Approve" | The text of the approve button. |
changesLabel | string | "Request changes" | The text of the request changes button. |
commentLabel | string | "Comment on this line" | The hidden label of the gutter plus button. |
resolveLabel | string | "Resolve" | The text of the resolve button in an open thread. |
reopenLabel | string | "Reopen" | The text of the reopen button on a resolved thread. |
resolvedLabel | string | "Resolved" | The text on the collapsed line of a resolved thread. |
onStateChange | (state: DiffReviewState) => void | None | Called with the new state when a visitor presses approve or request changes. |
autoplay | boolean | true | Starts when the scene scrolls into view; when off it waits for a click on replay. |
loop | boolean | true | Plays again from the start layout after the hold. |
speed | number | 1 | Playback speed multiplier. |
height | number | 360 | The height of the scene in px. |
width | number | 560 | The widest the scene grows, in px. |
replayLabel | string | "Replay" | What screen readers call the replay button. |
className | string | None |