2

Suppose I develop a blog web application with a blog post editor. The blog posts are stored as JSON files. The web application renders these JSON files to display blog posts with their titles, headers, images, etc.

A user can save different versions of a blog post. I want to provide a new screen to compare two different versions of the same post and merge them if necessary. I don't want to expose the JSONs so it cannot be a JSON comparison tool.

How would you display the comparison of the post versions ? Do you have any examples ?

2
  • 2
    So basically you want to compare blog post v1 vs v2 and highlight the differences between them? Like google docs version control? Nov 25 '20 at 21:09
  • Yes. Google docs, forms, slides are good examples.
    – Michael
    Nov 26 '20 at 8:54
0

This is how confluence does it. I find it pretty intuitive. confluence page history

3
  • Thanks but I would like to see comparison of more complex structured data.
    – Michael
    Nov 25 '20 at 20:55
  • like what? Can you give an example Nov 25 '20 at 21:01
  • As it was mentioned, Google docs, forms, slides are good examples.
    – Michael
    Nov 26 '20 at 8:55
0

Have you tried the Linux diff command? Maybe the output is everything you need to put on the screen.
GitHub use colors to represent modifications, green for additions, red for deletion. Wikipedia use two columns to do so, but I don't think it is suitable for small phone screens.
And on StackExchange, you can see the difference like this, on the answer edited page.StackExchange Diff Tool

0

Have you looked at commercial source control merge programs? Not to use them but just to see how they format stuff? FYI I use Beyond Compare myself. Having 3 windows can be user friendly ... version 1, version 2, merged version. Also 3 way merges are best if you have access to an earlier version that both later version were derived from. 2 way merge without an original you can only note differences (not which version has the newer change). Optionally with 3 way merge most changes can be merged automatically, only conflicts occur where the exact same lines have been changed in both later versions. That case requires user to decide ... i.e. keep 'a', keep 'b', keep both 'a''b', keep both 'b''a'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.