Commit graph

17543 commits

Author SHA1 Message Date
James D. Forrester d4044d6161 Update VE core submodule to master (fe9082b21)
New changes:
0b5cf3e43 Fix typo in comment
6f79dab51 Localisation updates from https://translatewiki.net.
c24bc7824 Update OOUI to v0.41.1
613f3c405 Move entity decoding into a utility function
4161f4338 Allow HTML entities in the special character list

Bug: T70429
Change-Id: I15eca7813598b76ebb5e7cb07fed6d377bde0fc2
2021-01-28 11:55:29 -08:00
jenkins-bot b193cd95a5 Merge "Show non-breaking spaces in the editor" 2021-01-28 19:38:28 +00:00
Ed Sanders 0edaf11ef4 SpecialCharacter: Small refactor of list building
Change-Id: I720cccbaa1d27771336a9969c4b6c776a696cde9
2021-01-28 19:14:07 +00:00
Bartosz Dziewoński d65fe812f5 Show non-breaking spaces in the editor
MWEntityNode representing   is now displayed with a light
grey background and has a tooltip explaining that this is a
non-breaking space and not a random grey blotch.

This is not done for TextNode (in core VisualEditor), as that doesn't
actually work: Parsoid converts all   in input to regular spaces.

It's still not easily possible to insert a non-breaking space.

Bug: T96666
Change-Id: Icbdf7cc3e5d675b199d08777a3439dc5dedceac1
2021-01-28 19:09:29 +00:00
Translation updater bot 923f1e8e6d Localisation updates from https://translatewiki.net.
Change-Id: I337559487f8312db4b6f45596eb7c623b1de26a0
2021-01-28 08:37:35 +01:00
jenkins-bot 4b969eec8f Merge "Adjust CE markup of broken images so that Parsoid styles apply to them" 2021-01-27 19:16:13 +00:00
jenkins-bot 6a8350b92b Merge "ve.dm.MWTemplateModel: Don't add spurious empty parameters" 2021-01-27 16:31:10 +00:00
Bartosz Dziewoński 91291d3e98 Parse relative hrefs on image nodes like on regular links (try 2)
Previous, reverted attempt: da9b6fffbd.
This attempt also includes 6037fefbe0,
and fixes minor conflicts with other changes.

* In normal images, parse relative 'href' attributes instead of
  expanding them to absolute. This resolves Parsoid generating
  |link= options for copy-pasted images (T193253).

  Keep them in the underscore-form to avoid causing dirty diffs like
  T237040 again. Unlike in the previous attempt, we don't need to be
  super-careful about the 'resource' attribute, thanks to the Parsoid
  changes in T108504.

* In gallery images stuff, prefix the 'resource' attribute with './',
  same as normal images do. This causes no functional changes, but it
  makes updating tests easier, and the consistency is probably good.

* Update test examples to also prefix 'resource' and relative 'href'
  attributes with './', like the real Parsoid does.

Bug: T193253
Change-Id: I91131728a87c9406bf069d46d3c94c9a8905a003
2021-01-27 11:53:15 +00:00
Bartosz Dziewoński 0e9dd1751d Adjust CE markup of broken images so that Parsoid styles apply to them
Depends-On: I11fc7fc955656eee2a78461b509c3fee555e8613
Change-Id: Ieb958b372212423427ac0a36cd5ec374c927d232
2021-01-27 10:12:52 +01:00
Translation updater bot 9667c20298 Localisation updates from https://translatewiki.net.
Change-Id: I74654eac3db1d6a1be934832371d8fd666b72d32
2021-01-27 08:35:53 +01:00
jenkins-bot 9149272d7c Merge "Update VE core submodule to master (65f1aed5b)" 2021-01-26 15:59:29 +00:00
jenkins-bot 1cbe8e5313 Merge "Compute entire old DM doc for section diffs" 2021-01-26 15:37:13 +00:00
James D. Forrester bcc40e7058 Update VE core submodule to master (65f1aed5b)
New changes:
06a44681a Fix referencesListDiff variable names
eb70fd2df Localisation updates from https://translatewiki.net.
7ea4efb7c build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.18.0 and make pass
becd23d48 Show ref list diffs which aren't found in the document

Bug: T272813
Change-Id: I5378230b3a86a91e67a2cfcba9e6f8ce1798c3ab
2021-01-26 16:27:10 +01:00
Translation updater bot 997c32f768 Localisation updates from https://translatewiki.net.
Change-Id: I3f0eead170e4803db1e0c966c7200d7e8abb571e
2021-01-26 08:54:18 +01:00
James D. Forrester cb9a31adac build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.18.0 and make pass
Change-Id: I8c45850965ed5b96a0980de70a25f6d5b355350d
2021-01-25 10:21:32 -08:00
Translation updater bot 397c172f4a Localisation updates from https://translatewiki.net.
Change-Id: I035835b7e08feaa5c18f3b7a5b9f3f243544cf19
2021-01-25 08:55:18 +01:00
Ed Sanders 865a59d640 Compute entire old DM doc for section diffs
We need the whole DM doc to show reference diffs
correctly. We can filter down to the active section
after the conversion like we do with the editor.

Bug: T272813
Change-Id: I2081dd520ff414caadaed2efda955d600953c957
2021-01-24 23:12:26 +00:00
Ed Sanders f8c403dffb Update VE core submodule to master (a8919f78e)
New changes:
c17816c5f Diff sidebar: Make font size slightly smaller
f8439f4cc Deep-freeze linear data
a8919f78e Deep-freeze linear data added by transactions

Local changes:
Fixes for deep-frozen linear model

Bug: T119236
Change-Id: Iae4362c8dab0f2bd335e24498f3e0522b8b1d4fc
2021-01-23 19:55:14 +00:00
jenkins-bot b11f6997df Merge "Update VE core submodule to master (ca6a97f42)" 2021-01-22 20:08:08 +00:00
jenkins-bot 5dbc152990 Merge "MWExternalLinkAnnotation: Call core method to evaluate diff" 2021-01-22 19:51:32 +00:00
Ed Sanders d831370ed4 Update VE core submodule to master (ca6a97f42)
New changes:
4589f5f00 Clear node offset cache when leaving read-only mode
68b0f8372 Show attribute changes as diffs when appropriate

Local changes:
Pull through for Ic6ec7f5ebabc912235ff7e688425f415f2c3ff20

Bug: T272603
Change-Id: I574fc56799ed165e63e16881429c4ed740850234
2021-01-22 20:40:28 +01:00
Ed Sanders 5a51096e5e MWExternalLinkAnnotation: Call core method to evaluate diff
For this key ('href') the core method is identical.

Change-Id: Ibec341c8a5a685f13e690be4107e3066fc7d7040
2021-01-22 17:33:24 +00:00
Translation updater bot c2256cf754 Localisation updates from https://translatewiki.net.
Change-Id: I64cbb3bbebf5474e5e1f80da932bb8e44fbfeccf
2021-01-22 08:31:47 +01:00
James D. Forrester 90b3b18480 Update VE core submodule to master (98c07ef95)
New changes:
376686e36 Follow-up I1361852: Only cache node offset in readOnly mode
007c25aa9 Add test for node offset caching in readOnly mode
6df84533e Diff sidebar: Fix vertical alignment of move arrow

Bug: T244114
Bug: T272612
Change-Id: I5bcc697677b6b2bb2e3d1b02d8931516aa853374
2021-01-21 09:24:33 -08:00
Adam Wight 9a1072a960 Add edit count bucket to VisualEditorTemplateDialogUse events
Bug: T269986
Change-Id: I68cc15d58a23149a6edc71cac229f6b29d33fd92
2021-01-21 13:17:03 +01:00
Translation updater bot 5789eb680b Localisation updates from https://translatewiki.net.
Change-Id: I1ca01a75350be7eb95675ccdecdcbcaee08baf6b
2021-01-21 08:33:11 +01:00
Bartosz Dziewoński 1af7c4da6a Fix typo in doc comment
Change-Id: I47d189564928dfd056d83e27b2ee6db23a98a83e
2021-01-21 00:15:13 +01:00
jenkins-bot 932a6a843f Merge "MWWikitextStringTransferHandler: Factor out Parsoid->DOM conversion" 2021-01-20 22:11:34 +00:00
jenkins-bot c58ca2730f Merge "MWSaveDialog: Use MessageWidget (inline, warning) to show save dialog warnings" 2021-01-20 21:29:02 +00:00
Ed Sanders 38aeaf60f6 MWWikitextStringTransferHandler: Factor out Parsoid->DOM conversion
The conversion to a DM doc and subsequent cleanup is a generally
useful step that should be available as its own method.

Change-Id: Ia53c0a641b231bb81c25c011624357acf4dc42a3
2021-01-20 19:49:27 +00:00
Ed Sanders 1ec49384dc MWSaveDialog: Use MessageWidget (inline, warning) to show save dialog warnings
This is the same style that is recommended for form warnings.

Change-Id: I163f5180c66b9eb165a610184b153bb1da99caab
2021-01-20 19:41:17 +00:00
Bartosz Dziewoński bb4b06275a Update VE core submodule to master (36e21385b)
New changes:
b92ce3445 Add missing check for move=null in internal list diff
f503f6aa9 Deduplicate logic for marking data/HTMLElement as moved
36e21385b Create a separate descriptionItemsStack for each reflist

Bug: T272314
Bug: T272315
Depends-On: I9a73d0e0ee3c8b12e0b5c3202eb5882258539920
Change-Id: Idcd11e864cde5ff3dab52898b9ce1f3797c69424
2021-01-20 18:57:36 +00:00
Translation updater bot bc11188d0c Localisation updates from https://translatewiki.net.
Change-Id: I018d3c70c1855ff007313fb840f2cf51535b847f
2021-01-20 08:27:41 +01:00
Ed Sanders 4e33a6ff0a Follow-up e04e98458: Add missing "Moved down/up" messages
Change-Id: I3cea39f7915e1627f68c3280357517e607b90772
2021-01-19 22:55:03 +00:00
Translation updater bot 04e3657b11 Localisation updates from https://translatewiki.net.
Change-Id: I467480f8b98763cdf4bf6c989185b6abd43170b1
2021-01-19 08:20:28 +01:00
Bartosz Dziewoński f888ebe04c Update VE core submodule to master (c7ecbcb39)
New changes:
5def0c76c setNullSelection: don't clear a selection outside the surface
da7ee751f Localisation updates from https://translatewiki.net.
af8193cf6 Cache offset keys used in adjustmentTree's adjustmentNodes

Bug: T272219
Change-Id: Ied5afcb46b7d75ecdcbd9ab5464ef1d1d6070c72
2021-01-19 01:08:56 +01:00
jenkins-bot 1cc0eae940 Merge "ApiVisualEditor: Return notices as an associative array" 2021-01-19 00:03:44 +00:00
Ed Sanders 5e1b299c0b ApiVisualEditor: Return notices as an associative array
A couple of things make this quite a simple change:
* Most messages are generated from a single message key
* $title->getEditNotices() already returns an array
  keyed in the same way, we just currently flatten it.
* The VE client already flattens the array immediately
  in ArticleTarget#parseMetadata, so no change required.
* PHP preserves the order in which keys are added, not
  that notice order is particularly important.

This partially undoes c824dc383a,
which changed the format from a mixed array to an indexed array.

Bug: T272188
Change-Id: I646667fe2513e371e0c8270761553253d1abe2b6
2021-01-18 23:35:56 +00:00
jenkins-bot 4decac59fb Merge "MWSaveDialog: Remove wrap option from showMessage" 2021-01-18 23:29:34 +00:00
jenkins-bot 59889add65 Merge "MWSaveDialog: Restore focus to edit summary widget after resize" 2021-01-18 23:27:01 +00:00
jenkins-bot da10567e52 Merge "Move newline-stripping filter into MWEditSummaryWidget" 2021-01-18 23:26:59 +00:00
Translation updater bot 515dc166cb Localisation updates from https://translatewiki.net.
Change-Id: I846e4dc3c36f38a80e076e82320d48f60e096451
2021-01-18 08:40:33 +01:00
Ed Sanders e20decc77c MWSaveDialog: Remove wrap option from showMessage
This was used when we used to pass API errors to showMessage, but
is now unused by the two remaining users (missing edit summary, and
"press ctrl+enter to submit").

Change-Id: I8a6b4db78d4e451cf3ec85fcdfd8293328aaaa3c
2021-01-16 16:22:23 +00:00
Ed Sanders 598cb943de MWSaveDialog: Restore focus to edit summary widget after resize
Change-Id: I1fc1e43d947e9e8472a470bb5eabf67fda07be5d
2021-01-16 16:18:18 +00:00
Ed Sanders 443eaded40 Move newline-stripping filter into MWEditSummaryWidget
Edit summaries should always strip newlines, wherever
this widget is used.

Change-Id: I37177771fef831037067d6244fb27cba5e06528b
2021-01-16 16:16:49 +00:00
Bartosz Dziewoński df43a1ef96 Update save failure logging for EditAttemptStep schema, simplify code
* Remove custom internal events in ArticleTarget for every error type.
  The indirection was just making it harder to figure out what data
  goes where.

* Centralize the actual logging in ArticleTarget, instead of doing it
  in a dozen methods.

* Directly use the error code from the API for 'save_failure_message'.
  Previously we'd lose the original error code and generate a new one
  in the event indirection stuff, except for 'responseUnknown'.

* Update 'save_failure_type' map. Remove unused error codes, update
  the ones that changed, and sort in the order in which the types are
  listed on the schema page.

Bug: T272162
Change-Id: Ied602c456f4b0e7e9bb135e3200bec5ce65641ba
2021-01-15 20:06:20 +01:00
James D. Forrester f2c70a25e4 Update VE core submodule to master (462eee058)
New changes:
2f20d3082 Localisation updates from https://translatewiki.net.
0bf82047b stripMetaLoadInfo: Call earlier, and use ve.copy instead of ve.cloneObject
462eee058 Update UnicodeJS to v13.0.2

Change-Id: I48630eac248a068d1e39d5b57892b4a3ac5cf35e
2021-01-15 09:25:40 -08:00
Translation updater bot f246a0584c Localisation updates from https://translatewiki.net.
Change-Id: I926e640d09c686873f9f8963729192d05655dcf8
2021-01-15 08:40:20 +01:00
jenkins-bot 5a370aafb1 Merge "Update VE core submodule to master (ad72a726d)" 2021-01-13 17:38:25 +00:00
jenkins-bot 187a5fe7ac Merge "Preserve vehidebetadialog URL flag when switching editor mode" 2021-01-13 17:38:22 +00:00