-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Dynamic attachment uploads #8681
Dynamic attachment uploads #8681
Conversation
- Add translations - Css fixes
9cfb957
to
3234088
Compare
@andreslucena I added a CHANGELOG entry. It’s hard to make it comprehensive (since there is so many different cases), but let me know if anything is missing. |
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.
👍🏽 👍🏽
@lahdeero I've just seen that we have a related to this PR flaky at develop. It seems like it's reproducible, at least I can do it locally and also in the last 3 runs of the pipeline always failed. Can you check it out please? https://github.com/decidim/decidim/runs/5409976604?check_suite_focus=true |
This seems to have broken the integration with Amazon S3. When trying to upload a census to a Voting space using Amazon S3 as uploads, I get this error:
Apparently the S3 adapter doesn't implement |
Thanks for reporting this issue @oriolgual ! I've create a bug report at #9360 to track this. |
🎩 What? Why?
Change attachments so that uploading happens in popup modal, where user can select or "drop" file(s) they want to upload. In this modal we show upload progress and after file has been uploaded (progress is 100%), we will validate the uploaded file. In case validations fail we give immediate feedback, so user can retry uploading after fixing errors (usually this means uploading different file), according to the error message(s).
There are two kind of attachments depending on whether the attachment is titled or not (technically
form.attachment
(titled) andform.upload
(untitled)). They have slightly different UI's (see protos and screenshots below) and untitled attachments doesn't support multiple files! Untitled attachments can be removed inside a form or modal, but titled attachments can only be removed inside a modal.Changes made inside the upload modal are not applied until user has pressed save button. For example, if a user wants to change the title of an attachment they need to press save before submitting the form or change won't be applied.
Untitled fields should not require any changes in the views. To update titled field in views
changes to:
When updating form objects and commands, note that the frontend now gives a signed id (String), which you need to be able to find the
ActiveStorage::Blob
object.📌 Related Issues
Testing
All file upload fields, for example:
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/
.📷 Screenshots