Hi all,
For the past week or so, the Multimedia team has been trying to plan a meeting about UploadWizard refactoring. It turns out we're all super busy, and anyway, a bunch of the community members probably have a bunch to say about what needs fixin' in the UW code base. So, without further ado, here are a few of the things I think we at least need to make sure we're touching on as we work on other issues, but ideally that we would work on in a sustained manner on some level:
* Refactor base functionality for transports and handlers into base classes because that's what object-oriented programming is for
* Fix code conventions, because ugh
* Fix jQuery use - it's currently pretty messy, and there are patches out to fix most things, but this could maybe be solved by a switch to OOUI (which is a separate email, and not from me)
* Make uploads the primary object, instead of an upload batch. This would mean decoupling the state of the upload list as a whole from the application progression logic, and it would allow us to do cool stuff like going backwards, filling in descriptions and licenses while uploads are still going, and many other cool things.
* Fix error handling. What all this means, I'm not sure, but there's a lot that can go wrong in the upload pipeline, and for the most part, we just straight up don't handle it. This is pretty frustrating to see, when users submit bugs like "api-stasherror-unknown"...
* Unit testing. This is hard, but once we start in on refactoring the classes to be more based on each other, it will get way easier. This can get started pretty soon on some of the more utility-oriented classes like the license inputs and the category inputs. Stuff like the main UploadWizardUpload class may have to wait until we tear out bits of it.
* Split things into different modules, maybe lazy load them. Meaning we don't need to load the description/details script files for the people who don't make it to that step for whatever reason. Not a huge improvement, but a mite better (IMO) than loading everything. Also opens us up to support other tools with our license chooser, our file description UI, and so on. (see e.g. the work already done on the PronunciationRecording extension)
This is obviously just a start, but I'd love to hear other things that need doing, and discussion on priorities. We'll come back to this list when we start to track and prioritize refactoring targets.
Cheers,
multimedia@lists.wikimedia.org