-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Replace ajax with fetch, improve image diff #27267
Conversation
Likely should move the Edit: done. |
I guess we can backport as an enhancement to image diff which should now load twice as fast and use half the bandwidth. |
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.
seem not right at the moment.
Ready again. |
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.
I think it's better to wrap some await
with try-catch
.
Because now we show the unhandled rejected promise error to end users. But for this case (get SVG size), it doesn't need to show the errors.
1. Dropzone attachment removal, pretty simple replacement 2. Image diff: The previous code fetched every image twice, once via `img[src]` and once via `$.ajax`. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten. --------- Co-authored-by: Giteabot <teabot@gitea.io>
Backport #27267 by @silverwind 1. Dropzone attachment removal, pretty simple replacement 2. Image diff: The previous code fetched every image twice, once via `img[src]` and once via `$.ajax`. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten. Co-authored-by: silverwind <me@silverwind.io>
* giteaofficial/main: [skip ci] Updated translations via Crowdin Keep filter when showing unfiltered results on explore page (go-gitea#27192) Don't show Link to TOTP if not set up (go-gitea#27585) Fix data-race bug when accessing task.LastRun (go-gitea#27584) Fix template bug (go-gitea#27581) Replace ajax with fetch, improve image diff (go-gitea#27267) Replace assert.Fail with assert.FailNow (go-gitea#27578) Fix the robots.txt path show manual cron run's last time (go-gitea#27544) fully replace drone with actions (go-gitea#27556) Revert "Simplify `contrib/backport` (go-gitea#27520)" (go-gitea#27566) Align ISSUE_TEMPLATE with the new label system (go-gitea#27573) Penultimate round of `db.DefaultContext` refactor (go-gitea#27414)
img[src]
and once via$.ajax
. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten.