Page MenuHomePhabricator

Make removeUpload and removeMatchingUploads etc. into UploadWizardUpload and UploadWizardUploadList, respectively
Closed, ResolvedPublic

Description

Shouldn't be too difficult, also put the UI stuff from removeUpload into the UWUI class.

Details

Reference
fl465

Event Timeline

flimport raised the priority of this task from to Normal.
flimport set Reference to fl465.
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:41 PM
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:41 PM
MarkTraceur lowered the priority of this task from Normal to Low.
matmarex renamed this task from Make removeUpload and removeEmptyUploads into UploadWizardUpload and UploadWizardUploadList, respectively to Make removeUpload and removeMatchingUploads etc. into UploadWizardUpload and UploadWizardUploadList, respectively.Mar 16 2016, 2:34 AM
matmarex set Security to None.

removeMatchingUploads/removeErrorUploads has already been moved, to uw.controller.Step.js (in https://gerrit.wikimedia.org/r/#/c/318020/)
removeUpload was moved from uw.controller.Upload.js to uw.controller.Step.js (in https://gerrit.wikimedia.org/r/#/c/322277/)

UploadWizardUploadList has been abandoned and everything to do with this.uploads (add, remove, ...) has now been moved to uw.controller.Step.js.
It didn't seem to make much sense to move removeUpload to mw.UploadWizardUpload.js anymore, since all of the real action now happens in the controllers:

  • if an upload is removed, it needs to be removed from this.uploads, which is in the controllers
  • it needs to be removed from upload queue, which are in the controllers
  • copy metadata feature may need to be repositioned (in the controller)
  • if all of them are gone, controller needs to move on to the next step
  • etc.

Removing an upload only really affects the upload object itself in that it needs to detach some interface element.
The controller's removeUpload will reach out to the upload object to make sure that happens, but UploadWizardUpload shouldn't be the one orchestrating this.

Once https://gerrit.wikimedia.org/r/#/c/322277/ is merged, I believe we can close this. The troubling parts have been refactored, even though the approach ended up being different.

Change 322277 had a related patch set uploaded (by Matthias Mullie):
Cleanup upload handling

https://gerrit.wikimedia.org/r/322277

matmarex closed this task as Resolved.Dec 7 2016, 3:26 PM

Change 322277 merged by jenkins-bot:
Cleanup upload handling

https://gerrit.wikimedia.org/r/322277