Use history.replaceState if available to get rid of the venotify query
parameter to avoid polluting URLs.
Ideally this would just use a cookie like the core post-edit
notification.
Change-Id: I6ce142012053e2fc18dd44fd0f7b82914acea076
Some older browsers may fail with >1024 arguments. This
does not have a noticeable effect on performance.
Change-Id: I8c85f43425997735bbbe08d27374b79502e02ecf
Get rid of the 504 Gateway Timeout handling while we're here, in preparation
for bug T135748 where that kind of thing will be made normal.
Change-Id: Ia4abb1a68ff7ab7ff365c7348bf4d2ad35c43a27
Converting a document we know contains just plain text paragraphs
is slower than it needs to be. The speeds up the conversion of
[[Barack Obama]] from ~2000ms to <100ms.
Change-Id: I2081858d835286b48db0627696a9eb5294317c2e
Aligning instances of `progressive` color to WCAG 2.0 level AA compliant
color palette similar to changes in
I6fdb90af8b9dc5e5e026eb0c1bd13138c73da4cd
Change-Id: I2eda190f0a68de6dc8aa33724f2c8975327a061f
transformPage() makes significant changes to the DOM, so measuring the
scroll position synchronously right after that results in a slow forced reflow.
Instead, measure the scroll position before reorganizing half the DOM.
Change-Id: I3baee5c11ca228696ddbfb30789745f5f0faa20a
These aren't in the Parsoid HTML spec., so there's no valid way that they would
be in the original document from upstream, and we don't—at least intentionally—
allow users to insert them, so we can safely assume that they're resulting from
browser extensions and other items inserting content into anything that sort-of
looks like an HTML page.
Bug: T144891
Change-Id: I330ae05cd53eee5c18b18ad744ea0ec7b2eb09cc
Instead of getting wikitext from the HTML, which is probably
slower and leads to issues with the whitespace stripping hack,
override getDocToSave and get text from the linmod directly.
Bug: T144621
Change-Id: I6b6cf16ee8f3720398ba8f5c85e7715c2e68329f
So we ensure we send the actual revision ID, not potentially undefined, to the
method. If we send undefined, it'll give us an etag for revision number 0...
And that will cause issues when we later attempt (in a future editor switch) to
pass an etag for revision 0 along with the correct revision.
Bug: T143920
Change-Id: I0c27956abdd26ae4f5f1b91010a5eab8ee0354ab
Perhaps in the future we could enhance this so that clicking a different edit
link queues that up for after the current activation finishes / aborts the
current activation cleanly.
Also, error-checking on setting an invalid progress state when loading.
Bug: T143160
Change-Id: I6c78cb19953df6fb564c06bac807e6897b63df19
To align with the linked patch in MediaWiki core. Taking advantage of
the opportunity to use core's messages for these, and remove some dead
wood old messages that were never used like "restore" items in mobile.
Bug: T139033
Depends-On: Ie81b5edd275963a965cd44d0fd325cae9ee2f1a6
Change-Id: Ie00e94cc77cb750a7e8d1104366bb3dad65af8a4
Pretty much fix everything on the insert menu... RB doesn't like it when you
try to specify both title and revision ID, but don't provide an ETag.
Change-Id: Ib25d023309d984ed8848f67b349b23231f27a957
Was previously written to work on initialise when the surface
isn't focused. If the surface is focused, run immediately.
Change-Id: Ie7accd63a4ca3e18448914d34609fe0418f15b4e
New changes:
e7cb202 Mark context wrappers as wrappers
20b75af Localisation updates from https://translatewiki.net.
a4dde9f Annotate pasted external text
8148301 Always preserve leading whitespace when converting for clipboard
82a35b7 TransactionProcessor: Apply annotations to ranges at the highest uniform offset
21fc1eb Restore previous selection when annotation inspector is dismissed
358181c Preserve prior valid DOM selections in showModelSelection
a0f7dba build: Bump various devDependencies to latest
0ae0f7e Follow-up Iabec6a6: Fix typo in mousemove selection update code
d69a4df Provide tools to make text bigger or smaller
Local changes for big/small tools
Change-Id: If418a1a47276cc1e1530c4a3ad6784136d8d14f8
Follows-up 843620632a in ConfirmEdit which now expects a specific class
on one of the image parent elements.
Without this the refresh link is broken as fancyCapatcha.js is
unable to find the image otherwise.
Change-Id: Iad7c8e8c77f58092ca4dbb5cbb3527cacff10f03
If you viewed a page with an ?oldid= query parameter set to the ID
of the current revision, some parts of VE would believe we were
in oldid mode (because there's an oldid present), but others
wouldn't (because the revid we're editing equals the newest revid).
This caused bugs when opening the editor a second time after saving
(which is normally impossible to do after an oldid-mode edit, because
we navigate to a new page after an oldid save, but we don't do that
in this case).
Ensure that:
* The internal state of DesktopArticleTarget is updated correctly
after saving in this case
* The ?oldid= parameter is removed from the URL after saving
* DesktopArticleTarget.init doesn't preload the article HTML
on a second/subsequent editor load: this causes issues because
it caches the oldid, and generally speaking the Target's internal
state is not considered
Bug: T141330
Change-Id: I74034328797c59f7249f1f6f4f53a92ee1c26334
Ideally we would get an exception when trying to load
a non-existent module, but there is no difference between
a genuinely missing modules, and one which just doesn't exist
on this target (e.g. a desktop-only module on mobile or vice-versa).
This stops mobile VE from crashing every time a desktop-only
module is added to VE plugins.
Change-Id: Ia9ac0dd21b26c54ad779c6f499e68786c34ec873
Fixing `z-index` issue of floating toolbar dialog not overlapping when
Special Character dialog is active.
Bug: T140237
Change-Id: I24e9ed5b1f65c6ea4cffbd408953623540542bca
When our remember-last preference changes work, alongside changing the
label of the edit tab, also change the label of the edit section links.
I seriously have no idea WTF I was thinking back in December when I
put some of this code into #activatePageTarget.
Bug: T137424
Change-Id: I581c0acf0a3ad11ad3bcf4e2e46242907ca9166f
If you deactivate without saving (e.g. using the back button), the page
contents aren't replaced and so adding the page click handlers is pointless
and harmful because they will run twice.
This was my fault in Iad1713e1
Bug: T135387
Change-Id: I3c83009bfc0f42125cdcde7f7a51de9bc2f72abf
So if the user supplies a summary in VE, WTE with the "Prompt me when entering
a blank edit summary" preference won't moan.
Bug: T135979
Change-Id: I0e2d2b6f8fb03bb56d600f1118daf82fb3715b66
In case we were switching to source.
Normally MWWikitextSwitchConfirmDialog#getActionProcess would do this for us,
but this closeWindow call doesn't trigger that, we can't get it by overriding
MWWikitextSwitchConfirmDialog#close either.
Bug: T134333
Change-Id: I66a12ff6d13601250b9d470e1be54fe38a1ef06c
Instead of going straight to ArticleTarget's one.
This causes ve.init.mw.DesktopArticleTarget.prototype.serializeFail
to be called when using that target.
Bug: T134333
Change-Id: I6ec259830178439bc80ea162ba4ad035226022a7