Make enwiki's Template:Gallery redundant by implementing all its features in wikitext
Open, LowestPublic

Description

Template:Gallery provides a small amount of extra functionality to the gallery extension which we could add in to core. If we are going to provide a nice editing interface in VE we need to eliminate these wrapper templates.

Esanders created this task.Apr 9 2015, 9:13 AM
Esanders updated the task description. (Show Details)
Esanders raised the priority of this task from to Needs Triage.
Esanders added projects: Multimedia, VisualEditor.
Esanders added a subscriber: Esanders.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 9 2015, 9:13 AM

Can you lay out what advantages there are?

Jdforrester-WMF renamed this task from Make Template:Gallery redundant to Make enwiki's Template:Gallery redundant by implementing all its features in wikitext.Apr 9 2015, 11:16 AM
Jdforrester-WMF set Security to None.
Jdforrester-WMF triaged this task as Normal priority.
TTO added a subscriber: TTO.EditedApr 9 2015, 1:15 PM

I should point out that it's not a wrapper, it's a completely different implementation using tables.

I should also point out that there are a number of people on enwiki who refuse to see templates replaced or deleted if they have even the slightest additional functionality compared to the proposed replacement. These people make good template work very frustrating, but you should be aware of their presence. You'll probably find some choice examples of what I mean over at WP:TFD.

Having said that, the template looks somewhat simplistic, so it shouldn't be too difficult a task.

@Jdforrester-WMF Anything created with this template will only ever be editable using the plain template parameter editor in VE, as opposed to any future rich gallery editing experience we might build.

TheDJ added a subscriber: TheDJ.May 7 2015, 10:38 AM

I would start with collecting all the actual usages of templates like this. Just list which template params are actually being used, and then identify 'uncommon' usages, which are probably the only ones that would break, if you would just replace with gallery.

Note that this template is actually quite old, it predates things like alt support and height sizing of images. These were probably the most common reasons for using this template initially, and those are the use cases that can simply be substituted with <gallery>. It's the 'remainder' that might be a problem and that you need to get a grip on/understanding off.

Also remember that tags, don't have documentation for wikicode editors, like templates do. That is in my experience actually one of the primary reasons (after 'familiar' syntax, less scary than <htmltags>) that people use templates like these.

TheDJ added a comment.May 7 2015, 10:40 AM

Idea of the moment, list used parser tags/magic words, in a separate edit screen section like we do for templates. Give each of them links to the documentation page of the tag/magic word.

Should probably get it's own phab ticket.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:24 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 4 2015, 6:24 PM
Alsee added a subscriber: Alsee.Nov 8 2015, 2:20 AM

This approach is hopeless and counterproductive. The whole point of templates is that the community constantly revises them and constantly creates new ones for new functionality. The moment you expand and complexify core wikitext to make some templates "unneeded", the community will just wrap that new wikitext in new templates.

The only result is futile redundancy and complexification added to core wikitext.

I disagree. Basic image usage doesn't use templates in 99% of cases, so we should be able to do the same with galleries.

TTO added a comment.Nov 8 2015, 4:23 AM

Hmm...

  • The enwiki Template:Gallery (now Module:Gallery) has barely changed in the past couple of years; the few changes in that time apparently being bugfixes or appearance tweaks. This suggests that it is not being "constantly revised".
  • Community-developed templates are often poorly coded, mainly because they are built up over time by a myriad of individual editors which different skill sets. Great case in point: Template:Gallery is coded using nested tables, which is a seriously antiquated way to code something like this. (MediaWiki <gallery> uses <div> tags and CSS.) Leading me onto my next point...
  • I haven't tried it, but most likely, Template:Gallery will look markedly inferior to <gallery> tags on mobile devices. Most on-wiki templates are created without regard to how they will appear on mobile, because local users tend to focus on their own experience and not that of the broad reading community.
  • By incorporating the features of Module:Gallery into the core MediaWiki software, the functionality will be available for use on all wikis, not just enwiki. Isn't that a win for the broader wiki-editing community?
  • Custom, complex, wiki-specific templates like Template:Gallery are never going to have the same visual editing experiences that can be provided for built-in features like <gallery>. (Note, <gallery> doesn't yet have a proper VE editor, but I imagine that is on the way. The important thing is, it is possible to build such a thing.)

the community will just wrap that new wikitext in new templates

As I said above, this is not a wrapper, but a complete reimplementation. If it was a wrapper, it wouldn't actually be so bad (although not without its problems).

Let me be clear here, Template:Gallery was created at a time when MediaWiki's built-in gallery functionality was poor or non-existent. So there was a good reason for its creators to go about creating it as an on-wiki template. Emphasis on was though.

Alsee added a comment.EditedNov 8 2015, 8:18 AM

Maybe "wrap" was a poor choice of word? I meant... if Gallery accepts different parameters, someone will make a {{TallGallery}} to simplify and centralize using some particular parameter set.... someone will make a template with a built-in section heading.... someone will make a template that adds the page to a hidden category.... someone will make a template that renders differently in different namespaces... I'm just tossing out random possibilities. Just for comparison, I recently started using a striking and useful alternate template for <references />. It happens to involve adding the page to a hidden category, it has to detect if the page-render is an edit-preview render or a normal pageview, and the core function is to render completely differently in the two view modes. Templates are flexible powerful tools for building unexpected new functionality. It's a mistake to be opposed to the community building unexpected powerful new stuff.

If you are improving the functionality of Gallery, and you don't care if it ends up inside a template, swell. If the goal is just to make a particular template go away, then you are setting yourself up as "failing" every time the community uses our toolkit to do something new and different and better.

The problem is not edge cases (like {{Double image}}), but that we have a template set up to do what the extension should already be doing. There should not be a template for normal usage that doesn't require one.

Deskana lowered the priority of this task from Normal to Lowest.Aug 30 2018, 1:25 PM