Visual diff between revisions

Post about your customizations to share with others.

Moderators: Contributor, Developer

Visual diff between revisions

Postby samir » Jun 14, 2017 9:25 pm

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 366 times
diff-page.png
diff-page.png (146.18 KiB) Viewed 366 times
samir
 
Posts: 3
Joined: Jun 14, 2017 6:05 pm

Re: Visual diff between revisions

Postby atrol » Jun 15, 2017 1:56 pm

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6407
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Visual diff between revisions

Postby samir » Jun 17, 2017 5:14 pm

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.
samir
 
Posts: 3
Joined: Jun 14, 2017 6:05 pm

Re: Visual diff between revisions

Postby atrol » Jun 18, 2017 10:04 am

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6407
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Visual diff between revisions

Postby samir » Jun 19, 2017 10:27 am

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

Thanks atrol, I'll move the conversation to Gitter.
samir
 
Posts: 3
Joined: Jun 14, 2017 6:05 pm


Return to Customizations

Who is online

Users browsing this forum: Bing [Bot] and 2 guests