Page MenuHomePhabricator
Paste P1870

logs from #wikimedia-multimedia relevant to T40030
ActivePublic

Authored by Prtksxna on Aug 12 2015, 8:30 AM.
Tags
None
Referenced Files
F1364550: logs from #wikimedia-multimedia relevant to T40030
Aug 12 2015, 8:30 AM
Subscribers
None
prtksxna: MatmaRex: How do I write a plugin for VE? Couldn't find any docs on mw, but I didn't try to hard…
MatmaRex: hm
MatmaRex: prtksxna: this doesn't seem to actually be documented, heh. there is documentation on writing plugins as gadgets (https://www.mediawiki.org/wiki/VisualEditor_gadgets). to write them as MW extensions, it looks like you ne\
ed to register your RL module in $wgVisualEditorPluginModules. examples are in Citoid and SyntaxHighlight_GeSHi
MatmaRex: prtksxna: hmm, but don't we actually want to do this in VisualEditor proper?
prtksxna: Hmmm
MatmaRex: as i understand it:
MatmaRex: * we have mw.Upload.Dialog in core, that provides a barebones interface suitable for small third-party wikis without weird licensing requirements
prtksxna: I am still confused about where files go and where the user thinks they go — commons vs local wiki
MatmaRex: * we will have an extended upload dialog in UploadWizard, that puts in the million boxes required for commons
MatmaRex: * we will have some integration in VisualEditor, that will use UploadWizard's or core's upload dialog.
MatmaRex: hmm.
prtksxna: And marktraceur pointed out that the user sometimes would want to explicitly upload to the local wiki due to some licensing stuff I don't understand.
MatmaRex: yeah, true. i hadn't considered that
MatmaRex: so… i guess we need to make sure that mw.Upload works for cross-wiki uploads, and add a selector to mw.Upload.Dialog to let the user choose whether to upload locally, or to foreign repo, if any is confugred
MatmaRex: i'm not sure if we can do this magically. there is $wgForeignFileRepos…
MatmaRex: and the entries can have a 'apibase' property… so maybe
prtksxna: How often do users make that choice? Is it a power user thing? Can we hide this complexity from the others? Maybe James_F|Away knows.
MatmaRex: prtksxna: afaik for Wikimedia there are two cases, first is users who think Commons people are generally not nice and want nothing to do with them, and second is users who want to upload copyrighted fair-use media to the\
few Wikipedias that allow them (including en.wp)
MatmaRex: largely things like movie posters, logos, book covers
MatmaRex: it should probably default to Commons. i'm not sure how visible the option should be.
prtksxna: So in the license picker we should be asking them if this is copyrighted fair-use media and silently switching them over to local wiki (if allowed).
MatmaRex: hmm. that sounds neat
prtksxna: s/./?
MatmaRex: yeah, that actually sounds like a good idea to me, but we should check iwth marktraceur in case that's not possible for some bizzarre reason
MatmaRex: we just need to come up with a sane way to separate this between core, VisualEditor and UploadWizard
prtksxna: I think we'll move to the UW dialog next
prtksxna: The VE plugin will in some cases skip the first, and last step. The file might get dropped anywhere and call the dialog, and once the save is complete we can switch back to VE instead of showing the stupid usage panel.
marktraceur: MatmaRex, prtksxna: OK, let's see if I can clarify what I have in my head and if it makes any sense to you guys
marktraceur: MatmaRex, prtksxna: My current priority is to get a tool into VisualEditor, and secondarily WikiEditor, that uploads a file from enwiki to Commons, with a default license choice, and sends the user to WP:FUW or COM:UW if\
someone doesn't like it.
marktraceur: MatmaRex, prtksxna: I believe we can add licensing choices or whatever else (local vs. remote choice) in later iterations, I don't think they're necessary for the base case we're trying to address
marktraceur: MatmaRex, prtksxna: I think the Commons-specific mw.Upload and mw.Upload.Dialog subclasses will go into CommonsMetadata, because I dislike the idea that UploadWizard is Commons-specific, and I even more hate the idea of \
then loading it outside of Commons
marktraceur: MatmaRex, prtksxna: Those classes will add fields and getters/setters for descriptions (the model will have support for multilingual, I'm not sure we ever came to a decision about that in the UI), licenses (in text form,\
it has no clue about them though), categories, date, locations, and so on
marktraceur: Basically "mw.CommonsUpload" is a euphemism for "{{information}}-enabled upload model class"
marktraceur: As well as hard-coding the mw.Api URL to commons.wikimedia.org
marktraceur: I haven't yet tried to subclass mw.Upload.Dialog to add fields. That somewhat concerns me but I'll go do that now I think
marktraceur: prtksxna, MatmaRex: Also I definitely think that the upload dialog can go into VE-mediawiki at the end
marktraceur: Maybe we could make that more palatable by putting CommonsUpload into core, and not calling it CommonsUpload but MediaRepoUpload or something
MatmaRex: hmm.
MatmaRex: marktraceur: there is some precedent for hardcoding Commons in core, like $wgUseInstantCommons, so i think it could go in core. from the technical side, the only difference between uploading to Commons and any other fore\
ign repo is just the API URL, right?
MatmaRex: marktraceur: we might want to separate these concepts. a local upload vs foreign upload, and a simple form vs {{information}}-enabled form.
MatmaRex: i haven't tried to subclass mw.Upload.Dialog either, but it looked well-engineered for subclassing. you override some render*() and get*() methods, and presto.
marktraceur: Urgh. InstantCommons.
MatmaRex: marktraceur: soo… we just put everything in core, and say "foreign file repository" when we really mean "Commons"? ;)
marktraceur: Something like that
marktraceur: It's what we've always done!
MatmaRex: i think it's sensible
MatmaRex: more than splitting the code over four places
marktraceur: MatmaRex: "foreign file repository" almost universally means Commons, anyway
marktraceur: At least in the context of the things that we're writing
marktraceur: MatmaRex: I'll explore the code again with an eye towards refactoring, maybe we can get the dialog merged today at least
MatmaRex: mw.Upload.Dialog? i just merged it. :P
marktraceur: Oh.
marktraceur: Well shit!
marktraceur: Exciting times

Event Timeline

Prtksxna changed the title of this paste from untitled to logs from #wikimedia-multimedia relevant to T40030.
Prtksxna updated the paste's language from autodetect to text.