Commit graph

19939 commits

Author SHA1 Message Date
Jan Drewniak d98e9e83e1 Fix Wikitext editor preview layout in Vector 2022
Accounts for the use of CSS Grid in Vector 2022, in
the 2017 Wikitext editor preview, by placing the heading and
content in named grid areas (`titlebar` and `content`).

Bug: T327778
Change-Id: I66a30e282e808559b4f375f5924ae0d945c058a9
2023-01-24 10:39:40 -05:00
Translation updater bot eb06818b71 Localisation updates from https://translatewiki.net.
Change-Id: I64700f04b80fb793033739582e3d526d4013ccd0
2023-01-24 08:50:00 +01:00
Bartosz Dziewoński 15bbafbe8c Remove references to mediawiki.Uri
Remove dependencies (except a single one that we actually need)
and some config that allowed it to be used in doc comments.

Bug: T325249
Change-Id: I0db6e4ab1c025ac3868d2dc886c13a09d91f8086
2023-01-23 14:59:35 +00:00
Bartosz Dziewoński 461c76981f Rewrite mw.libs.ve.getTargetDataFromHref with URL API
At first I was going for a more minimal replacement of mw.Uri with URL,
until I discovered that this code depends on a mw.Uri bug that would be
difficult to replicate:

  // Expected: Relative URLs are accepted
  new mw.Uri( '/foo' ).toString() // => 'https://localhost/foo'
  // Expected: Protocol is optional
  new mw.Uri( 'example.com/foo' ).toString() // => 'https://example.com/foo'
  // Unexpected: Treated as empty domain with no protocol rather than relative URL
  new mw.Uri( './foo' ).toString() // => 'https://./foo'

So I went for a bigger rewrite to preserve the intent rather than the
exact logic.

I had to change some test cases to use more realistic fake data. They
previously relied on bugs in our URL handling to pass despite the base
URLs being incorrect, particularly for non-short URLs (see T270219).
In my testing non-short URLs behave the same as before in practice.

Depends-On: I07a8c097dba0f5572c0aedf4febdf1434063ea6f
Bug: T325249
Change-Id: I232361266c1dda795b88018c3aaa3d9ecbe42b93
2023-01-23 14:59:23 +00:00
Bartosz Dziewoński e40b73ef57 Update VE core submodule to master (b7ff5aac0)
New changes:
2201b350c Localisation updates from https://translatewiki.net.
da74736c1 Remove unused test code
d1b016e90 Minor test tweaks
551de4f0c Specify document base URLs in more test cases

Local changes:
* Specify document base URLs in more test cases

Change-Id: I0e301bef38d97fa2234aa901c787360d9fbde8a3
2023-01-23 15:57:59 +01:00
Bartosz Dziewoński a3d0ff8449 More realistic mocked data for MWWikitextStringTransferHandler tests
The actual API responses do not have <body> tags.

Change-Id: I5f2ab7d0a4ad33497868f5488e376f9467c1256b
2023-01-23 14:40:11 +00:00
jenkins-bot ca212a94d4 Merge "Minor test tweaks" 2023-01-23 13:01:42 +00:00
jenkins-bot 5c5165e394 Merge "Remove unnecessary test file" 2023-01-23 13:01:40 +00:00
Translation updater bot 44aa186f57 Localisation updates from https://translatewiki.net.
Change-Id: I6a4eeae67cebd695e49c60eff47bf66426c6afd0
2023-01-23 08:24:29 +01:00
Bartosz Dziewoński 0689e9247f Minor test tweaks
Change-Id: Ib20f9665534873bd1d5963664399459d3f5b4234
2023-01-21 19:15:51 +01:00
Bartosz Dziewoński 8371d24c78 Remove unnecessary test file
Change-Id: Ib81f70d290374451c5164bff7adbe4e18b9e2a8f
2023-01-21 15:09:14 +01:00
Ed Sanders 24a89caf93 mw.Target: Allow passing storageExpiry to initAutosave
Change-Id: Idcf50a527e2386122d077c497477057657824646
Depends-On: I4557a8808145fd1a601fe9b3fa1b190f8dba0077
2023-01-21 09:42:26 +00:00
Ed Sanders 2df8a95ac3 Update VE core submodule to master (035756895)
New changes:
4355d697a Replace ListStorage with ConflictableStorage
978061f86 Update SafeStorage and ConflictableStorage with expiry functionality
79019ed88 ve.dm.Surface: Support storage expiry

Local changes:
* Pull through conflictable storage

Bug: T218663
Change-Id: I36e49c01e9f2ddb7d362d539b72a4beca925bcb7
2023-01-21 10:41:21 +01:00
jenkins-bot da426264ca Merge "Work around Firefox bug affecting LazyMultilineTextInputWidget" 2023-01-21 08:43:10 +00:00
Bartosz Dziewoński 8c297bca46 Update VE core submodule to master (5917667a6)
New changes:
1645353c7 Localisation updates from https://translatewiki.net.
153cc2971 Update eslint-config-wikimedia to 0.24.0
b1e205196 Update OOUI to v0.46.2
5917667a6 Localisation updates from https://translatewiki.net.

Change-Id: Ic3994d286e10ec06979a7a9d223fef3a1c6da4c5
2023-01-20 18:41:04 +01:00
thiemowmde 004d92d341 Work around Firefox bug affecting LazyMultilineTextInputWidget
Before the `height: 2.5em` was applied to _both_ the visible
<textarea> and the $clone. While this shouldn't make a difference –
one of the first things .adjustSize() does is setting the $clones
height to 0 – it somehow triggered that Firefox bug.

With this patch we remove the `height: 2.5em` before handing over to
OOUI's .adjustSize(). It looks like this fixes the issue. We might
be able to revert I7560ceb then.

Bug: T317369
Change-Id: I96c2d7d7bf359ff0373d478b2b7e97c8833ba5b6
2023-01-20 12:29:12 +01:00
Translation updater bot 145a55934a Localisation updates from https://translatewiki.net.
Change-Id: If0bcb96c483a236ae33bde6aba62d3773e7c1f2d
2023-01-20 08:43:10 +01:00
Translation updater bot cc6a675bbc Localisation updates from https://translatewiki.net.
Change-Id: I96b43d1946fafd26812faff55d04a4dc20e403c6
2023-01-19 11:32:38 +01:00
jenkins-bot 9272edcbba Merge "Update eslint-config-wikimedia to 0.24.0" 2023-01-18 15:04:45 +00:00
Ed Sanders e4ce6db868 Update eslint-config-wikimedia to 0.24.0
Change-Id: I8299d287721eee6cb6d2354836e82812bf57badd
2023-01-18 14:39:04 +00:00
Wout Gevaert 0b75660801 Use getImageNodes instead of custom filter
Bug: T320874
Change-Id: I4ef69ea2395f310ce48f3e32bbf202713e2c7f15
2023-01-18 13:43:38 +01:00
Translation updater bot cbb6445e3b Localisation updates from https://translatewiki.net.
Change-Id: I68e0c78c8c8912c6ffdc8cac64f6beb8037432c9
2023-01-18 08:30:49 +01:00
jenkins-bot ec556ab12c Merge "Use helper classes from the new namespace" 2023-01-17 18:16:19 +00:00
Translation updater bot 6eba17fe8d Localisation updates from https://translatewiki.net.
Change-Id: I0ab1b23fc558c977bb4c2b37b2cc8bcc490d5010
2023-01-17 08:08:24 +01:00
Derick Alangi deecb3cdcb Use helper classes from the new namespace
Helper classes have been moved to a dedicated namespace
of their own, this patch references the new namespace.

Depends-On: Ieeb7a0a706a4cb38778f312bfbfe781a1f366d14
Change-Id: I5a2792a3536f6d953905561410f0e4966254ccbe
2023-01-16 14:22:38 +01:00
Translation updater bot 7658613cb4 Localisation updates from https://translatewiki.net.
Change-Id: Ifc360886b1276361b6b7cae0253cf39a583795e3
2023-01-16 08:29:44 +01:00
James D. Forrester a3050b0d1e Update VE core submodule to master (225741274)
New changes:
366db6fce Localisation updates from https://translatewiki.net.
5b9f4957c Localisation updates from https://translatewiki.net.
c617d2a3c Localisation updates from https://translatewiki.net.
225741274 Update OOUI to v0.46.1

Bug: T325954
Change-Id: I337bbbc2b5887b73e91705c2b44b96b46ce2cdff
2023-01-12 13:39:27 -05:00
Translation updater bot 08a3af8637 Localisation updates from https://translatewiki.net.
Change-Id: Iad0d1445c225eeb191948341f7399968825003d1
2023-01-12 08:43:23 +01:00
jenkins-bot 78b64f164b Merge "selenium: Remove webdriverio npm package from the VisualEditor extension" 2023-01-11 11:59:28 +00:00
Translation updater bot e86e83d119 Localisation updates from https://translatewiki.net.
Change-Id: I01d2cc802ab3c4700a963fcfa08689e87dbbcb6e
2023-01-11 09:02:56 +01:00
Vaughn Walters 33dc5d0464 selenium: Remove webdriverio npm package from the VisualEditor extension
The `webdriverio` package does not need to be an explicit dependency.
It is a dependency of `@wdio/cli`.

Bug: T325059
Change-Id: I11bb971f9014822790848655647a73a555c4ae3a
2023-01-10 18:38:31 -06:00
jenkins-bot 8d94e10944 Merge "Replace mediawiki.Uri with native URL (ArticleTarget)" 2023-01-10 17:45:40 +00:00
jenkins-bot bc936d73ce Merge "Show "Continue" instead of "Try again" on button to save as another user" 2023-01-10 01:49:04 +00:00
Bartosz Dziewoński 2770809d1a Replace mediawiki.Uri with native URL (ArticleTarget)
Persistent global-ish properties in ArticleTarget and friends. A lot
of our own code re-uses them, and code elsewhere could refer to them
as well (although I didn't find any uses).

In one case we need to keep using mediawiki.Uri, to handle building
an array from query parameters exactly like PHP would handle it.

Bug: T325249
Change-Id: I57699ff9dd39179ca29a87b6e2d9b12c2b86eb7d
2023-01-09 20:34:27 +00:00
jenkins-bot 1cab012fec Merge "Add more test cases for mw.libs.ve.getTargetDataFromHref" 2023-01-09 18:50:09 +00:00
jenkins-bot 56bc2bb813 Merge "Fix encoding to roundtrip links without 'rawTitle'/'origTitle'" 2023-01-09 18:42:47 +00:00
Translation updater bot a64b6f8849 Localisation updates from https://translatewiki.net.
Change-Id: I375d7e80da5729d665b19a027afdd39a37380827
2023-01-09 09:29:58 +01:00
Nardog 17f40c29b8 Show "Continue" instead of "Try again" on button to save as another user
Bug: T190406
Change-Id: I513acdab8ba7b09c13901e070b88e34d2699fb06
2023-01-08 20:23:28 +09:00
Bartosz Dziewoński 9e79a0e218 Add more test cases for mw.libs.ve.getTargetDataFromHref
Bug: T324352
Change-Id: Ie6688736cadaa9f250f176b63b44fe85009dbbbf
2023-01-07 20:00:48 +00:00
Bartosz Dziewoński 25019d7f55 Fix encoding to roundtrip links without 'rawTitle'/'origTitle'
Our encoding for the hrefs like "./Foo" that we send to Parsoid
differed slightly from how Parsoid outputs them, so to avoid dirty
diffs, we had to store the original ones we received from Parsoid
and send them back if they were unchanged.

Change the encoding to match Parsoid's exactly (by referring to the
Parsoid source code), and then remove 'rawTitle'/'origTitle'.

On a historical note, 'rawTitle'/'origTitle' were originally added to
fix other issues with links, which I hope are long behind us:
* bb45d984ca (T145978)
* fda2e6c1b5 (T44140)

Follow-up to 362df66b47, which removed
some other old stuff from the handling of Parsoid links.

Bug: T325766
Change-Id: I0ad0a655380eb2fb29b5ac01e2e399ac550ce34a
2023-01-07 20:00:42 +00:00
Translation updater bot 4e2f129fa0 Localisation updates from https://translatewiki.net.
Change-Id: I6839e3851038dfd60f3928653142116b7cc89164
2023-01-06 08:57:18 +01:00
Translation updater bot 3910cd799a Localisation updates from https://translatewiki.net.
Change-Id: Icdf57197f3a2c25e670802033f500dd2402a5e6c
2023-01-05 09:11:35 +01:00
Bartosz Dziewoński 659b7989f0 Update VE core submodule to master (cb9c5fadc)
New changes:
9d0cd4d43 Rebuild demos with newly added language 'se'
274212549 Ignore 'origTitle' in tests
25dc9632c tests: Remove unused test data

Bug: T325766
Change-Id: Id05e7c72f1a24e108e9ea3062bd71992fe94a504
2023-01-04 19:57:51 +01:00
jenkins-bot e603b1b02a Merge "Replace mediawiki.Uri with native URL (easy cases)" 2023-01-04 08:12:11 +00:00
jenkins-bot 8d7c36cfb5 Merge "Allow using native URL (or polyfill)" 2023-01-04 08:12:08 +00:00
jenkins-bot 161a6a0623 Merge "Fix post-edit notification after switching from old wikitext editor" 2023-01-04 08:12:05 +00:00
Bartosz Dziewoński fd80fae57f Replace mediawiki.Uri with native URL (easy cases)
Replacing one-off uses in various auxiliary features: only used
in function scope (or narrower), nothing else depends on them.
Some of them didn't even need to do any URL parsing or formatting.

Bug: T325249
Change-Id: Ia9a18656f67cb0a204c87605459abb9f5bbdc347
2023-01-03 22:18:01 +01:00
Bartosz Dziewoński 8f1e9b6089 Allow using native URL (or polyfill)
Adding the polyfill as dependency to everything using mediawiki.Uri,
so that we can change the code in separate commits without thinking
about this.

Bug: T325249
Change-Id: I8a7d2e6c7f98ed6187a85a88f2b4a0a4a5ecfc56
2023-01-03 22:18:00 +01:00
Bartosz Dziewoński 60b9a71f9b Fix post-edit notification after switching from old wikitext editor
Follow-up to 37b81b5ba4.

Change-Id: I2e61b265822d75cd409d57a4aec7abfbbd4d3fc4
2023-01-03 22:17:56 +01:00
Translation updater bot a9ecb846eb Localisation updates from https://translatewiki.net.
Change-Id: I7d3dfe25812400bc2a3e0c004db2881321fcc13b
2023-01-03 08:21:50 +01:00