Move over logic which isn't specific to the article
implementation of VE (e.g. nothing related to loading/saving).
Refactors setupSurface to use an abstract tracking method (which
does nothing by default), and moves surface CSS classes to #createSurface.
Breaking change:
* Rename onSurfaceReady to surfaceReady. We shouldn't need to listen
to our own events.
* Rename onReady to documentReady. onReady is not a listener.
Bug: T97166
Change-Id: I7242b1bb5501b7755a18a13d13e166c30cac9cdd
This makes way for a base mw.Target class which is
not specific to articles (e.g. Flow boards).
Bug: T97166
Change-Id: If72650bdf87aa9f195b004da0a4d815f1a8063a3
In addition to the couple of TODOs inline, we should do the following in
follow-up commits:
* Prevent FOUC due to changing things only on the client
* Make section link behaviour sensible
Bug: T58337
Change-Id: I65d966270491ffe017cb11a0daa915628fadf65c
VE already has a a switch icon in the options menu, so bring that
up to the main toolbar.
Append an OOUI button to the WikiEditor toolbar if present, and bind
to the same functon as the edit tab.
Bug: T49779
Change-Id: Ic1e83ea7b13c4fef68024bf05ffc244060666103
Mobile target, for example, has events logged in the MobileFrontend extension instead
(which covers both the wikitext editor there and the VE integration)
Bug: T110272
Bug: T109525
Change-Id: I521f1825dc9c0a135db54cd005cda723908f14bc
Drop beta-ness as users don't care and it confuses them. Leaving the preference
alone for now.
Bug: T99963
Bug: T112354
Change-Id: I0e039dec54d528fce24226e76b931b593dd13a9e
Right now .initialize() doesn't do anything other than enable
the window resize handler for toggling the "narrow" styling,
but as a matter of principle we should call .initialize()
on toolbars after attaching them.
Change-Id: I419c943d1d20af2105b84b8f5fbccc7070af601b
* Remove page.length
* Add action.abort.type = switchnochange
Needs to be deployed at the same time as Ib99700ac
Bug: T111420
Change-Id: I7ee245157d4de6c220d7cdf54cd1dd69ff836f15
Anything with type=checkbox is coverted, and its label is found,
either by for=id or by finding a wrapping label.
All other inputs are stored in $otherFields for form building.
Bug: T86617
Bug: T70572
Change-Id: I94376fef18d02d2058bb548c11ae17f3dec7268c
We were setting the edit summary box to the contents of the 'summary' parameter
every time the save dialog opened, but actually we only want to pay attention
to that the first time the save dialog opens.
Bug: T108329
Change-Id: Ic7b456ca8d7dd7cef8bc27629e3655ce9b97e755
* On save, VE will now fetch and append modules and jsconfigvars to the save
event, which respectively contains necessary JS config module data and the
list of required modules to be added on the page.
* The jsconfigvars are now properly added to mw.config on edit save.
* If any new modules are now required by the page after an edit, they will be
loaded by ResourceLoader through mw.loader.load.
Change-Id: Ib3990078a22ad9e46debf3ce174e7cf27b86d944
When you bind to your own events you're probably using the wrong
design pattern.
The events are kept (without arguments) for the purpose of tracking.
Change-Id: I6983319f9e0ca179e609afb00c821e3eab2161c9
Allows us to rename onSaveEvent back to onSave.
Before this change,
* ve.init.mw.Target.prototype.save ->
* ve.init.mw.Target.prototype.onSave, emit save event ->
* ve.init.mw.DesktopArticleTarget.prototype.onSaveEvent (or MF equivalent)
With this change,
* ve.init.mw.Target.prototype.save ->
* ve.init.mw.Target.prototype.saveSuccess, emit save event ->
* ve.init.mw.DesktopArticleTarget.prototype.onSave (or MF equivalent)
Change-Id: I016262b38a941c93c0978391491baa6d5a32fe28
* Make save a FragmentDialog and open with WindowActions so
the selection is restored automatically.
* Pass in some information in setup data.
Change-Id: I254b71f252adce064b9c2d2bf2cb6c8d0018e31f
MW target has 'static' methods, some of which aren't attached
to the static property, the rest of which should be instance methods.
Rename success/fail functions to remove 'on' as that is reserved for
actual event listeners.
Change-Id: I63e68dbe1923906208b180abfc4a9a280b4d098e
* Use local edit source tool, and emit event to MF
* Bring in toolbar styles, bonus: remove old desktop style hacks
Bug: T96186
Change-Id: I89351e409aa4e9d626edd7151ae05bdcd58f1cee
New changes:
11953f7 Localisation updates from https://translatewiki.net.
0dbafb0 Update OOjs UI to v0.12.2
cbd0982 Replace placeholder color with opacity
087365c Support other types of 'empty' document placeholders
7692890 Make scrollIntoView a VE utility function
5a1a159 Localisation updates from https://translatewiki.net.
8edf71e [BREAKING CHANGE] Kill ve.indexOf and thus @until
bb02b02 build: Bump various devDependencies to latest
cb5b2cd Fix scrollIntoView util binding
8feab4e [BREAKING CHANGE] Use config object for Target constructors
Local changes:
* Use config object for Target constructors
Bonus:
* Add CSS classes to MW targets
* Use 'super' calls
Change-Id: Ieb4e4eb3663aab2706c0f3ecc8b82e00555df1d5
* Bring in back button & save button from MobileFrontend
so they are properly styled OOUI widgets
* Accordingly, move toolbar save button code up into base
MW target.
Bug: T96186
Change-Id: Ic89dd4efb831fc3b09980da16524276f6568619d