Page MenuHomePhabricator

Support "Preview page with this template" (TemplateSandbox) in the new wikitext editor
Open, LowPublic8 Estimated Story Points

Assigned To
Authored By
Amire80
Dec 15 2016, 10:06 PM
Tokens
"Like" token, awarded by Lens0021."Like" token, awarded by EpicPupper."Pterodactyl" token, awarded by matmarex."Like" token, awarded by Daylen."Love" token, awarded by matej_suchanek."Yellow Medal" token, awarded by SerDIDG."Burninate" token, awarded by stjn.

Description

"Preview page with this template" is available in the regular wikitext editor in the Template namespace, but not available in the new wikitext editor.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
AlexMonk-WMF renamed this task from Support "Preview page with this template" in the new wikitext editor to Support "Preview page with this template" (TemplateSandbox) in the new wikitext editor.Dec 15 2016, 11:40 PM

(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 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"
}
Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

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

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

Change 570984 merged by jenkins-bot:

[mediawiki/extensions/TemplateSandbox@master] Support page preview in the 2017 wikitext editor

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

More styles should be added to improve the appearance, and wikipage.content hook should be fired.

More styles should be added to improve the appearance, and wikipage.content hook should be fired.

What's wrong with the appearance that needs improvement?

More styles should be added to improve the appearance, and wikipage.content hook should be fired.

What's wrong with the appearance that needs improvement?

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.

You can use $overlay: this.$overlay within a dialog.

Categories should also be visible in the preview because someone may want to test correct categorization using a template.