Page MenuHomePhabricator

WikiEditor: Select "thumbnail" as default format for images
Closed, ResolvedPublic

Description

Since for a normal image one always should use thumb to scale it, I suggest to preselected "thumb" in the format dropdown and to append it in non-dialog mode. If you need some statistics: 59 % of all images in the German Wikipedia (not counting images on discussion and user pages) use "thumb" or an equivalent parameter (that's a fact) and among the other images there are many where "thumb" is just missing because the editor didn't know of it (that's my opinion).


Version: unspecified
Severity: major

Details

Reference
bz38827

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:11 AM
bzimport added a project: WikiEditor.
bzimport set Reference to bz38827.

See patch: gerrit change 20654

(sorry for joining late). IMO, it will be best if the defaults can be set per-project, overriding those hardcoded in the code itself.

as to implementation: Personally, i would prefer setting the defaults through variables in common.js, rather than LocalSettings.php, so sysops can change it when community decides (this would also allow, possibly, for users to set different defaults for themselves, though it is not clear how valuable this is).

peace.

ldorfman wrote:

Please make the change Kipod wrote about usable as soon as possible.

kipod, thumb is used almost always, in most languages and most projects so I don't see any real need for supporting configuration for changing it other than thumb.

Supporting such configurations aren't common in JS, and isn't needed as you may always hack the toolbar with something like:
$('textarea').bind('wikiEditor-dialogs-loaded-insert-file',function(e){
//setting default for insert dialog (get by id the needed element and set it's properties)
});
In such a way you can always set default for any field.

(In reply to comment #4)

kipod, thumb is used almost always, in most languages and most projects so I
don't see any real need for supporting configuration for changing it other than
thumb.

Supporting such configurations aren't common in JS, and isn't needed as you may
always hack the toolbar with something like:
$('textarea').bind('wikiEditor-dialogs-loaded-insert-file',function(e){

//setting default for insert dialog (get by id the needed element and set

it's properties)
});
In such a way you can always set default for any field.

Thanks for the override code snippet.
My comment was meant not just for the "thumb" selection, but for all defaults. e.g., some wikis may want to define specific size as default, while others may not (Same goes for alignment).
Also, please remember that as part of media wiki code, this goes not just to wikimedia-foundation wikis, but to any other wiki using the media wiki code.

peace.