-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 jquery.upload with web component #2623
Merged
tvdeyen
merged 8 commits into
AlchemyCMS:main
from
sascha-karnatz:update_javascript/file-upload
Dec 15, 2023
Merged
Replace jquery.upload with web component #2623
tvdeyen
merged 8 commits into
AlchemyCMS:main
from
sascha-karnatz:update_javascript/file-upload
Dec 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
3 times, most recently
from
November 28, 2023 17:54
802eb42
to
43dbf45
Compare
app/javascript/alchemy_admin/components/uploader/file_upload.js
Outdated
Show resolved
Hide resolved
app/javascript/alchemy_admin/components/uploader/file_upload.js
Outdated
Show resolved
Hide resolved
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
2 times, most recently
from
November 29, 2023 16:00
4ee4520
to
1408ead
Compare
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
6 times, most recently
from
December 7, 2023 20:34
94aa413
to
193f825
Compare
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
4 times, most recently
from
December 11, 2023 10:59
4624b29
to
57a19b8
Compare
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
from
December 12, 2023 13:56
3e52e55
to
478cdce
Compare
tvdeyen
reviewed
Dec 12, 2023
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
from
December 12, 2023 16:34
a2d0c8c
to
cbc8517
Compare
tvdeyen
reviewed
Dec 13, 2023
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
4 times, most recently
from
December 13, 2023 09:08
5aba11c
to
2503373
Compare
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
from
December 13, 2023 14:44
2503373
to
eed7873
Compare
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
from
December 13, 2023 15:36
eed7873
to
7dfe357
Compare
tvdeyen
force-pushed
the
update_javascript/file-upload
branch
from
December 13, 2023 21:27
7dfe357
to
c9207e3
Compare
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
2 times, most recently
from
December 14, 2023 15:40
85cbdf9
to
f0088ab
Compare
tvdeyen
approved these changes
Dec 14, 2023
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.
Fantastic work! 🍥 👏🏻
tvdeyen
changed the title
Add upload component
Replace jquery.upload with web component
Dec 14, 2023
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
from
December 15, 2023 12:26
b0ce037
to
d46e4b4
Compare
Add a small helper function for writing file sizes in an human readable format. This will be used in the new file upload component.
Add a combination of file upload components. The Uploader component is handling the file upload to the server. The Progress - component will show the overall upload progress including file sizes and the FileUpload will handling each file upload and is informing the Progress - component. Also a Jest - helper is introduced, which is preparing the Alchemy config and provide global function to suppress console errors and mock XHR requests.
Add an error message handling to uploader response concern to response with error messages, that can be handled by the file upload - component.
Remove uploader coffeescript and the jquery plugins that handled the file upload before.
Replace the default progress - element with the shoelace progress-bar - component, to have a better control over the styling. The progress - element does not allow animations in Chrome anymore. The server response can take some time. We need to show the user that there is still progress. The indeterminate - attribute is showing an animation, after the upload was finished.
The XHR token was not set in the HTTP header, which could lead to an unauthorized uploaded (and after that a rejection, because the CSRF - token is also in the submitted form). Now the server is rejecting before the upload, if the CSRF - token is not correct.
If the request is a accepts json we need to return the error message as json.
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
3 times, most recently
from
December 15, 2023 16:45
e4ceee1
to
5671908
Compare
Add an action button to cancel all uploads. It also add the possibility to close the progress component, after the upload, if the oncomplete - method did not set the visibility. Also a minor round glitch was removed (the progress could show 101%).
sascha-karnatz
force-pushed
the
update_javascript/file-upload
branch
from
December 15, 2023 16:50
5671908
to
2064cd2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this pull request for?
Screenshots
Checklist