Commit graph

19164 commits

Author SHA1 Message Date
Bartosz Dziewoński ea4808552d Update VE core submodule to master (2143a90a7)
New changes:
26ba8a561 Store internal list counter in new document storage and persist
75661d69f Drop support for fallback createDocumentFromHtml methods
2143a90a7 ve.dm.Document: Remove rebuildNodes

Bug: T294918
Bug: T298106
Change-Id: I1da12be2ba952912071d2f7fbde1d0854f82fb6d
2021-12-22 23:51:56 +01:00
Thiemo Kreuz 454dc53126 Give getUniquePartId method a better name
It's not a getter, but a generator. I found the name confusing.
Getters typically don't return something different every time you
call them.

Change-Id: I6eeab8b6a8644e430003f6e1ad77ab4b28e0d8c9
2021-12-22 13:03:01 +01:00
Translation updater bot 435d3727dc Localisation updates from https://translatewiki.net.
Change-Id: I524c34f4a3df5ccfd8bfdece8684caabfa12adc5
2021-12-22 08:34:41 +01:00
Bartosz Dziewoński 8cf9039b9f Update VE core submodule to master (4b2339f6e)
New changes:
8859b6a7c List diff: Improve handling of complex changes
fba7ecd4a List diff: Add descriptions for list item indent/outdent
4b2339f6e List diff: Fix display of list node attribute change (e.g. bullet->numbered)

Local changes:
* Add new localisation messages

Bug: T298002
Bug: T298012
Change-Id: I0a7614b48ebc970233ae72a5404751f07b0e03b0
2021-12-21 20:24:26 +01:00
Bartosz Dziewoński c9d8c6f90b Update VE core submodule to master (9df59571b)
New changes:
abd4e7423 ve.ce.Surface.test: Move var declarations inline
d4e08cb5c Increase specificity of source mode paragraph margin rule
7ca52e3f7 Converter: Cache whitespace regexes
7f7fbc555 Follow-up I0f5a01e3d: Update unicodeJS readme and headers
6567612db Tests: Move var declarations inline

Bug: T287733
Change-Id: I3dabc5db58da23af9fda3a44bebfe669765d19b1
2021-12-20 22:29:07 +00:00
Bartosz Dziewoński 011277f757 ApiVisualEditorEdit: Fix Phan build failure
Caused by cbfcf9e8a8b2d5aaef78d8900c2e373d350eba02 in MediaWiki core.

Change-Id: I251f44faa46376ecde49c87ccff65025f56ab7e8
2021-12-20 23:26:44 +01:00
Ed Sanders 1c6dbf433f Remove more DOM garbage introduced by 'Web of Trust' extension
Bug: T297862
Change-Id: Ib6efe0c4ea68a1b17efd37839cec428dc9ebf6b7
2021-12-20 17:54:20 +00:00
jenkins-bot 7d8e133af1 Merge "Only set diffmode-historical user option when it has changed" 2021-12-20 16:18:32 +00:00
Ed Sanders b57fe3e8ba Only set diffmode-historical user option when it has changed
Bug: T290703
Change-Id: I289e0c20db9235a432f7f49a425328ab617d57f3
2021-12-20 14:27:37 +00:00
Translation updater bot 736d061f21 Localisation updates from https://translatewiki.net.
Change-Id: I1490bdeb7bd3ad7d09581e2bbb970efa9c70bf1a
2021-12-20 08:21:53 +01:00
jenkins-bot 717b5cf534 Merge "Use no-jquery/no-html to warn against writing HTML strings to the DOM" 2021-12-17 16:42:53 +00:00
jenkins-bot c92ea76af8 Merge "eslint: Enable no-jquery/no-append-html" 2021-12-17 16:42:42 +00:00
jenkins-bot 53ad459b27 Merge "ve.ui.MWMediaDialog: Clean up image metadata display" 2021-12-17 16:42:39 +00:00
jenkins-bot 6dc75d8283 Merge "Remove obsolete performance bottleneck from TransclusionModel" 2021-12-17 13:24:19 +00:00
jenkins-bot 26d22ee4bc Merge "Delay initialization of all invisible "add parameter" components" 2021-12-17 11:52:48 +00:00
jenkins-bot 4a1063e87a Merge "Skip bad suggestedvalues and aliases in the template dialog" 2021-12-17 11:16:21 +00:00
Bartosz Dziewoński 84de6bdad2 Update VE core submodule to master (2947b78df)
New changes:
3c1ddf0b0 Localisation updates from https://translatewiki.net.
e1d8bdb93 Localisation updates from https://translatewiki.net.
d125de1da Localisation updates from https://translatewiki.net.
ecd7292fc Tweak paragraph margins in multi-line table cells to match view mode

Local changes:
* Add new file to ResourceLoader module

Bug: T295252
Change-Id: Ie8782324cd33f880d3695e57ae2d8715e14fb77d
2021-12-16 17:08:47 +01:00
Translation updater bot 59fd579cf5 Localisation updates from https://translatewiki.net.
Change-Id: I2c644c5bd450835b4f9fe15c649a273add58e394
2021-12-16 08:30:26 +01:00
Ed Sanders 2098292318 Use no-jquery/no-html to warn against writing HTML strings to the DOM
This forces us to comment when we are doing this deliberately.

Change-Id: Ide1bcb64f6c6076b48e88f1f27045bd93392f8a0
2021-12-16 01:28:42 +00:00
Ed Sanders 4d13a4f4ed eslint: Enable no-jquery/no-append-html
Prevents accidentally treating plain text or user input
as HTML, which could be an XSS vulnerability.

Change-Id: Id4af48447a0907962a57340cb60aca08df9cc505
2021-12-16 02:04:11 +01:00
Bartosz Dziewoński 97be4e21ad ve.ui.MWMediaDialog: Clean up image metadata display
* Fix incorrect use of .append() instead of .text() (which was causing
  some l10n messages to be treated as raw HTML)
* Avoid escaping and parsing HTML several times when plain text was
  intended
* Remove some unused options and variables

Follow-up to 839b64d882.

Change-Id: I124257c73fe09713afefccdec8e90200e6ae433d
2021-12-16 01:52:54 +01:00
sbassett 839b64d882 SECURITY: ve.ui.MWMediaDialog: Escape plaintext image metadata fields
CVE-2021-44855

Bug: T293589
Change-Id: I691b4065e67c53c4276599c8d16c31ab5591db3a
2021-12-15 16:14:35 +00:00
Thiemo Kreuz 7cf10ea474 Delay initialization of all invisible "add parameter" components
The "Add parameter" page always starts collapsed. Even if a template
doesn't contain anything but this. But most of the content isn't
visible, unless the user presses the button. It's not only a lot of
content, it's also rather expensive, including .parseDom(),
LinkCache.styleElement(), and ve.targetLinksToNewWindow(). This adds
up in large multi-part transclusions. In an example with 200 parts
the total blocking time goes down from 2.9s to 2.4s. Which means this
is not a major bottleneck, but still worth it.

Bug: T296335
Change-Id: Ieab9fd35d145142b04d2267d8e5a2e10a4c02784
2021-12-15 08:28:16 +00:00
Translation updater bot ff22ddd7a8 Localisation updates from https://translatewiki.net.
Change-Id: I667211639003995eb1cbb237799b9a245ee01dcf
2021-12-15 08:09:49 +01:00
Translation updater bot ac056c1b4d Localisation updates from https://translatewiki.net.
Change-Id: I382b6cb38c267a710e456a07917bebe913fa63a1
2021-12-14 08:43:15 +01:00
jenkins-bot 6bfd3ab7c0 Merge "Add link to undocumented parameter help" 2021-12-13 13:56:52 +00:00
jenkins-bot c0ae42f510 Merge "Don't scroll to template parameters while the dialog loads" 2021-12-13 08:44:27 +00:00
Translation updater bot 9d1ddd9ec0 Localisation updates from https://translatewiki.net.
Change-Id: Ia11cb19d881dc081e2d1ba092043c0f689329e77
2021-12-13 08:22:26 +01:00
jenkins-bot aa0d5d7108 Merge "Check VisualEditorDisableForAnons in getEditPageEditor()" 2021-12-10 21:22:24 +00:00
Translation updater bot 1199b4fe6f Localisation updates from https://translatewiki.net.
Change-Id: I862505b8377c53d797b4fdea2f44bc6e3aea2513
2021-12-10 08:25:18 +01:00
Bartosz Dziewoński b733e74d2f Check VisualEditorDisableForAnons in getEditPageEditor()
Other wikis with this setting only worked correctly, because the
wikitext editor was the default one anyway.

Bug: T296269
Change-Id: I58057320231471bc55d1e1b2fdfd0af55777c536
2021-12-09 20:41:40 +01:00
Thiemo Kreuz 66636e1dd8 Skip bad suggestedvalues and aliases in the template dialog
Bug: T297386
Change-Id: I6456d720c923e8cff9b4500b6cfe52bc6fbc9dad
2021-12-09 16:58:13 +00:00
Thiemo Kreuz 845cd69bf5 Don't scroll to template parameters while the dialog loads
Bug: T296743
Change-Id: Icd501ae89695a202e8c264d1b5e9811e812a56d1
2021-12-09 14:57:20 +01:00
Andrew Kostka 887a01a355 Revert "Hide more button on parameter descriptions for screen readers"
This reverts commit 3e23d78d32.

Bug: T296997
Change-Id: I74a338aa4e8cb7754feaabc348b6c308f7f2eeae
2021-12-09 10:10:53 +01:00
Translation updater bot 74e3ae45ff Localisation updates from https://translatewiki.net.
Change-Id: If3b2b87cfb360a4d2e2fdb55be27e0a5820cdd37
2021-12-09 08:23:13 +01:00
jenkins-bot abc7a7d4b6 Merge "Use new select[First|Last]SelectableContentOffset methods" 2021-12-08 16:43:53 +00:00
jenkins-bot 355032ef37 Merge "Update VE core submodule to master (21da0b01c)" 2021-12-08 16:36:43 +00:00
Ed Sanders 5c0344aeda Use new select[First|Last]SelectableContentOffset methods
* Make ve.ce.MWBlockImageNode autofocus=false, remove
  unused transition property
* Remove ignoreChildren from ve.dm.MWBlockImageNode
  based on new definition
* Remove tests which assert that deleting in a list next
  to a block image always de-indents. If this is desired
  behaviour it should be fixed without reference to
  ignoreChildren.

Bug: T295905
Depends-On: Idc0cccbe73d1b49d07b60c14a192a40f47d64608
Change-Id: Ib79a070f5d36dbe7742fa0760f8cdf55fe3046ed
2021-12-08 15:53:35 +00:00
Bartosz Dziewoński cddd97023d Update VE core submodule to master (21da0b01c)
New changes:
b08acb5d2 Localisation updates from https://translatewiki.net.
e3ab0288f Localisation updates from https://translatewiki.net.
25318d941 Update available languages
ba4f269cd Localisation updates from https://translatewiki.net.
119a3a5c9 Localisation updates from https://translatewiki.net.
c9e3a15a2 Move logic for select first/last offset to view and flag autoFocus nodes
74dd3a1a4 ce.Surface: Improve getViewportRange
21da0b01c Add some test cases for linear delete in lists

Bug: T295905
Change-Id: I1850bfc2cf9d7cb4ca756388d9dabcc1132b9879
2021-12-08 16:52:59 +01:00
Translation updater bot 7b2934a952 Localisation updates from https://translatewiki.net.
Change-Id: I5888be33123bb8eb1947da43c6f0428aa87d171b
2021-12-08 08:13:02 +01:00
jenkins-bot 39199ae44f Merge "Remove unused CSS from template dialog" 2021-12-07 14:43:51 +00:00
WMDE-Fisch 742aee7f9d Add link to undocumented parameter help
Bug: T284985
Change-Id: Ie5a61beed39aa3572c2a5e82dbc3711fdcd35ba8
2021-12-07 15:12:20 +01:00
Thiemo Kreuz 847ab1800b Remove unused CSS from template dialog
These pieces are only relevant when the new "inlineDescription"
feature is enabled. In other words: This can't have an effect on
the old dialog.

The 2.5em left and right are from an old styling when the
parameter pages have been indented.

Change-Id: I022b0dd94ee66f7de114c055c3f453317a7f6131
2021-12-07 13:57:18 +00:00
jenkins-bot 015d3f767f Merge "Raise PHP coding standards in this codebase a bit" 2021-12-07 13:47:33 +00:00
jenkins-bot 131f7e940d Merge "Add safe-guard for early template dialog resize events" 2021-12-07 13:08:42 +00:00
Translation updater bot 1417565551 Localisation updates from https://translatewiki.net.
Change-Id: I0a8ba9b30ff6671d0e8d8b24492c74605edbf8c3
2021-12-07 08:12:38 +01:00
Thiemo Kreuz fd669a4d16 Remove obsolete performance bottleneck from TransclusionModel
This sorting algorithm was introduced via Ic6bc348 (T274544). Note
there is no index parameter in the .onReplacePart() handler at this
point. When a part was moved, it was removed and simply appended
to the end. The additional sorting was needed to move it back to the
correct position.

This changed a few days later via Iafe29f1. There is now an index
parameter. The .onReplacePart() handler does the same as before, but
puts the part at the correct position right away. The additional
sorting is pointless since then.

The removed code alone is responsible for 1/3 of the total blocking
time when the template dialog opens.

Bug: T296335
Change-Id: I6c3fa70b532d34cd29d59c3b48ab81ebf608d548
2021-12-06 17:36:53 +00:00
Svantje Lilienthal 65bef19f73 Prepend multipart message in onReplacePart to prevent it from moving around
onReplacePart is being called when templates are being moved up or down. 
To prevent that the multipart message gets moved around passively e.g. 
by one element being added above it, this patch adds it to the top after each movement.

Bug: T292829
Change-Id: I946c9bc4ba5e1d261aefbb28a8c642bb58964842
2021-12-06 13:58:09 +00:00
jenkins-bot 0978f3fe3d Merge "Remove suggested values message for custom inputs" 2021-12-06 10:49:44 +00:00
Translation updater bot 955f360c52 Localisation updates from https://translatewiki.net.
Change-Id: I77a284fff376a37fdda6b839197b3612e745dc64
2021-12-06 08:20:32 +01:00