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
Collapsible relates to the Vector menu behaviour where an item
is moved into the dropdown menu if the window is narrow.
This should only apply to the secondary tab when there are two tabs.
If there is only one tab (non-VE, e.g. in a non-VE namespace) then
this tab should not be collapsible.
Server-side code handled this correctly, but client-side was
adding the class unconditionally.
Change-Id: Iecd195e92f43fe9f11b3938a1a24caed7b331e5f
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
* Rename the actions toolbar the 'pageToolbar', and place the save button in
its actions section.
* Inject the title amongst the pageToolbar tools, so we can have tools either
side of it.
* Don't use the hamburger icon, as this has a (different) expected behaviour
in MF. Replace it with a back button, and move the edit switch action over
to the right in an 'advanced' group.
The toolbar is back to being laid out like the source editing toolbar in MF.
Change-Id: I4e00a8cdf603968ee32872323c88e587c1e1a487
New changes:
61d20a1 Hide on-screen keyboard when selecting nodes on all mobile platforms
e5aff79 Localisation updates from https://translatewiki.net.
a99a897 Update OOjs UI to v0.12.3
3c01a14 Make DM nodes sensibly hashable
a611eb9 Make ve.dm.example.postprocessAnnotations fluent
496c895 Update ve.dm.ElementLinearData#hasContent documentation
fcaa035 Support RegExp sequences; trigger sequence matcher after newline
edda1d4 Add a mechanism to wait until ve.init.platform has been created
e174155 Autolink URLs when typing
ac9248f Allow drag and drop of links (and subsequent autolinking)
c88fad6 Localisation updates from https://translatewiki.net.
Local changes:
* Define `ve.init.platform.getUnanchoredExternalLinkUrlProtocolsRegexp`.
* Make `ve.ui.MWLinkAction` extend `ve.ui.LinkAction`.
* Override `ve.ui.LinkAction.getLinkAnnotation` so auto-links use the proper
`ve.ui.MWExternalLinkAnnotation` type.
Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
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
Loading [[en:Sweden]] in VisualEditor requires making 24 API requests for
pageimages / pageprops info, all of which contain the following unnecessary
bloat:
{"warnings":{"main":{"*":"Unrecognized parameter: 'gpslimit'"},
"query":{"*":"Formatting of continuation data has changed. To
receive raw query-continue data, use the 'rawcontinue' parameter.
To silence this warning, pass an empty string for 'continue' in the
initial query."}}
That's 276 bytes * 24 requests = 6,624 bytes we could shave without losing
anything at all.
Change-Id: I0e88ebdc47c4d304b71c3c34fde24f82f5abadfc
Popup tool requires special attention to make it work
and keep the tool list left aligned.
Bug: T92027
Change-Id: I77a0dcbba382dce1669a30d48471b0c501c3d851
New changes:
2464397 Move toolbar floating code up to the target
11bdc21 Separate SA target into Mobile and Desktop
7ab3389 AlignableContextItem: Fix styling in mobile
758619f CONTRIBUTING.md: Update file paths and build instructions
Local changes to mw.Target to handle toolbar floating.
Change-Id: I0751817e3a6668b120134bfcb6c611b121a46501
Also use named classes for hiding toolbars, and move the
MobileFrontend overlay z-index hack out to that repo.
Depends on Ia46e6b4d7a in MobileFrontend.
Change-Id: I0e1f527446fd10fde5dd3107e6467fd2c8f621b2
Split the toolbar into two modes depending on if the surface is focused:
* When unfocused, show a hamburger containing back and source switch
* When focused, show editing tools, and a check button to unfocus
For the editing toolbar, space the tools out using table-cell layout
and hide labels below 480px.
Depends on I06813e3ff in core (surface blur method).
Bug: T93325
Change-Id: Ibf09cb29019d7a71e1e144b326710b1f6506cd0c
* 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
.set() should not overwrite existing deferreds; instead,
it should resolve the existing deferred if it's pending.
This is necessary because .set() is used by processResult().
Without this, passing .get() a title that no information
is known for results in a promise that is never resolved,
because the associated deferred is overwritten as soon
as the API response arrives.
Still make .set() a no-op if data has already been set,
by checking if the deferred is pending. For .resolve() this
doesn't matter, but for modifying this.cacheValues it does.
Bug: T107212
Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509
Usage:
In a skin, that needs this offset, e.g. because it has a fixed header, it should add
this config var somewhere before the hook BeforeOutputPage is called:
$wgVisualEditorSkinToolbarScrollOffset['vector'] = 60;
(if 60px is the offset to use)
Depends on: I2e10c12df8277c84d948e48c6a132c03d6324693
Bug: T95528
Change-Id: Iaa86c2f68afa6403fcc4f5b7c655704512beead4
No retry right now, but we should at least stop failing silently. Doing this
in a window.alert() for now, as OOUI isn't available at this part of the
page load just yet (that will be coming soon).
Bug: T97041
Change-Id: Iacb195667215ee69d3991e4c41651ab6042243c5
This data is used for marking links red, but links which are known
but don't exist (e.g. interwikis) are not red.
Also fix bug in API caused by trying to return a value of (bool)true which is
apparently not allowed. Use (number)1 instead.
Bug: T104604
Change-Id: I599a513a27b31f7167e688d73bc3685141249971
Core code now has a scrollIntoView animation triggered on focus
which needs to be cancelled before we scroll to the section heading.
Change-Id: I5eb6a5c98b38c2510d2d7f0108fe56e607b34bd6
This reverts commit cb11cbd2f5.
Actually not needed after 3d36cac7fc4808f708f03b66f5c099de440e4569
in OOjs UI, and would change the UI in unexpected way.
Bug: T103403
Change-Id: Ia30b168ea29d03aa76ad81d1f9894a67604fdc08
This module is required in order to alienate all extension blocks
by default. Otherwise they are interpreted as plain divs which
allow content editable.
Bug: T103455
Change-Id: I08f6b9a516ba6bee6ed18256222108116eceee1e
When loading VE by clicking Edit on a view url, this naturally
works (we temporarily append our query, and remove it when ready).
When loading VE from a permalink (e.g. Open in new tab) or any
other source linked from HTML pages, then we're not in control
over adding the query (it's already there); we're only in control
over restoring the view url afterwards.
Bug: T102363
Change-Id: I4912ff1c6b28ac987517760ffed481a4cd3bd1ca
Once MW images are registered, we should remove core image support so
we don't accidentally match to them (e.g. an MW inline image with an
unsupported extra RDFa type).
Change-Id: I1c8567346c371fe338f95b232c9ac53e009c5a46