How can I compare arbitrary revisions of a post?

I just came across this issue myself today, when reading a long knowledge base topic on our internal forum. We also use Discourse Policy extensively and everyone on the team must acknowledge they’ve read and accept changes to poliy topics in the knowledge base when the policy version number is increased. Policy is a super handy feature!

Unfortunately, as the OP pointed out back in 2018, there appears to be no way to compare specific topic revisions. This means that if there have been multiple revisions between policy versions, you have to scroll through the entire document for each revision to compare changes with adjascent changes.

Historically, the current functioning has worked perfectly because topics were almost entirely about discussion and you don’t really need to or want to encourage editing of posts - though you do need some revision history for moderating purposes. But over the years we added features to make topics suitable for collaboratively creating a knowledge base of documentation. This includes the ability to wikify the OP, DiscoTOC - automatic table of contents, Discourse-docs: Documentation Management Plugin, Discourse Shared Edits, and of course policy.

So I would advocate for improving the UI around comparing and managing revisions.

Here’s what it looks like now, allowing you to compare a previous revision (left side) with the next newer revision (right side). The revision nav in bottom left corner lets you switch to the previous/next revision, or jump to the first or last revision.

Wikipedia is the obvious place to look for prior art because that’s also what people who edit wikis are familiar with. Help:Page history - Wikipedia has a video walking through the entire wikipedia revision system, which is crazy powerful, arcane and also overwhelming. I could see replicating this being an interesting project if someone wanted to contribute it, for sites that are really leaning heavily on wiki topics and where versioning is prioritized. Could it be a plugin?

For core, a smaller improvement to solve the OP is to replicate the “Difference between revisions” page - see screenshot below. It’s quite similar to discourse. Note the nav is in the heading and lets you navigate the left and right side independently to compare different versions. Also, the precise time and date of the revision is displayed whereas in discourse you have to mouseover to see the precise time and date.

1 Like