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
diff view on commit with parallel diff view #5308
diff view on commit with parallel diff view #5308
Conversation
|
I like it -- great work! A modification to this for improving readability might be to place line numbers next to each other. Here's an image to show you what I mean -- see how the left and right line numbers are both located in the center column? It makes it slightly easier for your eyes to compare the line numbers. |
|
thx. |
|
Sounds good to me -- it's definitely a great start. Once the bulk of the work is committed, it makes it much easier to iterate changes like this. |
|
I have updated the branch to show full files. Hmm, it seems line comments placed aren't shown in the parallel view. |
|
Coverage remained the same when pulling 499ae4541079dea5fe416b2f2a06d40104380ff6 on Popl7:parallel-diffs-side-by-side into 4123c76 on gitlabhq:master. |
|
Coverage remained the same when pulling 499ae4541079dea5fe416b2f2a06d40104380ff6 on Popl7:parallel-diffs-side-by-side into 4123c76 on gitlabhq:master. |
|
hmm, the tests seem to give an error. |
|
because tests failed in javascript, I have removed the line notes from the parallel view. Also I can't get the line numbers working in the center. |
|
Coverage remained the same when pulling 78d6fd853c3c7cf6ba1c658468fcd5e8ef2558f7 on Popl7:parallel-diffs-side-by-side into 4123c76 on gitlabhq:master. |
|
Can I use a Html5 canvas in GL? |
|
Can you include to the diff on right side the SHA-1 for it? |
|
Yes I think so. Edit: Can you show me where this would fit in, in your opinion? |
|
@Popl7 could ypu push your current code for testing? awesome that someone is working on this, BTW :) |
|
I have updated the code. The lines are optional. @mmoll thx. I started picking up some minor feature requests to get to know the code and opensource development in general. |
|
@Popl7 OK, in general it's working, but there are some glitches, have a look at those lines in the middle: |
|
Thx for the feedback! hmm, that looks interesting ;-) I am thinking of leaving the lines out for now, and focussing on tests for the views and working comments. Is there anything that you would change or would like to see? |
|
Ok. Thx
|
|
Hm, comments would be especially nice if you use this view for reviewing merge requests, but I can see how this is making it difficult. IMHO, the GitLab devs should decide, which features are required for them to get it merged. |
|
I have the line numbers working.
I will push this version when my tests pass. Maybe someone can test the codeview to see if any quirks come up? |
|
The line offsets and "File was created/delete" notes work great here, this is on the right track |
|
ah, nice to hear that! thx. |
|
my 2 cents - comments are critical in the diff view. That's where the money is - using this during a review of a pull request. Not being able to use this with comments really hamstrings the usefulness of the feature |
|
thx for the feedback Nate. |
|
I'd prefer that if there are lines added or deleted, that they be lined up with white space the other side. Keep lines that match on the same line. Something like this: This is a screenshot from Beyond Compare. I also think that showing file context would be really helpful. Often times you can't really understand a change unless you see it in the context of the whole file, or at least plus or minus a few lines. Making that optional is fine, letting people choose no context, partial context (+- N lines) or full file context. If it were me, I'd just make it full file by default, and only implement partial context if pushed on it. You can always ignore the extra info, but you can't get the extra context if it's not displayed. |
|
@Popl7 looks good. Is it ready for review/merge? |
TODO: fix comment forms to respect left and right columns
|
@Popl7 If I understand correctly the code as it is now in this MR has comments that do respect the left and right columns? |
|
@Popl7 Dmitriy will have a look at this after 6.3 is out. |
diff view on commit with parallel diff view
|
@Popl7 thank you! |
|
@Popl7 fill name is Steven Thonus, right? |
|
thx. yes, that's me. |
|
@Popl7 Congratulations on getting your second major feature merged! |
|
thank you! |
|
Any chance to get it for 5.4 also? |
|
@soukron Definitely not. Why haven't you upgraded to 6.* ? |
|
I wish I could upgrade, but we can't lose our projects in "root level". Maybe I have missed some changelog where it's possible to have it again. |
|
IIRC, lack of root was only removed recently.. Could you not move them to /root. Why do they need to stay as root? |
|
We use GitLab in a big development group and all scripts, commands, documents are referring to git@git.localdomain.net:.git. It's impossible to move to a different schema for us. In the other side, new projects are created inside a group, but old ones need to stay as is. I'll review if I can upgrade to any 6.x which allows lack of root. Any help is appreciate. |
|
Hi @m4tthumphrey in the upgrade guide from 5.4 to 6.0 it mentions the deprecation of global namespaces and the need to move all projects to any namespace. This made me keep in 5.4. I'll try to hack routes.rb manually to map those projects to non-root projects. |
|
@soukron You are right, there is no way to keep the root namespace when upgrading. |
|
Yeah @dosire thanks for the double-checking. I've checking routes.rb file and I'll to make some map for well-known projects to add the group before enabling Grack support. They're only 5. |
|
@soukron OK, goodluck. |
|
Nice feature, but with the default layout it's not really usable due to the fixed with. side by side halves the already restricted width even further -> long lines of code need lots of sidescrolling. To compare with side by side diffs in an IDE: I can fullscreen them there. |
|
nice features, but it doesn't work when the diff is too large |
|
can we try to embed reviewboard to gitlab? |
|
@ottersxx Reviewboard has support for GitLab. Please describe what reviewboard feature you would like to see in GitLab. |
|
@Popl7 I'm using the current release(8.10.2), in the changes(diff) view, can I configure to view more lines above and below the changes? |
|
@roygao94 I worked on this feature some time ago. |









in answer to request:
http://feedback.gitlab.com/forums/176466-general/suggestions/3788060-side-by-side-diff-view
I have made an parallel diff view on the commit show page.
Below are 2 screenshots.
It works with the big commit message.
Notes per line are still too wide; If someone has tips for this, please let me know.
Please let me know if this is what the view should look like.