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

Improve attachment upload methods #30513

Merged
merged 15 commits into from
Jun 27, 2024

Conversation

tyroneyeh
Copy link
Contributor

@tyroneyeh tyroneyeh commented Apr 16, 2024

  • Use dropzone to handle file uploading for all cases, including pasting and dragging
  • Merge duplicate code, use consistent behavior for link generating

Close #20130

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 16, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 16, 2024
web_src/js/utils/dom.js Outdated Show resolved Hide resolved
web_src/js/utils/dom.js Outdated Show resolved Hide resolved
@wxiaoguang wxiaoguang self-assigned this Jun 17, 2024
@wxiaoguang
Copy link
Contributor

Will take a look later (resolve the conflicts and do some improvements)

web_src/js/utils/dom.js Outdated Show resolved Hide resolved
# Conflicts:
#	web_src/js/features/common-global.js
#	web_src/js/features/comp/Paste.js
#	web_src/js/features/repo-issue-edit.js
#	web_src/js/features/repo-issue.js
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 24, 2024
@wxiaoguang wxiaoguang marked this pull request as draft June 24, 2024 03:28
@wxiaoguang wxiaoguang changed the title Improve attachment upload methods WIP: Improve attachment upload methods Jun 24, 2024
@wxiaoguang

This comment was marked as outdated.

@wxiaoguang

This comment was marked as outdated.

# Conflicts:
#	web_src/js/features/dropzone.js
#	web_src/js/features/repo-issue-edit.js
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 26, 2024
@wxiaoguang wxiaoguang changed the title WIP: Improve attachment upload methods Improve attachment upload methods Jun 26, 2024
web_src/js/utils.js Outdated Show resolved Hide resolved
@wxiaoguang wxiaoguang added type/enhancement An improvement of existing functionality type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Jun 27, 2024
@wxiaoguang wxiaoguang added this to the 1.23.0 milestone Jun 27, 2024
@wxiaoguang
Copy link
Contributor

All done IMO

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 27, 2024
@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 Jun 27, 2024
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 27, 2024
@silverwind silverwind enabled auto-merge (squash) June 27, 2024 08:41
@silverwind silverwind merged commit 9bc5552 into go-gitea:main Jun 27, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 27, 2024
@tyroneyeh tyroneyeh deleted the main_improve_paste_upload branch June 27, 2024 12:59
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 28, 2024
* giteaofficial/main:
  Fix avatar radius problem on the new issue page (go-gitea#31506)
  Make toast support preventDuplicates (go-gitea#31501)
  Improve attachment upload methods (go-gitea#30513)
lunny pushed a commit that referenced this pull request Jun 28, 2024
Not sure if this is a regression from
#30513, but when attachments are
disabled, `this.dropzone` is null and the code had failed in
`initEasyMDEPaste` trying to access `dropzoneEl.dropzone`.
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/js size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/enhancement An improvement of existing functionality type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy and paste the images has list legend
4 participants