Page MenuHomePhabricator

Support rich editing of galleries in the visual editor
Closed, ResolvedPublic40 Estimated Story Points

Description

We need to support <gallery> tags with something nicer than a tiny inspector for editing wikitext.

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:09 AM
bzimport set Reference to bz43037.

*** Bug 43038 has been marked as a duplicate of this bug. ***

I think this should block the Plugin editors tracking bug. Apologies if it doesn't count as a pluging.

<< I know there's a lot of new gallery functionality coming in (which looks amazing!), so I'd understand if support is waiting for that, but at the moment, galleries are completely uneditable.
Basic functionality I'd expect might include:
Dragging images to different parts of the gallery, preferably by a simple click and drag.
Adding and removing images
Caption editing/addition/removal.
If moving images is as easy as dragging them into position, adding images can probably reasonably add to the end. To allow the gallery itself to be moved, I'd suggest that clicking on the gallery adds a bar at the top (only while it remains the focus, of course), labelled something like "click and drag here to move gallery". (If that's unclear, I could make a mockup), plus a dropdown box for any other actions that might be needed, sort of like the top of a Windows, well, window. One thing VE currently doesn't do enough of is temporarily tweaking the display of an element being edited to make it easier to interact with for editing, but I don't see a way to get the intuitive editing you're looking for without some movement towards that. Adam Cuerden (talk) 22:40, 13 August 2013 (UTC) >>

fwiw today I edited a gallery for the first time and the result was really bad:

  1. I could actually edit the wikitext directly. This is good, but not if the functionality is not ready.
  1. I got a tiny window to modify wikitext. Lines of galleries might be long when they include captions, so a bigger window would be nicer.
  1. After editing I couldn't Save directly. I had to deduce that the [back] "<" icon had to be clicked first. Mmmm ok, I guessed it. Fine with me, but I'm not sure about your average editor.
  1. The changes appeared instantly in the gallery. That was nice!
  1. Save and...

All the gallery converted in a div and injected as such. MediaWiki probably not knowing what to do with this? Result: gallery not visible anymore. Undo changes.

See https://www.mediawiki.org/w/index.php?title=Wikimedia_Platform_Engineering&diff=771922&oldid=764070

Note that galleries also have multiple types since https://gerrit.wikimedia.org/r/67885 was merged - it would be awesome to have the types be editable :)

</my-two-cents>

Gallery formatting, such as centering it, should also be included in this.

I can see it has a low priority, but if you want to edit gallery you still have to know wikicode!

Jdforrester-WMF set the point value for this task to 40.
Jdforrester-WMF added a subscriber: Tchanders.

In order to get a better understanding on what "gallery support" means, I created a quick analysis and explored some design ideas at https://etherpad.wikimedia.org/p/T45037

Change 275931 had a related patch set uploaded (by Tchanders):
WIP Make dialog for editing galleries

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

Jdforrester-WMF renamed this task from VisualEditor: Support galleries to Support rich editing of galleries in the visual editor.Jun 8 2016, 10:37 AM
Jdforrester-WMF closed this task as Resolved.
Jdforrester-WMF edited projects, added User-notice; removed Patch-For-Review.
Jdforrester-WMF updated the task description. (Show Details)

Change 275931 merged by jenkins-bot:
Make dialog for editing galleries

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