Visual diff between revisions

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
samir
Posts: 3
Joined: 14 Jun 2017, 23:05

Visual diff between revisions

Post by samir »

Hi,

Apologies if this is not the right forum.

The current revision system works great, but it would be cool if we had inline diffs of what changed.

I started working on a customization that adds a "View Diff" link to the bug_revision_view page. This redirects to a similar page with two drop downs where you can choose the revisions to diff.

Check the attached images for a mockup of how that would work. I'm using Mantis v1 but it would be almost the same for v2.

Can this feature be merged upstream or should I write it as a plugin instead?
It depends on php-diff to work.

Thanks!
Attachments
diff-access.png
diff-access.png (141.48 KiB) Viewed 7305 times
diff-page.png
diff-page.png (146.18 KiB) Viewed 7305 times
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Visual diff between revisions

Post by atrol »

samir wrote:Can this feature be merged upstream or should I write it as a plugin instead?
VCS integration is no longer part of Manis core since quite a while, but a plugin.
This is the right place for enhancements https://github.com/mantisbt-plugins/source-integration
Please use Search before posting and read the Manual
samir
Posts: 3
Joined: 14 Jun 2017, 23:05

Re: Visual diff between revisions

Post by samir »

Hi atrol,

I meant a visual diff between issues revisions, not commits or other VCS stuff. Also that would be done for version 1 and version 2 of mantis.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Visual diff between revisions

Post by atrol »

samir wrote: I meant a visual diff between issues revisions
Oops, I just read "The current revision system works great"
and "diff", and was completely on the wrong track as I didn't have a deeper look on your screenshot.
samir wrote: Can this feature be merged upstream or should I write it as a plugin instead?
IMO (just talking for myself, not the whole Mantis core development team) it should be a plugin. (as a side note, plugins can also be merged upstream)
Feel free to start a discussion for it on https://gitter.im/mantisbt/mantisbt
samir wrote: It depends on php-diff to work.
This is one of the reasons why I prefer it as a plugin, as we could decide later on if we merge upstream or not.
We would have to ship this library with Mantis. Before that, we would have to have a deeper look at this component.
I had a very short look at it, and what I don't like that much is that the project seems to be quite dead.
There is hardly any development or support the last years and the original author seems to have stopped contributing to the project https://github.com/chrisboulton/php-dif ... ntributors
Please use Search before posting and read the Manual
samir
Posts: 3
Joined: 14 Jun 2017, 23:05

Re: Visual diff between revisions

Post by samir »

The fact that this would require third-party code made me consider creating a plugin.

Thanks atrol, I'll move the conversation to Gitter.
Post Reply