Ed Sanders
74f6c4899c
build: Update eslint-config-wikimedia to 0.10.0
...
Change-Id: I63a0ebf0b31a0d5d4e680a4e2a5a0be4850be165
2019-01-08 17:00:09 +00:00
James D. Forrester
3c293ea00c
doc: Bump copyright year for 2019
...
Change-Id: I8991b97c980d4149f53eb5601036220ef3c0c440
2019-01-01 13:24:23 +00:00
Ed Sanders
0d54a62858
Use mw.Title.wantSignaturesNamespace
...
Change-Id: I60187f0a3eb9cf5d56a4fdaa3401b107758bd8e3
Depends-On: Ib2faa22c429096d545ddb829a6b4025427ad6071
2018-11-27 18:42:44 +00:00
Ed Sanders
1a3e8a958c
build: Use eslint-config-wikimedia v0.9.0 and make pass
...
Change-Id: Idb57fc12e7822cf17e10dbb726480fc7de0ae199
2018-11-21 16:51:20 +00:00
jenkins-bot
542004dcb9
Merge "Require Parsoid HTML 2.0.0, and handle its <audio> tags"
2018-10-02 20:47:59 +00:00
Ed Sanders
d5d23ee4be
Require Parsoid HTML 2.0.0, and handle its <audio> tags
...
Bug: T201081
Depends-On: I6514b9b0a85588c7eaae5e6989789656cfc3253a
Change-Id: I6052dcf3e414d9506ff7ec7a6b5d8f4eeb4a703a
2018-10-02 12:15:45 -07:00
Ed Sanders
253e7e6c59
Update comment
...
Change-Id: Ie6b2b3512fb9e31014040c3cd0f9c75d7330ccbe
2018-09-24 12:41:58 +01:00
Ed Sanders
bb1d7271cd
Pass content language in Accept-Language header to RESTBase
...
Bug: T198186
Change-Id: I2176f68f76fa462de0c1c2c47365de62fda4abe0
2018-06-26 16:42:35 +01:00
C. Scott Ananian
83918e735a
Follow-up I213bd946f: Correct URL of Parsoid HTML profile
...
The URL for the HTML profile used by Parsoid changed after 1.2.x, but
it was never updated in VE.
Change-Id: Id4ab8567dc907b71e790a04ab10044c1e081c8ce
2018-06-22 10:27:00 -07:00
C. Scott Ananian
a13b8ae178
Update VE to request Parsoid HTML v1.7.0
...
The seasons change, and so do Parsoid HTML specifications...
Change-Id: I213bd946f6f1547f76a4ea352c7cb083ebadd602
2018-06-21 16:41:02 -04:00
Ed Sanders
f5d1f6c595
Make options actually optional as documented
...
Change-Id: I42bb8e594a9ea8002938e68109d11488aef8883c
2018-05-20 12:53:19 +02:00
Ed Sanders
a58b529104
Autosave recovery prompt
...
Prompts the user before recovering if the document
has been edited since last load.
Bug: T190077
Change-Id: Ibc0e1d1342510fbca57ad599c1816918c84e5487
2018-03-21 16:23:35 -07:00
jenkins-bot
8727ecd181
Merge "Do not use deprecated jquery.byteLength"
2018-02-27 22:10:23 +00:00
Bartosz Dziewoński
974ea82c50
Do not use deprecated jquery.byteLength
...
Change-Id: If3f921d60563bd614c269d1d26b745161f8cfc7b
2018-02-27 22:35:29 +01:00
Ed Sanders
c670ce76ee
autosave: Use upstream methods in ve.dm.Surface
...
Change-Id: I150b21d7767153d8457b5da658bb8b51b5464aa9
Depends-On: I859b57aef9d591597956f3d942dd2cf1b0aecee0
2018-02-27 20:54:59 +00:00
Ed Sanders
76caef6b4b
Use session storage to auto-save
...
Ensure we start with the same HTML (i.e. if an edit has
been made since the crash-recovery):
* Whenever an article target is activated, stash the initial
document html, other parsoid response data, and the request
parameters (pageName, mode, section) in session storage.
* Whenever an article is fetched through the target loader,
recover from session storage if the request parameters match.
Store transactions:
* On document transaction (debounced) append the latest
changes to session storage.
* If a document state is recovered from session storage,
attempt to re-apply the stored transactions.
Clear transactions:
* Whenever the target is torn down (i.e. save, deliberately
closing the editor to go back to read mode)
Other:
* If writing to session storage fails once, disable future
attempts for that session (assume storage quota exceeded)
* Disable tempWikitextEditor when recovering. We don't have
the transaction code loaded yet to perform the recovery.
Bug: T57370
Depends-On: I3832243fc347a99641fcb7e39a887a153c9a3b22
Depends-On: I448fb566fe9f7f5b5a76e88b70ca000e3d35b415
Change-Id: Id9d877f903cf4796a52f90991c030417a9f8786f
2018-02-27 12:19:06 +00:00
James D. Forrester
0a7a845a42
doc: Bump copyright year
...
Change-Id: I0b299c840ede1a1b8552cecfc70c5760ab036181
2018-01-03 17:45:07 +00:00
C. Scott Ananian
d2d6d23522
Bump Parsoid HTML version to 1.6.0
...
It's a brave new world.
https://www.mediawiki.org/w/index.php?title=Parsoid/Deployments&oldid=2644817#Tuesday,_Dec._12,_2017_around_11:45_am_PT:_Y_Deployed_741fc5d
Change-Id: Ib22dc5370cd01bf5becdd639cc12d6a5ccc653a3
2017-12-13 00:10:16 +00:00
Ed Sanders
8f612fbe64
Pass editor mode (visual/source) to tracking code
...
Change-Id: Iba5d3c66ecbd2872d76ea12f795ef3bebaae9d81
2017-12-07 11:14:00 +00:00
Ed Sanders
58a226288b
requestParsoidData: Support 'wikitext' param in RESTBase-less environment
...
Change-Id: I6154376be090655d3249ad7e74a0e90b39208a82
2017-10-11 21:26:18 +01:00
David Lynch
ea274c94cd
Enable preload in VisualEditor
...
This allows the use of the preload and preloadparams query parameters. They
should behave as they do in the old editor, loading substituted content in
visual and source modes.
Bug: T51622
Change-Id: I522fb5b480d17912f6d6116be6aa043ead855b52
2017-09-15 17:17:51 -05:00
Ed Sanders
682787f312
Change ArticleTargetLoader#requestPageData API to use options object
...
Change-Id: I02e6218a8359b1cbc8fed1a34d68206a2a154d46
2017-09-13 12:57:37 +01:00
Ed Sanders
ddf6a89c72
Remove #wpTextbox1 fallback from ArticleTargetLoader#requestPageData
...
Makes the API clearer and the method re-usable.
Change-Id: If79afb262e0c8c8e2193c07fef6bb0712496a4d9
2017-04-09 22:28:03 +01:00
David Lynch
c5bb912e80
ArticleTargetLoader: wikitext switch shouldn't require FullRestbaseURL
...
The non-FullRestbaseURL branch didn't handle converting the provided wikitext,
causing data loss when switching from source to visual modes.
Bug: T158692
Change-Id: I283afc4be1e322228d6ec572bfa8542ba8fd9ce7
2017-03-09 11:30:16 -06:00
Ed Sanders
a3433e67fd
Move modules loaded from DAT.init/TargetLoader to ResourceLoader
...
This will make it easier for third parties to load the required
modules for an article-like target.
Also cleanup mobileArticleTarget to better match desktopArticleTarget.
Change-Id: Idb75e2bd99d8cf2c298e101cf92e8af4f85f5ad5
2017-02-27 16:48:56 +00:00
Alex Monk
1bcaa9056c
Fix loadFail parameter handling
...
Rename them while we're at it.
Bug: T151278
Bug: T152429
Change-Id: I435ac148007db87da69e8cf48568fafa646abb71
2017-01-04 22:31:08 +00:00
jenkins-bot
2b913fb10c
Merge "Add editintro to notices"
2017-01-03 20:19:06 +00:00
jenkins-bot
f182d5d223
Merge "When switching check wikitext is a non string, not just empty"
2017-01-03 18:57:48 +00:00
James D. Forrester
122f49b2dd
build: Bump file copyright notices for 2017
...
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
Ed Sanders
4628e9e68c
When switching check wikitext is a non string, not just empty
...
Also add documentation.
Bug: T154437
Change-Id: Icacc0ad522d3e7fa28ecea9876c2c0465c4eb8e6
2017-01-02 18:40:07 +00:00
Ed Sanders
58071f59f1
Add editintro to notices
...
Bug: T56029
Bug: T51622
Change-Id: Ib43cc66b817ff394b4f1c82fcba4503df825819c
2016-12-31 23:23:17 +00:00
Ed Sanders
5a8106773c
Support section=new in NWE
...
Bug: T150709
Change-Id: I1002b97060d642df0988da15860a36c13712bade
2016-12-13 12:20:55 +00:00
Alex Monk
81e32c6a4b
Hacks to get VE loading on mobile while user has NWE enabled
...
* ext.visualEditor.mwwikitext does not have mobile target
* We call mw.libs.ve.setEditorPreference from ArticleTarget
Change-Id: Ifae6e951155c83b13f3111732b0dc500349b1df2
2016-11-05 05:51:26 +00:00
jenkins-bot
bce6aeb92a
Merge "build: Replace jscs and jshint with eslint"
2016-10-28 18:43:15 +00:00
James D. Forrester
36befda61c
build: Replace jscs and jshint with eslint
...
It's new, it's fresh, it's amazing, it's here.
Change-Id: I5dc784411f704685ed5cc763a2b2b1c5d3e5a610
2016-10-28 18:33:15 +00:00
James D. Forrester
7eeb66f63e
Set Api-User-Agent in requests to RESTBase/Parsoid
...
Bug: T149050
Change-Id: I7670450724f18865a7d9c7c7eb182449964f32b0
2016-10-27 08:56:19 -07:00
Alex Monk
b5815e9ffd
Send RB errors through the normal error handling process
...
Change-Id: I230ff6d3c9a6a183fb483f5adfd7ccdc025a07af
2016-10-14 11:17:56 -07:00
Ed Sanders
4040442ad8
Section editing in NWE
...
Bug: T144654
Change-Id: Ida6e721e0d980b47e3fda6a1f0744cbce1b2235a
2016-10-12 12:55:11 -07:00
jenkins-bot
6604a6a3a9
Merge "Use a proper error message when VE fails to load due to not being able to connect"
2016-10-05 18:29:28 +00:00
Alex Monk
f860bd0d36
Use a proper error message when VE fails to load due to not being able to connect
...
Not just 'HTTP 0'
Change-Id: Icd1b5b64ca8ea4af80e3cf32f8502d8fb0d11ae2
2016-10-05 16:39:27 +00:00
Alex Monk
9dabce28b2
Allow users who haven't enabled NWE in their preferences to use veaction=editsource
...
Instead of being completely broken when they try this, let it just work.
Change-Id: I173d82a748289e73c5792ca5aee22b8871f6a2d8
2016-10-04 23:48:43 +01:00
jenkins-bot
9721998763
Merge "Provide the new wikitext editor as a beta feature"
2016-09-13 00:56:48 +00:00
James D. Forrester
1d64e3280c
Provide the new wikitext editor as a beta feature
...
Still needs to be de-feature-flagged later.
Bug: T142644
Change-Id: I8e2588909ff95085b5a4d58f4394d9bc805f5598
2016-09-08 00:38:08 +00:00
jenkins-bot
69b7a262ec
Merge "Follow-up 51dd790
& c40070b
: Drop T135171 debug tracking"
2016-09-01 19:26:14 +00:00
Ed Sanders
134b62eb09
Preserve data when switching from NWE to VE
...
Bug: T143917
Change-Id: I910e731914bd71fdb131dae79d233d4306facc5d
2016-08-25 11:06:40 -07:00
James D. Forrester
1993c51a49
Follow-up 51dd790
& c40070b
: Drop T135171 debug tracking
...
Apparently this is now fixed, so no need to keep this.
Bug: T135171
Change-Id: Ie5c0f9140c6de4bb73770276011adce23fa69f9e
2016-08-22 11:28:22 -07:00
Ed Sanders
c452e134cc
Wikitext surface alpha feature
...
Edit wikitext with the VE interace.
Bug: T104479
Bug: T142138
Change-Id: Ic95b47e0dd378578555c4a2342ca9c87064ed1d5
2016-08-12 18:37:29 +00:00
Alex Monk
7f39d4e75d
Use .textSelection( 'getContents' ) instead of .val() to get the value of #wpTextbox1
...
To allow gadgets like wikEd to use textSelection to return the latest value.
Bug: T135747
Change-Id: Ie353cf547dea6c100c5f01ab56c9b415be1ffdb8
2016-07-31 21:58:51 +01:00
Ed Sanders
2d23f247f0
Avoid trying to load unregistered modules
...
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
2016-07-13 15:21:25 +00:00
Alex Monk
51dd790710
Track ETag header responses in special event logging schema
...
Bug: T135171
Change-Id: I70d6db0897c3f08c28d5841302ba7e196f362e48
2016-05-26 23:29:02 +01:00