Skip to content

Potential feature: renderers refactor

Just dropping here a slightly different topic so I don't use brains as long-term storage..

Thinking about analysing diffoscope outputs, and potentially providing data about them, it came to my mind that one tool could parse the json output, do some edits —included adding comments to relevant sections—, and then re-inject the json into diffoscope to re-generate the html with extra comments/edits. This is already possible to do.

To improve the above functionality, it could be beneficial if the html (and/or html-dir) presenter could learn of a few more tricks, like:

  • flagging a whole `Difference` (including details) as "done"
  • hiding the details within the difference, just keeping comments visible
  • generically accept some "flags", whatever this could mean

Walking down this line of thought, it came to me that it could be interesting to further split off the presenters into something more detached than the current diffoscope: we could have systems storing only json, to be able to more trivially edit them with other tools (commenting sections, flagging, etc), and then they could re-rendered on the fly on request (→ if ever, so for our own use case on t.r-b.o, imho it's likely that most diffs would never ever be rendered). Even better, I can easily imagine this developing some caching, of course.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information