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
ReferenceSource BranchDest BranchAuthorTitle
repos/releng/cli!102lens0021-dirty-checkmainlens0021CI: Add check for dirty git state & fix dirty state
repos/releng/dev-images!6paymentsHttpmainejeggUpdate fr payments image to listen on non-SSL port too
repos/releng/cli!44hack-around-composer-checkmainaddshoreCorrectly check composer before install
repos/releng/cli!43better-dev-ls-handelingmainaddshoreIf a user ctrl+cs during install, always move LS.php back
Customize query in GitLab

Event Timeline

flimport raised the priority of this task from to Medium.Sep 12 2014, 1:42 AM
flimport set Reference to fl465.
MarkTraceur lowered the priority of this task from Medium to Low.Dec 3 2015, 8:03 PM
MarkTraceur added a project: Technical-Debt.
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

Change 322277 merged by jenkins-bot:
Cleanup upload handling

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