Ed Sanders
f8cebb8f51
Follow-up Ib7e769e: Fix typos in static method calls
...
Also move desktop-only methods to DesktopArticleTarget.
Bug: T193217
Change-Id: Icc2bb6602a62057da9f841793d8fe06d9814230e
2018-04-30 11:05:43 +01:00
Ed Sanders
cddf206f5b
Set surface's $overlayContainer in DesktopArticleTarget
...
Logically depends on Ia96b1a89dd9582303b80be85b3971cf3341cad24.
Bug: T166217
Change-Id: Icc54f87bac46d39e8c49010ed052e1db66827f06
2018-04-27 21:55:12 +00:00
jenkins-bot
fd082e577b
Merge "ve.init.mw.DesktopArticleTarget: Setup toolbar before section title input"
2018-04-24 16:24:42 +00:00
Bartosz Dziewoński
e3378e6d77
ve.init.mw.DesktopArticleTarget: Setup toolbar before section title input
...
When we set up the new section title input and possibly set its value
(preloading from URL query, or from autosave), the "Save" button on
the toolbar must already exist, because we try to enable it.
Bug: T192901
Change-Id: I3bba86a8c8a9b81014d425db256ff49f06bdaea6
2018-04-24 18:11:42 +02:00
Ed Sanders
1f4baa7b58
Teardown target before reloading article
...
Ensures that auto-save data is cleared after
creating a new article, or restoring a revision.
Bug: T192770
Change-Id: I348b8522c1a935d7db1243ba8fcbd5b24e3383a2
2018-04-23 21:30:37 +01:00
jenkins-bot
6902e81768
Merge "Use ellipsis on toolbar save/publish button"
2018-04-17 18:34:17 +00:00
Ed Sanders
11eaab48c8
Move redirect building methods from DesktopArticleTarget to ArticleTarget
...
These are not specific to desktop.
Also make the static builders static, and move VE target specific
code to caller, such as the click handler.
Change-Id: Ib7e769e3d6d339b9e66e1bc924480b0b0d5db17d
2018-04-02 17:32:24 +01:00
David Lynch
d77ea2bf16
DesktopArticleTarget: use -published message instead of -saved
...
Bug: T183901
Change-Id: I09f6e44f9f743f079ca5504ec06706c764ce6e25
2018-03-27 10:49:03 -05:00
jenkins-bot
58f9cf7050
Merge "Autosave section title when adding new section in source mode"
2018-03-26 21:19:26 +00:00
Ed Sanders
28d8d2923e
[BREAKING CHANGE] Use upstream tryTeardown instead of close in MobileArticleTarget
...
Change-Id: I33bcc98bc75ab049568de47faceb3f3390df5901
2018-03-26 15:32:55 +01:00
Ed Sanders
307e6c2922
Move some deactivation code from DesktopArticle to ArticleTarget
...
Also rename tryDeactive to tryTeardown.
Change-Id: Ie89d59a62826bcfe3d30ad04f89d3c4211cc34f4
2018-03-26 15:32:55 +01:00
jenkins-bot
2c96d24c76
Merge "Avoid jQuery.parseHTML"
2018-03-20 21:44:37 +00:00
jenkins-bot
0ed47a025e
Merge "Only use pre-computed measurements for position loading bar"
2018-03-20 21:44:36 +00:00
Ed Sanders
0f56af016d
Use ellipsis on toolbar save/publish button
...
Bug: T189803
Depends-On: Ic29717a660de5e80ee2a37f583b2a61c11fa87c4
Change-Id: Idaf80ea7e6ae9ffa165a8638af886bf6ab21a7f0
2018-03-20 19:46:36 +00:00
jenkins-bot
ff21c17c37
Merge "Remove unnecessary attachToolbarSaveButton override"
2018-03-20 17:25:11 +00:00
Ed Sanders
b80075a5e4
Avoid jQuery.parseHTML
...
Change-Id: Iaf5cbe27b8883d6e4c468a3b4dae11438d264894
2018-03-16 15:43:03 +00:00
Ed Sanders
a1dffa2dd7
Only use pre-computed measurements for position loading bar
...
Change-Id: I5fc17a432de8030a6154c4e961ac10c73f391a79
2018-03-16 15:39:21 +00:00
jenkins-bot
79f27a5447
Merge "Clear VE autosave whenever WikiEditor is loaded"
2018-03-14 18:25:48 +00:00
jenkins-bot
3c861d7ed1
Merge "Clear auto-save when switching to fallback wikitext editor"
2018-03-14 17:55:44 +00:00
Ed Sanders
e0419f8388
Autosave section title when adding new section in source mode
...
Change-Id: Idcbe2f12e3eb0bb85e2c986885bd8084b16dbe5b
2018-03-12 12:25:12 +00:00
Ed Sanders
e78379a395
Attach deactivate code to namespace tab ('Main'/'Article')
...
Bug: T189380
Change-Id: I9f05722b9a1c740f9f982d9c5690d48046f19fdd
2018-03-10 19:07:11 +00:00
Ed Sanders
c3c3c60f1f
Clear VE autosave whenever WikiEditor is loaded
...
Bug: T189381
Change-Id: I21a76dc32327d6c6e72a793d9b579cb7b6a5e32e
2018-03-10 18:34:17 +00:00
Ed Sanders
ec6d9b235a
Clear auto-save when switching to fallback wikitext editor
...
Bug: T189381
Change-Id: Id89fa2a673ad8aef3826c0ef862770bf522bbdcf
2018-03-10 18:04:44 +00:00
Ed Sanders
8b208c80d5
Remove unnecessary attachToolbarSaveButton override
...
It's identical to the code inherited form ArticleTarget.
Change-Id: I7fe7a48b0614f2ac2665ece042bb95a6f77303ad
2018-03-10 16:20:30 +00:00
Ed Sanders
19d9e9eb98
Tag TODO comments with bug number
...
Change-Id: I965e8d4bed4fdfa24738ca5cce0ae3f51e7f2b40
2018-02-28 14:36:42 +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
Ed Sanders
05a504887d
Drop IE10 support
...
Change-Id: Ib1cb8fb32c499ba0bdc87ec55e1e2e95d2eb39ec
Depends-On: I68c882e64fba95d5e1bf41f64658fcef7524dcf5
2018-02-22 00:47:38 +00:00
jenkins-bot
8d3e702976
Merge "Disable tempWikitextEditor for section=new on talk pages"
2018-02-21 01:29:58 +00:00
Ed Sanders
ee5b80aeee
Avoid jQuery.parseHTML
...
Bug: T187713
Change-Id: Ic156d6fb670fa2f79cf3c1d5fe0c6272b53b6440
2018-02-19 15:41:20 +00:00
Ed Sanders
f2e7361460
Disable tempWikitextEditor for section=new on talk pages
...
The temp editor doesn't know about the title input
widget yet, so disable for now.
Bug: T185633
Change-Id: I3e44dcc30ee8372080c7cd8c5fc27eb167e24fc6
2018-02-16 18:32:41 +00:00
Ed Sanders
119e9ef0f6
Remove IE9 workaround
...
Change-Id: Ifcb1690934ece7d373c764591e00740d6f1238ee
2018-02-13 10:45:16 +00:00
Fomafix
8079d081d0
Remove /* global confirm, alert */
...
The browser functions alert() and confirm() are not used.
Change-Id: I1b069937fe1548298d55a3e6616e189b72c3e8fa
2018-02-12 10:49:11 +01:00
Ed Sanders
cefa0ebf7b
Add trailing linebreak to NWE's temporary wikitext editor
...
Bug: T185632
Change-Id: I8225b08484e535668e8b0bd33eb3b8b09b80ff35
2018-02-02 11:10:18 +00:00
jenkins-bot
97fbd5619c
Merge "Public API for the tempWikitextEditor"
2018-01-24 00:53:11 +00:00
jenkins-bot
a77eea97b3
Merge "Sync tempWikitextEditor just before building target, not on every change"
2018-01-24 00:50:41 +00:00
jenkins-bot
14e557e936
Merge "Use jQuery 3 .catch( fn ) instead of .then( null, fn )"
2018-01-24 00:06:11 +00:00
Ed Sanders
8afe6c5c6d
Public API for the tempWikitextEditor
...
Allows users to know when the widget has been constructed,
and access it (e.g. to set an initial selection)
Bug: T185279
Change-Id: I3678996bcf644cc889dd168ac3ce48b5c3633ec1
2018-01-23 15:30:51 -08:00
Bartosz Dziewoński
a0e2afef8e
Use jQuery 3 .catch( fn ) instead of .then( null, fn )
...
Change-Id: I676eec0acf25690c2b2dd0b9a414be5fee887395
2018-01-23 15:25:15 -08:00
Ed Sanders
d294006d7b
Sync tempWikitextEditor just before building target, not on every change
...
Also ensure tempWikitextEditor is always torn down, even if
target setup fails.
Change-Id: Idc30a9dc00491b8c85353d73cb9ff70afea1d51c
2018-01-23 15:13:10 -08:00
jenkins-bot
f52ee56a02
Merge "Toolbars: Replace $.height with clientHeight/offsetHeight"
2018-01-23 23:01:37 +00:00
Ed Sanders
154f49e964
Toolbars: Replace $.height with clientHeight/offsetHeight
...
Bug: T185599
Change-Id: I43fbce8f221553e9ae03f8385f39a19de01e8eb7
2018-01-23 12:32:16 -08:00
Ed Sanders
3077bbe51c
Remove Firefox support comment
...
This line isn't solely for supporting FF52, that is the order
in which it is called (move after attach, not before),
but that matches all our other widgets, so not sure
it needs commenting.
Change-Id: I6f3cc5687f1e4b995dff700d0765d14de1927d51
2018-01-22 11:27:46 -08:00
Ed Sanders
f2568c8d7d
NWE: Don't attempt to set selection on unattached textarea
...
Prevents an exception being thrown in Firefox <= 52.
Bug: T185304
Change-Id: Ic9a43e3cf12d4cc566cebb328f8e807e464af634
2018-01-22 18:58:26 +00:00
jenkins-bot
140ec5f2ab
Merge "NWE: Show temporary wikitext input widget while loading"
2018-01-16 18:13:47 +00:00
Ed Sanders
b1ea5d618a
Don't pass wikitext to requestPageData if unmodified
...
Bug: T184875
Change-Id: I41a72a9c7546fafc834bf837e507d9359872ff11
2018-01-14 16:16:47 +00:00
jenkins-bot
2091b8634a
Merge "Use section fragment after-save even if the query is empty"
2018-01-10 21:41:59 +00:00
Ed Sanders
886faf2adc
NWE: Show temporary wikitext input widget while loading
...
Bug: T184614
Change-Id: I2e4964cb6329660957815dcb9a74d2ad24d5256b
2018-01-10 21:34:53 +01:00
David Lynch
64944c119a
Use mw.storage instead of localStorage
...
mw.storage catches errors, so we won't crash horribly when the user has
localStorage disabled / full.
Bug: T181822
Change-Id: I212994eb535b9a8fb5f6c09deaa10b16c3d7f10e
2018-01-10 11:44:24 -06:00
David Lynch
874ba30ce8
Use section fragment after-save even if the query is empty
...
Bug: T181075
Change-Id: If2d1107982d3f947330c750c635ee221ab71610f
2018-01-05 11:55:38 -06:00
Bartosz Dziewoński
23158de319
Fix context menu for mobile TargetWidgets
...
Depends on Ica66325a8267d14f25fbc537b956573d1d3cc336 in VE core.
Bug: T157084
Change-Id: I9d9839d7e96eb1ef254e11554acfb955750a2915
2018-01-04 16:53:40 +00:00