Shouldn't be too difficult, also put the UI stuff from removeUpload into the UWUI class.
|mediawiki/extensions/UploadWizard||master||+193 -144||Cleanup upload handling|
|Reference||Source Branch||Dest Branch||Author||Title|
|repos/releng/cli!102||lens0021-dirty-check||main||lens0021||CI: Add check for dirty git state & fix dirty state|
|repos/releng/dev-images!6||paymentsHttp||main||ejegg||Update fr payments image to listen on non-SSL port too|
|repos/releng/cli!44||hack-around-composer-check||main||addshore||Correctly check composer before install|
|repos/releng/cli!43||better-dev-ls-handeling||main||addshore||If a user ctrl+cs during install, always move LS.php back|
|Open||None||T96906 Refactor UploadWizard to be maintainable|
|Resolved||matthiasmullie||T291 Make removeUpload and removeMatchingUploads etc. into UploadWizardUpload and UploadWizardUploadList, respectively|
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
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
Change 322277 merged by jenkins-bot:
Cleanup upload handling