Commit graph

11276 commits

Author SHA1 Message Date
jenkins-bot fbb83cc391 Merge "Update VE to request Parsoid HTML v1.7.0" 2018-06-21 22:31:25 +00: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 efcea82c9c Follow-up I348b8522: Fix context variable
Bug: T197762
Change-Id: Ife163e1666ec43ecbb21099a9342960615c573d8
2018-06-20 19:50:39 +01:00
jenkins-bot 0b3b229c16 Merge "Add MW-specific DiffElement tests" 2018-06-20 18:47:54 +00:00
Ed Sanders 534b3d66cb Update VE core submodule to master (a1fd90540)
New changes:
71baf1c02 Create an 'htmlMsg' function for HTML messages with HTML or DOM arguments
9a7af223e Use ve.htmlMsg to highlight values in attribute changes
a1fd90540 DiffElement: Refactor describeChanges tests

Local changes:
Implement getHtmlMessage in mw.Platform and use for DiffElement

Bug: T195243
Depends-On: Ib4ad16858e4241d33d018830dbcfded63ff703af
Change-Id: Ib5fa39e4f2f529948354b03a141542e23d169fe0
2018-06-20 12:53:43 +02:00
jenkins-bot bbc55bcdba Merge "Replace deepEqual with strictEqual for non-objects" 2018-06-20 08:35:20 +00:00
Ed Sanders b6d03da278 Add MW-specific DiffElement tests
Change-Id: If3dfa660b49bceef2da8dc7ec113225aaa7f59f5
Depends-On: Ib4ad16858e4241d33d018830dbcfded63ff703af
2018-06-19 16:04:08 +01:00
Ed Sanders 6e03492011 Replace deepEqual with strictEqual for non-objects
Change-Id: I0a89092f2c57a4c2348c4231fdfea1c2c520fc10
2018-06-19 16:00:28 +01:00
David Lynch 814e26f1e9 DesktopArticleTarget: view click handler should only run for active target
Not checking this results in handlers blocking click actions for "read" after
the teardown of the target.

Bug: T197445
Change-Id: I3a962c66c82a0e48ca54bf2f0b822a9a005da54c
2018-06-18 20:45:52 -05:00
jenkins-bot 96c1836248 Merge "ve.init.mw.DesktopArticleTarget: Only change document title on activate" 2018-06-15 21:56:13 +00:00
Bartosz Dziewoński e484522161 ve.init.mw.DesktopArticleTarget: Only change document title on activate
Previously, we changed it on every load, which also occurs when
switching editor modes. That caused it to not be restored when editor
was closed.

Bug: T197490
Change-Id: Icb20c38309fd440553d5245d865b05145542313f
2018-06-15 22:10:25 +02:00
jenkins-bot 4f98d3bfb6 Merge "Check for normalized and converted titles in ve.init.mw.ApiResponseCache" 2018-06-15 19:44:42 +00:00
petarpetkovic 86615fcedc Check for normalized and converted titles in ve.init.mw.ApiResponseCache
Besides redirects, API can return from-to title pairs for normalized and
converted titles, as well.

Currently, doing an API query on eswiki for page info (prop='info' in params)
with titles='User:Title' returns normalized title 'Usuario:Title'.

processResult() method in ve.init.mw.ApiResponseCache.prototype.processQueue
sets page.title ('Usuario:Title') in cached results, and the promise for
actual queried title ('User:Title') gets rejected in rejectSubqueue() method.

Change-Id: I33fd4640b6eac8018e35c6fe21234f4c469dd97d
2018-06-15 21:27:31 +02:00
jenkins-bot a6ae8424f7 Merge "Use WindowAction to open the wikitext paste dialog" 2018-06-15 15:46:44 +00:00
jenkins-bot e8c6b90a72 Merge "MWLanguageVariantInspector: Use 'title' config option instead of 'iconTitle'" 2018-06-14 22:51:41 +00:00
Bartosz Dziewoński 4ee35de02a MWLanguageVariantInspector: Use 'title' config option instead of 'iconTitle'
This way the tooltip is shown on the entire button, rather than only
on the icon. One should only use 'iconTitle' to display a different
tooltip on the icon than on the rest of the widget.

I think this was caused by bad documentation in OOUI, which I'm fixing
in I967d9b78014b3754720e80da9c4785124fffc2ba.

Change-Id: I8cc99bcfca56b80a8c8aff609ba48eb3f9c5ed7f
2018-06-14 22:45:18 +00:00
Ed Sanders b340f526e3 Use WindowAction to open the wikitext paste dialog
This adds in missing functionality, such as deactivating
the surface selection while the dialog is open.

Change-Id: I0d8652a989504a35e5c235224b0ef924b6dcbeed
2018-06-13 13:28:15 +01:00
jenkins-bot 6876f6d489 Merge "Move module pre-loading from DAT.init to ArticleTarget" 2018-06-11 17:55:21 +00:00
jenkins-bot 59e59a5fdf Merge "VisualDiff: Don't compare images with different src's" 2018-06-11 17:44:48 +00:00
jenkins-bot 4e17f2f131 Merge "Follow-up Ifdc951f: Don't use getLocalApi when VE not available" 2018-06-10 22:39:29 +00:00
jenkins-bot 7890f70d76 Merge "Minor code style fix (move semi colon)" 2018-06-10 22:38:18 +00:00
jenkins-bot 17d013f520 Merge "Never store ve.debounce in prototype" 2018-06-10 22:36:23 +00:00
Ed Sanders 6459de6978 Move module pre-loading from DAT.init to ArticleTarget
This makes this feature available on Mobile as well.

Change-Id: I26a2af63b3665f5563f8562f1a8e94287cad439f
2018-06-10 16:07:44 +01:00
Ed Sanders 6cc83781a3 Never store ve.debounce in prototype
This essentially creates a static debouncer, so if you have
multiple instances calling that method at the same time, only
one of them will fire.

Change-Id: I4c257b557e87f5638b459811655a14b8625de2e3
2018-06-10 16:00:37 +01:00
Ed Sanders 000559c790 Minor code style fix (move semi colon)
Change-Id: I00f635203c4fc58454aefa8840f0b204e1480c53
2018-06-10 15:59:26 +01:00
Ed Sanders e88cd81f94 Follow-up Ifdc951f: Don't use getLocalApi when VE not available
These popups on used on the 2010 wikitext editor as well, so
we can't use ve.init.target.

Change-Id: I7d4e97566dde10146893089427f95c0b598ef4bc
2018-06-10 14:14:23 +01:00
Bartosz Dziewoński 6840ac4dd1 ve.ui.MWSaveDialog: Remove unnecessary margin after last checkbox
Patch proposed on T196375 by Jack_who_built_the_house.

Bug: T196375
Change-Id: I30548650eab3d14e7c0de29c954ededcfa44648a
2018-06-08 09:57:01 +00:00
jenkins-bot c04e934361 Merge "Simplify conversion of images" 2018-06-07 20:51:51 +00:00
jenkins-bot 1dc8d5db51 Merge "Add preview mode converter tests" 2018-06-06 21:28:19 +00:00
jenkins-bot 5e45047fe0 Merge "Fix parsing of external links, now Parsoid adds 'external' classes" 2018-06-06 21:28:10 +00:00
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 b79c98f1e3 Simplify conversion of images
Assume that images provided by Parsoid will adhere to the DOMspec.

Change-Id: I52eb4f27e6b1e1cd092133c3e27e42021ae83783
2018-06-05 13:05:40 +01:00
Ed Sanders 98ec3947a9 Add preview mode converter tests
Change-Id: I58a2c9a9e8fd0bf8254819b960c5a5ad8190f643
Depends-On: I3f1a4772cbf67091b5fd52bab610390ebd9b16ef
2018-06-04 19:00:34 +00:00
Ed Sanders bb6cd33821 VisualDiff: Don't compare images with different src's
Bug: T196343
Change-Id: I99ddce806e044ca427bf01b41d164c89dd2e15fd
2018-06-04 18:49:18 +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
Ed Sanders cb36c6ded3 Fix parsing of external links, now Parsoid adds 'external' classes
Bug: T196025
Bug: T188656
Change-Id: I89b8ba378108bde6c8db0144ed306cbc8471111b
2018-06-01 08:47:46 +00:00
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