Last modified: 2014-05-19 07:37:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52182, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50182 - VisualEditor: Add support for making some templates directly "visually editable" in the DOM, as if they were tables (e.g. infoboxes)
VisualEditor: Add support for making some templates directly "visually editab...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
: 50595 51485 52786 (view as bug list)
Depends on: 50587 51374
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 15:56 UTC by Guillaume Paumier
Modified: 2014-05-19 07:37 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
screenshot of nested templates in VisualEditor (90.42 KB, image/png)
2013-06-25 15:56 UTC, Guillaume Paumier
Details

Description Guillaume Paumier 2013-06-25 15:56:27 UTC
Created attachment 12635 [details]
screenshot of nested templates in VisualEditor

Templates are sometimes nested into one another. For example, https://en.wikipedia.org/wiki/Template:Chembox relies on sub-templates like https://en.wikipedia.org/wiki/Template:Chembox_Properties , which itself relies on other templates etc.

VisualEditor currently doesn't seem to handle these sub-templates. It shows a nice interface for the top-level template, then shows wikitext for the others (see screenshot).
Comment 1 James Forrester 2013-06-26 02:08:17 UTC
These are currently supported, just as wikitext. :-)

It depends on some changes in Parsoid (which they've put on ice during deployment), and some tweaks in VisualEditor, but this should be relatively do-able.
Comment 2 Guillaume Paumier 2013-06-28 13:52:28 UTC
*** Bug 50355 has been marked as a duplicate of this bug. ***
Comment 3 pamdavies7 2013-07-02 15:45:56 UTC
This bug affects all attempts to edit items in lists which are set out in columns using {{tl|div col}} or {{tl|colbegin}}, so is going to disconcert a lot of editors. I hope it's near the top of the "to-do list":  see [[Wikipedia:VisualEditor/Feedback#Editing_within_a_multi-column_list_.28ie_between_.7B.7Bcolbegin.7D.7D_and_.7B.7Bcolend.7D.7D.29]]
Comment 4 Gabriel Wicke 2013-07-02 15:56:42 UTC
Something like <div class="mw-columns-2"> .. </div> with the proper class definition in common.css would work better for editing in VE, as the wrapper won't be template-generated then.

Generally visual editing works best if a template produces a self-contained part of a page ('properly nested') rather than cut-up start / content / end templates.
Comment 5 James Forrester 2013-07-02 18:29:35 UTC
*** Bug 50595 has been marked as a duplicate of this bug. ***
Comment 6 Brion Vibber 2013-07-02 18:32:19 UTC
Adding keywords to summary to make this searchable.

As noted in bug 50595, this bug prevents copy-pasting formatted text from the main document into a template.
Comment 7 kwwilliams 2013-07-05 20:02:08 UTC
I'm seeing a few comments that imply that nested templates are somehow the result of a poorly thought out design: I take issue with that. Take {{BillboardURLbyName}}, for example: it's got a very simple job: give it the name of a musical artist, and it will return the URL to the Billboard page for that artist's charts or biography. Billboard loves to redesign its site periodically and builds the URL based on six digit numbers, so we really don't want URL hardcoding going on. 

It would be a very poor design if we required every template that could accept a URL to understand how to translate an artist name into a URL. It's much better to do it the way we do: pass {{BillboardURLbyName|artist name}} as an argument to templates that require URLs, and let each template do its own job.
Comment 8 pamdavies7 2013-07-10 07:09:53 UTC
We also need to be able to add the template {{tl|multiple issues}} around existing tags: when editing [[Dadloi]] I wanted to add a second maintenance tag and then tidy them up into {{tl|mi}}, but of course had to do the latter in Edit Source after my VE edit.
Comment 9 James Forrester 2013-07-16 22:38:29 UTC
*** Bug 51485 has been marked as a duplicate of this bug. ***
Comment 10 Richard Morris 2013-07-19 20:50:53 UTC
This has come up a few times at 
http://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback#a_sensible_way_to_edit_.7B.7Bdiv_col.7D.7D_sections
http://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback#Bulleted_lists

In reply to Gabriel Wicke, substing {{subst:div col}} would give <div class="mw-columns-2"> .. </div>. This would work fine for all subsequent edits with VE, but not for editors using wikitext.

Ideally list in {{div col}} blocks would be edited in place. Just as if it was a normal list. 

I think this points to a wider question: that some templates are going to need special ways of editing them. You might be able to add a field to the template data, say, "type":"wikitext-block" indicating its a block which should be edited in place. Some sort of extension mechanism could be used, say with an associated  lua module providing hints to VE on how to edit the data.
Comment 11 Gabriel Wicke 2013-07-19 22:20:00 UTC
(In reply to comment #10)
> In reply to Gabriel Wicke, substing {{subst:div col}} would give <div
> class="mw-columns-2"> .. </div>. This would work fine for all subsequent
> edits
> with VE, but not for editors using wikitext.

I don't see a big difference between a div start / end tag and {{div col}} / {{div col end}} template pairs. Both are disconnected and of roughly the same text length.
Comment 12 James Forrester 2014-03-06 02:48:25 UTC
*** Bug 52786 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links