"Preview page with this template" is available in the regular wikitext editor in the Template namespace, but not available in the new wikitext editor.
Description
Details
Related Objects
- Mentioned In
- T330275: TemplateSandbox should parse page previews with the preview setting
rETSAc2c7150ab54a: Add title and categories to 2017 wikitext editor preview
T282287: Wikitext unparsed in TemplateSandbox text box label of the 2017 wikitext editor
rETSA01ae5ca19c61: Support page preview in the 2017 wikitext editor
T154159: Parsoid-based preview is not compatible with Extension:TemplateSandbox - Mentioned Here
- T153579: Mysterious warnings in WikitextEditor
Event Timeline
(I've accidentally linked to this task in a few unrelated revisions - if you're here from no.wikipedia.org please see T153579 instead)
This was also reported by @geraki at https://www.mediawiki.org/wiki/Topic:Tht3r0lic3wqzko6
This is the API call we'll need to use:
{ "action": "parse", "page": "Page being previewed", "templatesandboxtitle": "Template:Template being edited", "templatesandboxtext": "New wikitext of template being edited" }
Is anything happening here? I have made a lot of unnecessary template edits already because of the lack of a preview function. If it is not introduced, I guess template pages should either use the CodeEditor or the old wikitext mode per default , otherwise template editing will never properly work.
Change 570984 had a related patch set uploaded (by BrandonXLF; owner: BrandonXLF):
[mediawiki/extensions/TemplateSandbox@master] Support page preview in the 2017 wikitext editor
Change 570984 merged by jenkins-bot:
[mediawiki/extensions/TemplateSandbox@master] Support page preview in the 2017 wikitext editor
More styles should be added to improve the appearance, and wikipage.content hook should be fired.
IMHO, parser output should be wrapped with mw-body and mw-body-content class to import appearance, and by saying "and wikipage.content hook should be fired" I mean if this hook isn't fired, some gadgets like Reference Tooltips won't function.
UPD: I think the TitleInputWidget should also set $overlay: true so the suggestion area would be wider.
Categories should also be visible in the preview because someone may want to test correct categorization using a template.
Removing task assignee due to inactivity, as this open task has been assigned for more than two years. See the email sent to the task assignee on February 06th 2022 (and T295729).
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.
Change 885049 had a related patch set uploaded (by BrandonXLF; author: BrandonXLF):
[mediawiki/extensions/TemplateSandbox@master] Add title and categories to 2017 wikitext editor preview
Change 885049 had a related patch set uploaded (by BrandonXLF; author: BrandonXLF):
[mediawiki/extensions/TemplateSandbox@master] Add title and categories to 2017 wikitext editor preview
Change 885049 merged by jenkins-bot:
[mediawiki/extensions/TemplateSandbox@master] Add title and categories to 2017 wikitext editor preview
I think this has been fixed by the patches back in 2021 (T153367#7051026)? I don't see why it hasn't been closed then. Anyway, thanks (belatedly) for working on this!
I just noticed that this was implemented without setting the preview mode for the parse call. I'll create a separate ticket for that.