Skip to content
PixiKit

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
NameTypeDefaultDescription
filestring"lib/total.ts"The file name in the top bar.
linesDiffReviewLine[]DEFAULT_LINESThe diff lines, top to bottom.
reviewersstring[]DEFAULT_REVIEWERSThe names of the reviewers shown at the bottom, one avatar each.
stateLabels[string, string, string]DEFAULT_STATESThe pill text for the review, approved and changes states.
approveLabelstring"Approve"The text of the approve button.
changesLabelstring"Request changes"The text of the request changes button.
commentLabelstring"Comment on this line"The hidden label of the gutter plus button.
resolveLabelstring"Resolve"The text of the resolve button in an open thread.
reopenLabelstring"Reopen"The text of the reopen button on a resolved thread.
resolvedLabelstring"Resolved"The text on the collapsed line of a resolved thread.
onStateChange(state: DiffReviewState) => voidNoneCalled with the new state when a visitor presses approve or request changes.
autoplaybooleantrueStarts when the scene scrolls into view; when off it waits for a click on replay.
loopbooleantruePlays again from the start layout after the hold.
speednumber1Playback speed multiplier.
heightnumber360The height of the scene in px.
widthnumber560The widest the scene grows, in px.
replayLabelstring"Replay"What screen readers call the replay button.
classNamestringNone

Related