Page MenuHomePhabricator

Improve the way warning previews are generated
Open, Needs TriagePublic

Description

When editing a filter, if a warning message is set, it's possible to get a live preview of it by clicking "preview selected message". The given preview is pretty good, but still different from the actual result. For instance, on itwiki we use a template to build filter warnings, and the MediaWiki page shows a message like "This message is used in filter xxx" below the warning which won't be shown when the warning is triggered. It however appears when previewing the message. There are probably other differences, I think I found another one some time ago but I can't recall it.

Notes: the real message is generated here by just calling $this->msg(...)->parse(), while on the JS-side we do it here using APIs. What we may do is look for a JS method which could produce an output closer to PHP one, although I don't know any.

Event Timeline

Vvjjkkii renamed this task from Improve the way warning previews are generated to ewcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Daimona renamed this task from ewcaaaaaaa to Improve the way warning previews are generated.Jul 1 2018, 12:41 PM
Daimona raised the priority of this task from High to Needs Triage.
Daimona updated the task description. (Show Details)
Daimona added a subscriber: Aklapper.
Daimona changed the task status from Open to Stalled.Oct 21 2018, 11:25 AM

A good solution could be to replace the API query with a loadMessagesIfMissing, and then just call mw.message(xxx).parse(). However, it doesn't support many things (like templates), and the goal of this task is exactly to improve the message in presence of such things.

Daimona changed the task status from Stalled to Open.Dec 1 2019, 1:56 PM

@Daimona can I ask what is stalling this?

Honestly, I don't know :)