Page MenuHomePhabricator

Convert instances of the social tools miniAjaxUpload to use the OOUI SelectFileWidget and OOUI MediaSearchWidget
Open, Needs TriagePublic

Description

https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.SelectFileWidget

It uses the HTML5 File API, which is one of it's fallbacks since it's still only somewhat supported across browsers, but maybe eventually this could be converted. see http://caniuse.com/#feat=fileapi
It also requires JS.

SelectFileWidgets allow for selecting files, using the HTML5 File API. These widgets can be configured with icons and indicators. Please see the OOjs UI documentation on MediaWiki for more information and examples.

There's also the OOUI upload dialog (MediaSearchWidget):

https://doc.wikimedia.org/oojs-ui/master/demos/

Event Timeline

SamanthaNguyen moved this task from Unsorted to Migrate / Replace on the Technical-Debt board.
SamanthaNguyen moved this task from Unsorted to Conversion to OOUI on the UI-Standardization board.
SamanthaNguyen moved this task from Incoming to Stalled/More Info Needed on the Design board.
SamanthaNguyen moved this task from Backlog to Feedback on the PictureGame board.
SamanthaNguyen moved this task from Backlog to Feedback on the PollNY board.
SamanthaNguyen moved this task from Backlog to Feedback on the QuizGame board.Jan 22 2017, 10:51 PM

So VisualEditor allows for selecting existing files from not only local files but as well as Wikimedia Commons by opening a drop down menu (forgot which one) and then clicking on media. If it's possible in VE, could we possibly implement the same feature in the social tool extensions that allow uploading? I believe we should do away by completely rewriting and replacing MiniAjaxUpload.

@ashley: thoughts on this? Do you know anyone who's familiar with VE's infrastructure who would be able to provide insight on how selecting the files feature work?

I believe we should do away by completely rewriting and replacing MiniAjaxUpload.

YES PLEASE! I hate MiniAjaxUpload with a burning passion and have hated it ever since I had to rewrite it in 2013. Also, well, it is pretty crappy and limited (feature-wise).

@ashley: thoughts on this? Do you know anyone who's familiar with VE's infrastructure who would be able to provide insight on how selecting the files feature work?

Replacing MiniAjaxUpload probably won't be easy, but if we could build something that's better and more flexible, it'd definitely be worth it. Right now the workflow in all extensions which (re)implement MiniAjaxUpload is pretty ugly and has the potential to lead into lots and lots of "randomly" named images (MiniAjaxUpload usually prefixes the file name with the output of time(), which is something like 1487187439 or so), some of which can be duplicates of pre-existing wiki images, not to mention the obvious flaws: no support for the upload-by-URL feature or for picking an existing image.

All that being said, I don't know who specifically could help out with this.

SamanthaNguyen renamed this task from Convert instances of the social tools miniAjaxUpload to use the OOUI selectFileWidget or OOUI upload dialog to Convert instances of the social tools miniAjaxUpload to use the OOUI SelectFileWidget and OOUI MediaSearchWidget.Mar 4 2017, 2:32 AM
SamanthaNguyen added a project: JavaScript.
SamanthaNguyen updated the task description. (Show Details)