Skip to content
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

Update the value of the diffEnd when click Show More btn in the DiffFileTree #24069

Merged

Conversation

sillyguodong
Copy link
Contributor

@sillyguodong sillyguodong commented Apr 12, 2023

In the component DiffFileTree,if don't update the value of the diffEnd in the callback of ajax request, click Show More btn will always return the same response, duplicate files are appended to the file list.

Before:

Screen.Recording.2023-04-12.at.14.18.33.mov

After:

Screen.Recording.2023-04-12.at.14.19.21.mov

@lunny lunny added type/bug outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels Apr 12, 2023
@lunny lunny added this to the 1.20.0 milestone Apr 12, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 12, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 12, 2023
@delvh delvh added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 12, 2023
@silverwind
Copy link
Member

Lint failing

@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2023

Codecov Report

Merging #24069 (a94e3cd) into main (f521e88) will decrease coverage by 0.15%.
The diff coverage is 33.63%.

@@            Coverage Diff             @@
##             main   #24069      +/-   ##
==========================================
- Coverage   47.14%   46.99%   -0.15%     
==========================================
  Files        1149     1161      +12     
  Lines      151446   153729    +2283     
==========================================
+ Hits        71397    72243     +846     
- Misses      71611    72997    +1386     
- Partials     8438     8489      +51     
Impacted Files Coverage Δ
cmd/dump.go 0.64% <0.00%> (-0.03%) ⬇️
cmd/embedded.go 0.00% <0.00%> (ø)
cmd/mailer.go 0.00% <0.00%> (ø)
cmd/manager.go 0.00% <0.00%> (ø)
cmd/manager_logging.go 0.00% <0.00%> (ø)
cmd/migrate_storage.go 5.76% <0.00%> (-0.12%) ⬇️
cmd/restore_repo.go 0.00% <0.00%> (ø)
cmd/web.go 0.00% <0.00%> (ø)
models/actions/run.go 1.63% <0.00%> (-0.10%) ⬇️
models/actions/runner.go 1.44% <ø> (ø)
... and 58 more

... and 140 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@silverwind silverwind merged commit 3753ecd into go-gitea:main Apr 12, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 12, 2023
GiteaBot added a commit to GiteaBot/gitea that referenced this pull request Apr 12, 2023
…iffFileTree (go-gitea#24069)

In the component `DiffFileTree`,if don't update the value of the
`diffEnd` in the callback of ajax request, click `Show More` btn will
always return the same response, duplicate files are appended to the
file list.


Before:


https://user-images.githubusercontent.com/33891828/231371188-82d169af-10bb-47e2-8aca-83ced2597f2d.mov



After:


https://user-images.githubusercontent.com/33891828/231369805-39a5a4d0-662c-4f08-bc5a-7d31e8782453.mov

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Apr 12, 2023
lunny pushed a commit that referenced this pull request Apr 12, 2023
…iffFileTree (#24069) (#24078)

Backport #24069 by @sillyguodong

In the component `DiffFileTree`,if don't update the value of the
`diffEnd` in the callback of ajax request, click `Show More` btn will
always return the same response, duplicate files are appended to the
file list.

Before:

https://user-images.githubusercontent.com/33891828/231371188-82d169af-10bb-47e2-8aca-83ced2597f2d.mov

After:

https://user-images.githubusercontent.com/33891828/231369805-39a5a4d0-662c-4f08-bc5a-7d31e8782453.mov

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 13, 2023
* upstream/main:
  [skip ci] Updated translations via Crowdin
  Bump vm2 from 3.9.15 to 3.9.16 (go-gitea#24089)
  Fix difficult translation for other languages (go-gitea#24070)
  Fix mismatch between hook events and github event types (go-gitea#24048)
  Improve LFS error logs (go-gitea#24072)
  Update the value of the `diffEnd` when click `Show More` btn in the DiffFileTree (go-gitea#24069)
  Add tooltips to `Hide comment type` settings where necessary (go-gitea#21306)
  Use a general approach to access custom/static/builtin assets (go-gitea#24022)
  Make Release Download URLs predictable (go-gitea#23891)
  Expand selected file when clicking file tree (go-gitea#24041)
  Localize milestone related time strings (go-gitea#24051)
  update BSDmakefile to latest version from upstream (go-gitea#24063)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 31, 2023
@sillyguodong sillyguodong deleted the bugfix/difftree_not_update_diffend branch February 29, 2024 03:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants