Commit graph

11242 commits

Author SHA1 Message Date
jenkins-bot ef0f1db361 Merge "eslint: Move qunit env flag to test config" 2018-06-05 21:11:49 +00:00
Ed Sanders 7dbc4c7140 eslint: Move qunit env flag to test config
Change-Id: I290c436b25e306a3657324304ded08011ffcea7a
2018-06-05 21:12:56 +01:00
jenkins-bot cb62540fac Merge "eslint: Enable qunit/no-assert-equal,no-early-return,no-negated-ok" 2018-06-05 20:11:46 +00:00
Ed Sanders b668286e9b eslint: Enable qunit/no-assert-equal,no-early-return,no-negated-ok
Change-Id: I6a202a496ba9359c63febf623ef8b4dd3caa47dd
2018-06-05 20:41:39 +01:00
Ed Sanders dee50b778c MWTransclusionNode: Remove old createInvisibleIcon override
Bug: T196479
Change-Id: I99aab2e0eee3274305a6877263414ce21049fa5b
2018-06-05 18:50:14 +01:00
Ed Sanders a7049dacea Update language variant node to use new invisible icon API
Bug: T195887
Depends-On: I4eab7b9edf04454ef1a62535656b179480c3054b
Change-Id: I655757b13514e8ff89c312dcc2e1147d188a2718
2018-06-04 17:34:22 +00:00
jenkins-bot 6594055882 Merge "Paste conversion dialog shouldn't be escapable" 2018-06-04 16:44:39 +00:00
David Lynch d3fd979d3b Paste conversion dialog shouldn't be escapable
It doesn't have a "cancel and do nothing" route to fall back on, so pressing
escape does the non-progressive action, which is to paste-as-wikitext rather
than paste-as-plaintext. Neither of these is really an intuitive outcome.

Change-Id: I786b6fc87e3cdf3bb50898a070a15a353a242848
2018-06-04 11:16:19 -05:00
Santhosh Thottingal b049a82e8d
ApiResponseCache: Add a check for data.query before accessing redirects
Follow-up: If4f8c9b6719c123b31d852eb71f06a79cc0f7917
Change-Id: I5f1814f341ce401fcb3926487a2cea276698bca0
2018-06-04 13:50:27 +05:30
Timo Tijhof 21f526bffe mw.trackSubscriber: Remove action.init.timing value
In Schema:Edit, all action timing durations (ready, loaded, saveAttempt etc.)
are defined as "time since the editor was initialised", which is internally
stored as the timestamp for the "init" action.

The 'init' action itself does not have a timing duratation, but the Edit schema
has a special case for it, definining it as "time since the page was loaded".

In actually, it isn't actually implemented as "time since the page loaded",
and I suspect that as such, this value is probably not used by EventLogging
consumers of the Edit schema. Or, it might be used, but doesn't represent
what the consumers think it does.

Presently, it uses the init time now() - mediaWikiLoadStart, which basically
means the time between the random point at which MediaWiki core JavaScript
finished executing which is quite variable in practice due to the race between
<script async> and browssing parsing/rendering of HTML. That is by design,
and is also why mediaWikiLoadStart is undocumented and internal, and actually
in the process of being removed.

After many iterations on this patch to try and approximate an alternative to
this undocumented variable, I came up with an alternative approach with DLynch
at the Hackathon, which is to simply not record this one timing value, but
preserve the behaviour of all the other timing values exactly as-is.

That is, keep the behaviour of storing `now()` as "init" when the editor
activates, and keep the behaviour of substracting "init" from all other action
times, but only don't report "init" itself to EventLogging (given its value
would be 0, which isn't useful).

Bug: T160315
Change-Id: I778234efe40dde8ff30333339335be1c3910a4e0
2018-05-31 18:27:12 +00:00
jenkins-bot 725adb2ae3 Merge "Disconnect surface model history listener when tearing down" 2018-05-31 00:23:37 +00:00
jenkins-bot 47fab2753b Merge "DesktopArticleTarget: Section-scroll as part of restoring the page" 2018-05-30 22:03:49 +00:00
Ed Sanders a7f5a76bca build: Introduce eslint-plugin-qunit
Change-Id: I0a169916eaf260500ca6a172e6fb2b0c61f8d422
2018-05-30 21:04:02 +01:00
jenkins-bot 083d2aa588 Merge "ApiResponseCache: Support redirects data processing" 2018-05-30 16:53:07 +00:00
Ed Sanders 4f456b143e Disconnect surface model history listener when tearing down
Bug: T195775
Change-Id: I6f6fe654dc190d7d891d3ac346bf3f4b2f426947
2018-05-28 18:30:07 +00:00
Ed Sanders 9386d54be9 Fix template param diff when value is empty string
Bug: T195764
Change-Id: I0bd5fe71996a2ffeaa201e549f8515439c07996d
2018-05-28 14:56:53 +01:00
David Lynch d3824dee76 DesktopArticleTarget: Section-scroll as part of restoring the page
We were scrolling to the edited section when we saved the page, and otherwise
reverting scroll position to the top if we just abandoned the edit. This
unifies these cases, so any section-edit which leaves the editor will scroll
to the section being edited. (If section==new and the edit is abandoned, it'll
scroll to the last section on the page.)

Bug: T194631
Change-Id: Ic2aca68b3127c435545644912b96212bcfa6648d
2018-05-25 16:30:22 -05:00
Santhosh Thottingal 27d0634abf
ApiResponseCache: Support redirects data processing
If the mediawiki Api pass redirects as true, the response will have
redirect data. ApiResponseCache ignores it now. This commit adds
support for processing that and set in the cache.

Change-Id: If4f8c9b6719c123b31d852eb71f06a79cc0f7917
2018-05-25 12:06:09 +05:30
jenkins-bot c52be40555 Merge "MobileArticleTarget: Include placeholder for references" 2018-05-24 17:30:48 +00:00
jenkins-bot 6c90442326 Merge "ce.MWWikitextSurface: ask on paste about wikitext conversion" 2018-05-24 17:21:07 +00:00
David Lynch 4d5fc16a9a MobileArticleTarget: Include placeholder for references
Cite's a08febb0afa2d changed the rules for adding the Cite button to the
toolbar – it now requires a placeholder slot in the toolbar, rather than
finding the link tool and adding itself after that. As ve.init.mw.Target
was updated for this it kept working on desktop, but MobileArticleTarget
completely overrides the toolbar, and was missed.

Bug: T195191
Change-Id: I55c9de9e736bb83f5f05028f2fc07af0ad996050
2018-05-24 17:18:50 +00:00
Ed Sanders 4dc573a0c9 Pass importTitle directly to target, instead of through query string
Change-Id: I2d561c3b2b8992b78412707d70a55ded0f5ad1c9
2018-05-23 17:20:05 +00:00
jenkins-bot 7e0ad66a69 Merge "CollabTarget: Pass import promise to setSynchronizer" 2018-05-23 17:13:50 +00:00
jenkins-bot 504f712ebc Merge "Only apply toolbar negative margins on vector" 2018-05-23 17:05:22 +00:00
jenkins-bot c99c96e805 Merge "Allow CollabTarget to load on mobile" 2018-05-23 17:01:57 +00:00
Ed Sanders 86786bc947 CollabTarget: Pass import promise to setSynchronizer
Depends-On: I188e749c315ddbb5f8779db10987178a51d27f5c
Change-Id: I57fe6af459416e039274ea4c360e09a55123b024
2018-05-23 16:59:01 +00:00
David Lynch 4d263afaa2 ce.MWWikitextSurface: ask on paste about wikitext conversion
Throw a dialog box up to ask whether to convert something with formatting to
wikitext, or downconvert it to plain text.

This logically depends on Ie9aaaa59e9dfa138d394051fe491573253df1805.

Bug: T190079
Change-Id: I6afbbe303d1506426109e75c95f6be546ec48536
Depends-On: Ie9aaaa59e9dfa138d394051fe491573253df1805
2018-05-23 08:08:22 -05:00
Ed Sanders ccb766e933 MWSaveDialog: Fix typo in no-categories branch
Bug: T195323
Change-Id: I7d22b6cad363a240660563554e4578621f7966d0
2018-05-23 11:18:54 +01:00
Ed Sanders 2cd7abf88b Allow CollabTarget to load on mobile
It's not great, but it works, so allow people to at least
experiment with it.

Change-Id: Iaa54189f7aa63b0bd029dd25a898db54119eff70
2018-05-22 22:39:36 +01:00
Ed Sanders bb0d3471df Only apply toolbar negative margins on vector
This fixes toolbar placement in minerva-desktop.

Change-Id: Ifbd869cb70da9bb4db7c72ad89f696a080d18847
2018-05-22 21:25:33 +01:00
jenkins-bot ffaa4f2170 Merge "DesktopArticleTarget: on escape close toolbar dialogs first" 2018-05-20 16:55:02 +00:00
jenkins-bot 99bff72a6a Merge "$.isEmptyObject -> ve.isEmptyObject" 2018-05-20 11:09:50 +00:00
jenkins-bot 36dc4d487f Merge "Temporarily disable broken ref tools in CollabTarget" 2018-05-20 11:09:49 +00:00
Ed Sanders f5d1f6c595 Make options actually optional as documented
Change-Id: I42bb8e594a9ea8002938e68109d11488aef8883c
2018-05-20 12:53:19 +02:00
Ed Sanders 8f9cc64bba Temporarily disable broken ref tools in CollabTarget
Bug: T194838
Change-Id: Ic671fb158a14899b343c79f80ec8cde3ac72a495
2018-05-20 12:18:32 +02:00
Ed Sanders eb70a1c371 $.isEmptyObject -> ve.isEmptyObject
Change-Id: I309337fcffce7b1759bfca32215461171e869c5c
2018-05-20 12:00:09 +02:00
jenkins-bot 45c39da455 Merge "MWSaveDialog: Display of limit behavior unified with old editor" 2018-05-19 20:10:52 +00:00
David Lynch c76c41f3dc DesktopArticleTarget: on escape close toolbar dialogs first
Pressing escape will close toolbar dialogs (find/symbols/etc) if they're open
instead of trying to teardown the editing surface.

Bug: T190068
Change-Id: I27080649392f17344c901269029368fa0b3c2963
2018-05-19 19:29:34 +02:00
David Lynch 110fdf1fcb MWSaveDialog: Display of limit behavior unified with old editor
T190570 (I54d75ab6061de0de79b7a8112eb859a4c8a5e22a) changed old editor's
display of the limit to only show when there's <= 99 remaining. Bring same
behavior into this dialog.

Bug: T194458
Change-Id: I7f6fd7ee95348c39b107131a7e297d158a07c00e
2018-05-19 19:09:57 +02:00
jenkins-bot 862486fe2f Merge "Use same padding across skins for external links" 2018-05-19 13:20:35 +00:00
jenkins-bot 2822a548f3 Merge "Follow-up I2a49315d0: Fix right padding of active external links" 2018-05-19 13:14:50 +00:00
jenkins-bot 40f9c827de Merge "Import button for CollabPad" 2018-05-19 12:28:42 +00:00
Ed Sanders 0fe6c53b2e Import button for CollabPad
Change-Id: I1f454fb7914b2de0cb5f393aeed9001b6a5a2e40
2018-05-19 19:42:35 +08:00
Ed Sanders ccfd46bbd7 Use same padding across skins for external links
Change-Id: Ide98ae75eb39bf87d83d64c5ec075a0b58665099
Depends-On: I7eaf0756d4d58c0f902238b48176334689f3c704
2018-05-19 11:34:43 +02:00
Ed Sanders 7c2b61ce38 Follow-up I2a49315d0: Fix right padding of active external links
Change-Id: If8fa88b824d67b76f8545f1f58ef84365a501fa7
2018-05-19 11:33:17 +02:00
jenkins-bot 9b8a859350 Merge "MWInternalLinkAnnotation: test fragment behavior" 2018-05-18 19:22:40 +00:00
David Lynch 300d5ec486 MWInternalLinkAnnotation: test fragment behavior
Bug: T194463
Change-Id: I08d587c4e4cd12b1362915a22b37d9a0224de198
2018-05-18 20:55:35 +02:00
jenkins-bot 6cc9e81238 Merge "dm.MWInternalLinkAnnotation: account for ? in fragment" 2018-05-18 18:48:16 +00:00
Jforrester ed049cb646 Merge "Use getAuthorNames" 2018-05-18 18:47:33 +00:00
jenkins-bot 23b64d56b0 Merge "Add commentAnnotation to CollabTarget toolbar" 2018-05-18 18:29:35 +00:00