-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Refactor to use dropzone native methods upload files #20263
Refactor to use dropzone native methods upload files #20263
Conversation
I haven't got time to test it. Some questions:
|
This section will only be executed if file.editor is not defined, this section is to ensure that file.editor is defined
uploading ... do not need to be displayed in the textarea, because the upload progress has been displayed in the dropzone area below, and the image will be added to the textarea after uploading
Adjusted
I don't know how to separate, please help Thanks |
Co-authored-by: silverwind <[email protected]>
Co-authored-by: silverwind <[email protected]>
About "2. Do we still need the prompt uploading ... in the editor when pasting an image from clipboard? ", I think the answer is still yes. For example, the issue editor's height can be very large (almost full screen), then if a user presses Before, the Since a PR need 2 approvals to get merged, I am not sure whether there are enough people like this change. If anyone (maybe @silverwind ?) can help to review and get this PR approved in the future, I can help to improve this PR together (in the next few days). |
Add mouse cursor prompt to wait? Is it the solution? |
Why not just use the placeholder in editor? IMO most editors have placeholders when uploading, including GitHub's editor. |
I don't like it very much myself placeholder in editor, and the uploading of pictures is very fast, and the issue of long text is not common. |
But you can not assume every file is small or everyone's network is fast and stable. Even worst, how about there is a network failure/error? Can users get a feedback from UI? When writing a general purpose application for end users, all edge cases should be considered. I am also open for the opinions from other users. |
The placeholder in the editor will only display uploading... and you can't know the status progress. It's more practical to pull down to see the status, what do you think? |
Thank you. The next steps in my mind:
Update: I am quite busy recently, not sure when I have time to continue. Feel free to pick up or improve or approve. |
# Conflicts: # web_src/js/features/common-global.js
Hmm, sorry for seeing it's closed. If my review caused problems, I apologize, I also worked in my free time, and haven't got time thinking about the editor problems. There are a lot of historical problems of Gitea's editor module (a lot of bugs and a lot of UI/UX problems), adding more patches may make it more difficult to maintain (and may cause more bugs ...) If I have time in the future, I may try to refactor it and try to propose some other mechanisms. Thank you very much. |
After "Introduce GitHub markdown editor, keep EasyMDE as fallback #23876" , I'd like to restart the Dropzone related work. #23876 introduces a general Thank you for your work again. |
Refer to #20147 to refactor the way to upload attachments and use dropzone to upload natively to achieve a better operating experience
For closes #20130 and #14291 and #14982