Monorepo for Tangled tangled.org

types: add interfaces for a generic, renderable diff #963

merged opened by oppi.li targeting master from op/vyrymqtwolsn

any {split,unified} {diff,interdiff} can be rendered by adhering to this interface.

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qfpnj4og54vl56wngdriaxug/sh.tangled.repo.pull/3mcjiyey6gk22
+31
Diff #1
+31
types/diff_renderer.go
··· 1 + package types 2 + 3 + import "tangled.org/core/appview/filetree" 4 + 5 + type DiffRenderer interface { 6 + // list of file affected by these diffs 7 + ChangedFiles() []DiffFileRenderer 8 + 9 + // filetree 10 + FileTree() *filetree.FileTreeNode 11 + 12 + Stats() DiffStat 13 + } 14 + 15 + type DiffFileRenderer interface { 16 + // html ID for each file in the diff 17 + Id() string 18 + 19 + // produce a splitdiff 20 + Split() SplitDiff 21 + 22 + // stats for this single file 23 + Stats() DiffFileStat 24 + 25 + // old and new name of file 26 + Names() DiffFileName 27 + 28 + // whether this diff can be displayed, 29 + // returns a reason if not, and the empty string if it can 30 + CanRender() string 31 + }

History

2 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
types: add interfaces for a generic, renderable diff
2/3 failed, 1/3 success
expand
expand 0 comments
pull request successfully merged
oppi.li submitted #0
1 commit
expand
types: add interfaces for a generic, renderable diff
2/3 failed, 1/3 success
expand
expand 0 comments