•  
     
    story #22576 have multiple files uploaded with comments
Summary
Empty
have multiple files uploaded with comments
Empty

Follow-up of story #22705

The comment section of a test execution evolves to support:

  • ability to paste several images directly in the text area
  • drag'n drop one or more files from test executor environment inside web browser
  • classical "attach files" button to pick files on filesystem (again, several files can be attached this way)

Attachments can also be deleted afterward.

Technical concerns

  • Is upload managed by TUS ? => It is indeed managed by TUS client (via @tuleap/ckeditor-image-upload)
  • Comment cannot be saved (or test passed/failed) until all file uploads have been completed (buttons are disabled).
  • Update of the test execution is broadcast to realtime clients either at "Save comment" or "change of test status". There is no realtime message after upload of an individual file.

It will probably be too much of a challenge to "share" a TUS uploader between a regular file input, the test execution's drop zone and the CKEditor drop & copy/paste. At writing time, the @tuleap/ckeditor-image-upload lib is tailored specifically to CKEditor only. Maybe it's best to have two distinct uploaders: re-implement a TUS uploader (it's less than 200 lines) tailored for the test execution's drop zone and the file input and just plug into callbacks for the CKEditor library, but otherwise leave @tuleap/ckeditor-image-upload untouched.

Assuming that attachments are only saved in the test execution when hitting "Save comment" or changing the test's status, clicking on the "basket icon" next to a file will only actually delete a file at that time (it will be "marked to be deleted" until then). We will need to pass a list of "file IDs" to the hypothetical REST route to "Save a comment". The backend will need to diff with the previous changeset and the passed list and it will delete the attachments that have been removed in the new list.

The mockup shows a "progress bar" for file upload, which means we need to listen to "start", "progress" and "success" callbacks from the TUS uploaders.

Empty
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#22576
Manuel Vacelet (vaceletm)
2021-10-13 14:37
2021-07-27 14:57
3738

References
Referencing story #22576

Git commit

tuleap/tuleap/stable

feat(ttm): Add an "Attach files" button 36a57036a9
feat(ttm): upload comment attachments using [Attach files...] button 21e98d16eb
feat(ttm): display progress of attachments uploads a09b576fa1
feat(ttm): Ability to abort uploads bda2e38b17
feat(ttm): Remove attachment files from an execution 28f376c9b2
feat(ttm): Handle upload errors a7a4c2c19b
feat(ttm): Disable controls during the file upload 7957edf012
feat(ttm): display file creation error in a modal 10928c8ba2
feat(ttm): upload files with unknown MIME types 0a3bc04060
feat(ttm): Handle empty files d98bbcd3bf
feat(ttm): Forbid files with uploaded twice in the same comment 7137706942
feat(ttm): Take account of attachment field permissions 53ee61ca7b
feat(ttm): Have an attachment drop zone 7a4a23854c
feat(ttm): Upload dropped files 2f196d413f
Fix design stuff c0b102e7fd

Follow-ups

User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
Joris MASSON (jmasson)2021-07-28 11:12
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes