Community Wishlist Survey 2023/Editing/Nested templates in Visual Editor

Nested templates in Visual Editor

  • Problem: In Visual Editor, a template within another template cannot be edited properly. Not only does the user get wikitext (which should not happen in Visual Editor), but it is also confined to a tiny field in the template editor window. Whenever the main part of a template has to be inside another template for technical reasons, this makes the template editor and TemplateData for that template useless.
  • Proposed solution: Nested templates should be detected and every single template should be editable using the template editor of Visual Editor.
  • Who would benefit: Users of Visual Editor.
  • More comments: I remember first discussing this at Wikimania 2017. Unfortunately, there seems to have been little progress on the matter.
  • Phabricator tickets: phab:T52355 (at least part of it)
  • Proposer: XanonymusX (talk) 22:34, 23 January 2023 (UTC)[reply]

Discussion

  • Thanks for the wish, we would need to inquire how feasible this is for us as a team, I doubt it can be done in a quarter, but we could still move it to larger suggestions and track interest in terms of votes. I see lots of interest already in the phab ticket linked. Thoughts, User:ESanders (WMF)? KSiebert (WMF) (talk) 18:06, 25 January 2023 (UTC)[reply]
    It certainly is very complex, and to be done properly would require changes to Parsoid to have the template parameters supplied as HTML. There may hackier approaches that sidestep this (I haven't thought about this problem in details for a while) but it would still be reasonably complex. ESanders (WMF) (talk) 18:33, 25 January 2023 (UTC)[reply]
  • It's easier said than done, as the hardest thing is to figure out how to do this. One possible way is to use VS editor on template parameters. Thingofme (talk) 03:55, 28 January 2023 (UTC)[reply]
    Yeah, there have always been lots of ideas around this topic, but no idea has ever been seriously pursued, as far as I can tell. It is a bit frustrating that at this point in time (almost five years after the conversation I had at Wikimania 2017), on large pages like de:Elvis Presley/Diskografie Visual Editor is still basically useless and causes more harm than good. I was also repeatedly asking the Technical Wishes team at WMDE to work on this while they were improving the template editor, but it seemed too complex to them too.
    Personally I clearly prefer nested templates to templates with unbalanced wikitext, but at this point the latter seems to be much better for the editing experience. I hope the solution won’t be to change all nested templates to multi-part templates.
    Without having too much insight into the technical basis here, the most obvious solution to me seems to imitate the behaviour of the reference editor in VE. If I choose for adding/editing a reference manually in VE, I get a full wikitext editor with the option of adding a template, which will then open the template editor in a new window. If this works for references, why not for templates? And there can of course be a reasonable limit to nesting (even a maximum of 2 would already make things much better). I am happy to work closely with the team on this, but unfortunately I cannot do the development myself. XanonymusX (talk) 13:40, 29 January 2023 (UTC)[reply]

Voting