-
-
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
Don't automatically calculate diff between two branches in compare view #13949
Comments
Don't automatically reload the compare page on a branch change. Adds a new calculate changes button to trigger the reload on demand. go-gitea#13949
Hmm, maybe it's better to lazy load diff views like gh. which means user can click |
I believe lazy loading would be the only acceptable solution here, this is huge part of UI and hiding it behind user-interacatable button is something I'd rather not do. |
Loading the diff lazy sounds like a good alternative. Maybe the manual diff calculation could reduce some server loads but the lazy loading feels more like the gh ui approach. |
This current automatic diff calculation is painful when you want to create a PR that does not target the master branch, e.g. for a backport to a release branch. A huge diff is calculated against the master branch first. And the "merge into" dropdown seems unresponsive until the page has completely finished loading. |
#16775 will stop this. |
Can anyone tell me if this is still in the roadmap or even implemented? We are currently having issues because of the heavy quantity or diff in our repo... Cheers |
Did you do anything on your side in the end? |
@jpraet Cheers |
In gitea 1.16 it eagerly loads the first MAX_GIT_DIFF_FILES (configurable in app.ini, defaults to 100), and has a "Show More" button to load the next 100 files. You could reduce the value of this parameter in your configuration. |
Thank you! Will try that... |
@jpraet |
Sounds like #6900 |
We can split this configuration into two, one is for comparison, and the other is for pull request files. So that users could reduce the parameters to make compare faster in the first time load. [git]
;MAX_GIT_DIFF_LINES = 1000
;;
;; Max number of allowed characters in a line in diff view
;MAX_GIT_DIFF_LINE_CHARACTERS = 5000
;;
;; Max number of files shown in diff view
;MAX_GIT_DIFF_FILES = 100 |
[x]
):Description
When opening the compare-Page (to create a pull request or just compare two branches) the diff is calculated automatically.
If you're now changing one of the branches (head or base) gitea will automatically reload the page and calculate the diff again.
Depending on the amount of changes this may take a while.
Idea or suggestion would be to introduce a new "Calculate changes" button that triggers a page reload and thus prevents useless diff calculations on wrong selection of a branch or when you need to change both branch values.
In order to not break any existing workflows i'd suggust to calculate the diff when opening the page with two branches selected directly and just enable the calculate changes button when a branch is changed.
I did a first working prototype - please see attached screenshots.
Should I open a pull request for this or do you think this isn't a good idea?
Screenshots
Initial layout of the page (when opened with two branches the diff is displayed)
After a branch is changed the diff will be removed and just a short hint is displayed:
The text was updated successfully, but these errors were encountered: