Page MenuHomePhabricator

MWGalleryDialog assumes wiki's default mode is traditional but this can be configured otherwise
Closed, ResolvedPublic1 Story Points

Description

There's a proposal right now to change it to 'packed' on enwiki, for instance…

We just need to fetch the wiki's default mode and use that instead of hardcoding mode === 'traditional'.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 7 2016, 5:48 PM
Esanders assigned this task to Tchanders.Jul 8 2016, 4:06 PM

In PHP this would be in the GalleryOptions config option: $context->getConfig()->get( 'GalleryOptions' )[ 'mode' ].

That config also contains the default values for width, height and images per row. We could pass those through to JS as well and use them as placeholder values in the form.

Change 303103 had a related patch set uploaded (by Tchanders):
Fetch default options for gallery dialog

https://gerrit.wikimedia.org/r/303103

Change 303103 merged by jenkins-bot:
Fetch default options for gallery dialog

https://gerrit.wikimedia.org/r/303103