-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Adds side-by-side diff for images #6784
Conversation
Signed-off-by: Mario Lubenka <[email protected]>
Signed-off-by: Mario Lubenka <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #6784 +/- ##
==========================================
- Coverage 41.64% 41.59% -0.05%
==========================================
Files 483 483
Lines 64631 64741 +110
==========================================
+ Hits 26916 26932 +16
- Misses 34274 34360 +86
- Partials 3441 3449 +8
Continue to review full report at Codecov.
|
Probably better would be to have Also what will happen with very large images? |
Signed-off-by: Mario Lubenka <[email protected]>
…diff # Conflicts: # public/css/index.css
Signed-off-by: Mario Lubenka <[email protected]>
The images are embedded how they were uploaded in the repository, i.e. in their full dimensions. |
Signed-off-by: Mario Lubenka <[email protected]>
…foreSourcePath Signed-off-by: Mario Lubenka <[email protected]>
Signed-off-by: Mario Lubenka <[email protected]>
ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(headTarget, "raw", "commit", endCommitID) | ||
ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(baseTarget, "src", "commit", startCommitID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I changed "headTarget" to "baseTarget", as the "before" paths should point to the forked repository.
Signed-off-by: Mario Lubenka <[email protected]>
Signed-off-by: Mario Lubenka <[email protected]>
I'll look into that. :) I assume that the filesystem library is able to do that. |
Signed-off-by: Mario Lubenka <[email protected]>
Signed-off-by: Mario Lubenka <[email protected]>
Okay. I'll do that on the weekend, as the PR isn't relevant for 1.9.0. ;)
Jonas Franz <[email protected]> schrieb am Di., 9. Juli 2019, 22:21:
… ***@***.**** requested changes on this pull request.
------------------------------
In routers/repo/pull.go
<#6784 (comment)>:
> ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(headTarget, "raw", "commit", endCommitID)
+ ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(baseTarget, "src", "commit", startCommitID)
Missing check? What happens if there is no startCommitID because it's the
first commit? (see my last comment)
------------------------------
In routers/repo/pull.go
<#6784 (comment)>:
> ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(headTarget, "raw", "commit", endCommitID)
+ ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(baseTarget, "src", "commit", startCommitID)
+ ctx.Data["BeforeRawPath"] = setting.AppSubURL + "/" + path.Join(baseTarget, "raw", "commit", startCommitID)
same
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6784?email_source=notifications&email_token=ABXUS7SZ677NYBA2C4CCDA3P6TXNVA5CNFSM4HI5BMVKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB55UPXA#pullrequestreview-259737564>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABXUS7SGVLDQFQH7JBKNVR3P6TXNVANCNFSM4HI5BMVA>
.
|
…commit Signed-off-by: Mario Lubenka <[email protected]>
Signed-off-by: Mario Lubenka <[email protected]>
Hey there. Sorry for the long delay.
This happens when the image is newly added to the repository (i.e. is not in the index of the base commit). Fixed by only displaying the image if it exists in the base commit index. |
Ready for review @jonasfranz |
Could this PR have latest master merged in and CI restarted? Looks like CI problems are not from this PR. |
Since @jonasfranz didn't response this one for a month and there are two approvals on this, I think we can merge this one when CI PASS. |
@lunny @lafriks It looks like the tests I've added to the UTF functions are quite problematic. They fail only from time to time. I guess it's a LOCALE setting. Can a specific LOCALE be forced in the Makefile for the tests? Something like |
Otherwise, I'd remove most of the UTF8 tests. I don't think they're that much important. |
make L-G-T-M work |
This adds a basic image diff and prints the width of the images (before and after). This is part of what was requested in #6255 .
Screenshot:
The side-by-side view for images will be active regardless whether split view is active or not.