Page MenuHomePhabricator
Paste P546

UploadWizard widgets notes
ActivePublic

Authored by MarkTraceur on Apr 22 2015, 8:47 PM.
Widgets needed for UploadWizard that we should create:
LanguageSelectWidget - SelectWidget pre-loaded with languages (in MediaWiki namespace so we can use language support from there)
Exists in VE-core already (see "Language" in the text styling menu for the wider control); we could dupe into MW?
Perfect! Yes. We should.
MultiInputWidget - InputWidget that has a control for adding a new copy of the base widget, so you can have multiple values
So a tokenised input where inputs are validated and accepted into <div>s or rejected?
Inputs don't need to be validated until the rest of the form is (I guess it could be on keyup or whatever, but isn't currently, I think it's blur)
Just add a new field for each press of the button - then the value of the MultiInputWidget would be an array of the values of each input.
Hmm. Should be easy-ish, but not sure it's a good UX model.
What would be better? "Add description" --> modal dialog, added to the form read-only with an edit button?
DatePickerWidget - Pick a date (use UploadWizard's existing library maybe?)
Don't have this yet in VE/etc. – might need some thinking about configurability, but first user's needs are likely to trump. :-)
CategoryPickerWidget - This already exists? Use in UW and remove old library?
Exists in VE-MW but will need to be turned into a model-based item. Is the UW "old library" comparable / worth keeping / worth stealing from?
It's...like...coolCats. Probably not.
LicensePickerWidget - Probably a StackLayout pre-populated with license choices (own work, others' work, pick separate licenses on next page)
ComboSearchBox?
Ooh, sexy. But we need to give people instructions at each step - "did you create this photo?" "are you OK with releasing the work to the public, if you're attributed?" "do you want derivative works to be licensed the same way?" etc.... it's a pain in the ass and imperfect in its current state.
CopyTextWidget - Read-only text input with copy-to-clipboard button (there's a new shiny API for that I think?) - useful for MMV also
Just use a TextInputWidget in readonly mode
It would be nice to add the "select all on focus" and "copy button" features to this widget, we had a time and a half doing that in MMV.
You can't write to the clipboard using JS, can you? Or is it just that you can't read? (Flash widgets abound for this precise use case, see e.g. in gerrit, GitHub, etc.) But sure. Maybe CopyableTextOutputWidget? ;-)
http://www.w3.org/TR/clipboard-apis/#writing-contents-to-the-clipboard I guess it's still a working draft, sigh, and it's not very helpful
Flash widgets may be a non-starter...
Oh, completely, they're disgusting scum. It's just the normal way people get around the lack of support. It may be impossible to do in a FLOSS-compliant way for broad support. :-(
FilenameInputWidget - TextInputWidget that does validation (for invalid characters) and checks for existence on blur (keyup would be too heavy API use without debounce...debounce maybe)
We have in VE-MW a widget called MWTitleInput which does the former and does debounced look-ahead API queries to encourage people to re-use existence; we could expand its use case to discourage instead.
Sounds fine, yeah
ImageDisplayWidget - (maybe new) ImageWidget to display thumbnail, DialogWidget to display full image on click.
What else?
I think this may be it...it'll certainly get us farther than I have time to do for now.
Image display widget for previewing the upload?
Ooh, sure. That would be...is there an ImageWidget or something? If not, that, plus an attached DialogWidget. Or at least that's what it would need to be for the current implementation.

Event Timeline

MarkTraceur changed the title of this paste from untitled to UploadWizard widgets notes.
MarkTraceur updated the paste's language from autodetect to autodetect.
MarkTraceur added projects: UploadWizard, OOUI.