Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History: Compare revisions #79

Open
sbrl opened this issue Jun 6, 2016 · 4 comments
Open

History: Compare revisions #79

sbrl opened this issue Jun 6, 2016 · 4 comments
Labels
enhancement Let's make it better! help wanted I need some help with this.

Comments

@sbrl
Copy link
Owner

sbrl commented Jun 6, 2016

Being able to compare revisions is an essential feature. This would be extremely useful for regulars of a wiki as they can quickly see what has changed.

@sbrl sbrl added the enhancement Let's make it better! label Jun 6, 2016
@sbrl sbrl added the help wanted I need some help with this. label Jun 27, 2016
@sbrl
Copy link
Owner Author

sbrl commented Jun 27, 2016

This is rather complicated. I'm not sure whether I'll be able to do it - I'll have to take a look.

@sbrl
Copy link
Owner Author

sbrl commented Dec 10, 2016

#60 might have something useful that we can use do attempt this. We could send the raw page revision data for the 2 different revisions and then have some client side javascript render a unified diff.

@RyanGreenup
Copy link

I hardly know what I'm talking about here, but, this sounds a lot like what git already implements, granted not through the web UI but maybe setting up git integration #192 first and then looking at how WikiJS implements diffs would be insightful?

I quite like how WikiJS manages conflicts because it's familiar (it's essentially a git diff), so maybe have a look at how it's been implemented there.

@sbrl
Copy link
Owner Author

sbrl commented Jun 5, 2020

That's an interesting idea @RyanGreenup. The problem is that Pepperminty Wiki already has a page revision system (that's tied into the page index), and I don't want to reply on git integration to allow for comparing revisions. Since I last commented on this issue though I've now implemented an extra data system, so it's just a case of finding a lightweight PHP library (1 file) to do the job (I'm really reluctant to spawn any subprocesses because of the performance hit).

The other thing is that I'm very keen on implementing this server side, such that users with Javascript disabled or without javascript support (e.g. elinks) can still view the diffs.

Before, I wasn't able to use any libraries at all (the Parsedown parser was a special case). With the new system, I can include files in the main Pepperminty Wiki index.php at build time, allowing for limited library inclusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Let's make it better! help wanted I need some help with this.
Projects
None yet
Development

No branches or pull requests

2 participants