https://bugzilla.wikimedia.org/show_bug.cgi?id=56213

--- Comment #1 from Alex Monk <[email protected]> ---
I started looking at this. It's annoying because the code to do the wikitext
detection is already there and working for the main surface. It would be
trivial to do the absolutely wrong way (i.e. copy the existing code to the
reference surface or image caption surface and just change the reference to the
Surface object), but it's a pain to fix the proper way.

One of the problems lies in the differences between normal surfaces (i.e. the
main one) and surface widgets. It was suggested that we could implement
MWSurfaceWidget which does the wikitext warning, but the main surface is not a
widget and would still need it's own version of the code.

Also, we can't just shove the wikitext detection code in the ve.ui.Surface
class and guard it with some config, because the Surface code lives in VE core
which does not deal with MediaWiki features (wikitext) - the VE MediaWiki
extension deals with that.

Roan suggested we could make the main surface be a surface widget and then
create an MWSurfaceWidget, but that apparently has issues involving toolbar
floating (I'm not familiar with this, perhaps it could be fixed in some way).

I think that for now, we can probably change the wikitext detection function to
accept a surface parameter, then make it static somewhere and have each
wikitext-free surface to set up an event handler for it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to