[Feature Request] SVG Diff #6688

Closed
opened 2025-11-02 07:03:55 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @kdumontnu on GitHub (Jan 13, 2021).

Now that we support svg rendering we should consider adding support for rendered svg diff.

This shows the basic functionality in GitHub.

GH Demo

See live GitHub example (note: GitHub actually seems to have a bug in swipe mode when the SVG size has changed it shows both on tope of one-another)

Personally, I find the the onion skin mode to be the least helpful, but the other two modes are quite useful.

Request:

  • Like GitHub, we should render the svg diff in PRs and commit diff view
  • Like GitHub, we should have a toggle button to switch between code and render mode
  • Unlike GitHub, the toggle button should be "sticky" between sessions/page-views, so that a user navigating between PR tabs doesn't have to repeatedly toggle the button.
  • Unlike GitHub, the default toggle state should be configurable by either repository, user, or gitea instance
Originally created by @kdumontnu on GitHub (Jan 13, 2021). Now that we support svg rendering we should consider adding support for rendered svg diff. This shows the basic functionality in GitHub. ![GH Demo](https://github.blog/wp-content/uploads/2014/10/76da64c0-4b49-11e4-9456-4ee665a25f7b.gif?resize=800%2C861) See [live GitHub example](https://github.com/go-gitea/gitea/commit/f8a668ab0c098476a47b9d96fb061fa31fec78ef?short_path=1cd669c#diff-1cd669c19b2783a59088190552136237bf1c8de6fdaf3f331a27a89bed63054b) (note: GitHub actually seems to have a bug in `swipe` mode when the SVG size has changed it shows both on tope of one-another) Personally, I find the the onion skin mode to be the least helpful, but the other two modes are quite useful. ### Request: - Like GitHub, we should render the svg diff in PRs and commit diff view - Like GitHub, we should have a toggle button to switch between code and render mode - Unlike GitHub, the toggle button should be "sticky" between sessions/page-views, so that a user navigating between PR tabs doesn't have to repeatedly toggle the button. - Unlike GitHub, the default toggle state should be configurable by either repository, user, or gitea instance
GiteaMirror added the type/feature label 2025-11-02 07:03:55 -06:00
Author
Owner

@lunny commented on GitHub (Jan 14, 2021):

We have already Image Diff, so I think this should not be very difficult.

@lunny commented on GitHub (Jan 14, 2021): We have already Image Diff, so I think this should not be very difficult.
Author
Owner

@6543 commented on GitHub (Feb 11, 2021):

could it be closed by #14450 ?

@6543 commented on GitHub (Feb 11, 2021): could it be closed by #14450 ?
Author
Owner

@kdumontnu commented on GitHub (Feb 11, 2021):

could it be closed by #14450 ?

Yep!

@kdumontnu commented on GitHub (Feb 11, 2021): > could it be closed by #14450 ? Yep!
Author
Owner

@KN4CK3R commented on GitHub (Feb 12, 2021):

No. #14450 is just a nicer image diff but without SVG support. After #14450 is merged I will create a new PR with support for SVG images (~80% done).

@KN4CK3R commented on GitHub (Feb 12, 2021): No. #14450 is just a nicer image diff but without SVG support. After #14450 is merged I will create a new PR with support for SVG images (~80% done).
Author
Owner

@KN4CK3R commented on GitHub (Mar 3, 2021):

#14867 implements this request.

@KN4CK3R commented on GitHub (Mar 3, 2021): #14867 implements this request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6688