We need to support <gallery> tags with something nicer than a tiny inspector for editing wikitext.
Description
Details
- Reference
- bz43037
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Make dialog for editing galleries | mediawiki/extensions/VisualEditor | master | +909 -97 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Tchanders | T13500 Rearranging the order of image (link)s in galleries via drag and drop (AJAXy) | |||
Resolved | Esanders | T110641 GalleryInspector: Selector for gallery mode (normal/etc.) | |||
Resolved | Tchanders | T45037 Support rich editing of galleries in the visual editor | |||
Duplicate | None | T74865 VisualEditor: References inside galleries being displayed separately, inside the gallery, instead of in the correct <references /> block at the end of the page |
Event Timeline
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:
- I could actually edit the wikitext directly. This is good, but not if the functionality is not ready.
- 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.
- 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.
- The changes appeared instantly in the gallery. That was nice!
- 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>
I can see it has a low priority, but if you want to edit gallery you still have to know wikicode!
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
This was great, thank you @Pginer-WMF; follow-up tasks as follows:
- T137286: Provide a full rich-text editing and options setting for <gallery>s in the visual editor (where I moved the Parsoid dependency)
- T137204: Implement multiple selection in the MediaSearchWidget for multi-media file insertion and for selection for galleries
- T62398: Show a user's recent uploads in the MW insert media dialog (MediaSearchWidget)
- T64799: VisualEditor: Warn/stop users from inserting wikitext/bad inputs in the Gallery inspector
- T137206: Suggest gallery images from other language Wikipedias
- T137207: Allow users to move images from directly in articles into galleries
- T137209: Re-order images in the gallery dialog with keyboard shortcuts
- T137210: Transform pasted gallery wikitext into a gallery (which I've declined)