Reject the activating deferred making handleLoadFailure
redundant.
Fix logic for switching back to OWE aware of NWE.
Change-Id: I328fc944bb6b9152752742fe35c56b95e3255b88
Otherwise if the target was already loaded the mode will
not be changed, which can cause the wrong editor to load
in multi edit tab mode.
Change-Id: I64071dfdfc8511cce51bda20b9c62d7fc126c528
We should avoid using alert()s as much as possible due to their unhealthy
interaction patterns with any other open tabs or user tasks.
Change-Id: Ib6a217c988322ad17bc7e649c3281eb053b54bbc
Gives us extra functionality like checking for
isUnmodifiedLeftClick which makes CTRL+click on SET
not change the current page, as expected.
Change-Id: Icb37d7383374ee63798443659a2bcb2f1545c8c5
* ext.visualEditor.mwwikitext does not have mobile target
* We call mw.libs.ve.setEditorPreference from ArticleTarget
Change-Id: Ifae6e951155c83b13f3111732b0dc500349b1df2
Just use the normal section parameter, haven't been able to figure out why VE
would need to be special about that.
Bug: T149958
Change-Id: I9338d0f1498fbb579fa8c340d6e7274c6d48155b
This prevents the discard warning from being shown if the user
switches back to NWE then back to VE, as by this point they
have left section editing.
Change-Id: I734684c54a8900aab3332ed8421cb42f7f845738
New changes:
e4c8003 Bring in target 'mode' property from MW
Local changes:
Use upstream Target#setMode functionality
Depends-On: I9d501cb77c714fbd299b5816d302b0bdde7833cd
Change-Id: I2fcda6ca7d82d880101d9ba2a027d4ef066aa238
Transform rules mess up the z-index context, so this
puts the toolbar dropdowns back in front of the content.
Change-Id: I7ba2cf295c83c55e5b1eead3a04760ea53390d37
NWE can return data in 'visualeditoredit' instead of
'visualeditor'. We may want to change this later.
Also restore removed hack code that popuplates missing
VE API data when requesting wikitext.
Change-Id: I9a782a85444d37a3e21c071db7e175ee9b0b1c4f
These require POST, especially paction=serializeforcachekey because
it calls ApiStashEdit::parseAndStash() which needs a master DB connection.
Move them to the edit module so we can require POST for that one and keep
allowing GET for the main module. This fixes the warnings we currently get
for using parseAndStash() in a module that does not require POST.
Change-Id: I64a8ed7305105fa4c46902b99984306a7ff468cc
New changes:
abf8f41 Replace Array#concat with Array#push in converter
02aeb90 Localisation updates from https://translatewiki.net.
902ddda Use safer batchPush in converter
6368191 Use current surface's sequence registry in command help dialog
f7ce4b9 Optimize batchPush on small lists
fb43a0a ve.batchPush: add unit test to exercise long-array path
d6c7d24 Factor out RESTBase ID regular expression
ffcbf4b IndentationCommand: Use hasMatchingAncestor
d447023 Allow ommission of range from ve.dm.Document cloneFromRange
cfbc344 Don't strip empty paragraphs on paste if they are generated
01c918b Localisation updates from https://translatewiki.net.
1467947 Fix documentation of getMetadataIdRegExp
Local changes:
* Define RESTBase ID pattern in platform and fix slightly
* Bring in paste test from core, which requires platform switching.
Bug: T147607
Depends-On: Ifc1c15872a50f915e5ef8d561b3a363dc5f4d28f
Change-Id: I3eb21e115de92a67afa85b5675fcbca5b111adb6
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
* Ensure ve-loading isn't removed early
* Quickly detach then reattach the loading bar during
activation so it doesn't get moved and marked as original content
Change-Id: I263c9627348953a11966f8bcc435d0d89b0b6084
T52720 (link corruption in FF13/14) appears to be fixed.
T52780 (editor not loading in FF11/12) appears to be fixed.
FF11 has a new issue where templates are normalised even
when not touched (T136607)
Change-Id: I34358e3d90b8186e6b89c04c038ab79c908fc81b
New changes:
4a5aa37 Clean up debug bar buttons
15f016c Undo sequence input stripping if window is dismissed
e874734 Localisation updates from https://translatewiki.net.
8db33b4 Follow-up e874734: Fix build for added languages 'gom-latn' and 'gor'
79c5d51 build: Update stylelint config version and make it pass
3804f5e build: Remove grunt-cli
cea7b63 Update OOjs UI to v0.17.3
9f648f4 [BREAKING CHANGE] Always get registries/factories via surface
1252814 Add cloneWithData() utility
5ccdef3 [BREAKING CHANGE] Fix debug bar encapsulation
Local changes:
* Fix debug bar encapsulation
Change-Id: I2c5d722278c5f71b59ee2f8849d9babb5aff6af2
Define $editableContent on target construction, and mark
all non-ancestor nodes between that at the target container
as uneditable (50% opacity, no pointer events).
Bug: T58289
Change-Id: I7fe51104bd5aa1bd53ffc604e5f02752c7553578
New changes:
c54a48a build: Fix watch list (csslint -> stylelint)
58ba3d9 Add stylelint rules for @-rules
3f8c75a Stylelint: Add rule for unsupported browser features
3b96ff3 Fix minimum Opera version (15 -> 12)
9a1110b Stylelint: No ID selectors
9800bb8 build: Remove remaining references to csslint
b6ab14a stylelint: Re-enable features by names
6cc1f3c Move stylelint to npm
1d15fa0 build: Bump stylelint version to v0.2.0
ccc1724 stylelint: Use the preset rather than extending
Change-Id: I22fa8098592338a5e912aba9ad21131b21d9c0ea
For now just use the rules file in lib/ve, but eventually
this will be a preset.
Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Depends-On: I17e0d23ddfedf64985495ab35d113ea08c03b1df
Now that we always generate mw link types in the converter,
blacklist mwExternal links, not plain links (which won't exist).
Change-Id: I2ab9fbb9ec50c2e36e8a870d48b6aa06c7e69f8c
The SupportCheck method asserts that the method is available so use it
instead of the confusingly named jQuery version.
Change-Id: I2105384cc4f6f2ec1cdb24a7bf3b0f4cce7672d3
New changes:
c48d7cc Add support for placing a toolbar dialog in the side margin
ee7e14b FindAndReplaceDialog#renderFragments: Protect against null surface
fc61463 Fix dm.Surface#getHistory to not return undone items
f1dff2f Introduce ve.Range#overlapsRange method
f608958 Introduce dm.Surface#getModifiedRanges
db114ed Move debugging data-url GIFs to a debug only file
1dd8194 Update RangeFix to 0.2.0
706ff4e Add 'Support: [browser]' to browser hack comments
4f52afc Inline slugs: Limit Firefox hack to versions <38
bf73326 Add classList polyfill for IE9
59d78aa Fix access of iframe-created document in IE9
a886ae1 Hide borders on linked images in IE9
5293974 Fix double-click to edit table cells in IE9
a49a02f Add some more Support: comments
Depends-On: I9c5cea3e8df1fae001d4d98c0782a04dec803776
Change-Id: I460368f509a213464e57bb95f2d726305ef608de
You can still open VE with prefer-wt mode by going to veaction=edit, and
T116406 proposes making it accessible with a keyboard shortcut as well.
Change-Id: Ifc25b5147a96a200ac3a7de465d5cdf67e2e255b
transitionend events seem like a neater solution, but we should
migrate all of our code at once, and provide a polyfill for
browsers which don't support it (IE9).
Change-Id: If6ae030856f8e69cc8bb26f21bfed30d5d22775c
On the client: getLastEditor in ve.init.mw.DesktopArticleTarget.init.js
On the server: VisualEditorHooks::getUserEditor in VisualEditorHooks.php
Change-Id: I9cc0f367aee2dda43cffc6918bfb042ac8ae3bb2
Place things like the page title and redirect link inside a new
container $originalContent, which is appended to the surface
when ready. Replace margins with padding in various places.
This will allow us to surface-height-matching sidebar for dialogs.
Change-Id: I60d80fb303bdaf93e9d121f62d534ee3a3056e59
veswitched and wteswitched together cannot result in any sane behaviour.
To reproduce:
* Open VE (while having multi-tab pref?), switch into WTE
* Make a change
* Switch into VE
Change-Id: I90e19169e3fab60ab876c8e4d349801309db262f
How did this ever work?
Ensure action is passed through and not just undefined, wait for change to go
through before refreshing.
Bug: T131818
Change-Id: I83b5695906044299d338e62e6c980c596d291765