Commit graph

9607 commits

Author SHA1 Message Date
jenkins-bot 099b8f9968 Merge "Remove visualeditor-enable-experimental and ext.visualEditor.experimental" 2023-03-09 19:33:59 +00:00
jenkins-bot eab91853fa Merge "Template context: Link to source templates in "Generated from:" list" 2023-03-08 17:34:43 +00:00
Ed Sanders 55ded73e9d Remove visualeditor-enable-experimental and ext.visualEditor.experimental
These haven't been used for a while, and we usually enable experimental
features via BetaFeatures these days.

Change-Id: Iec3a7da3cc962d8ac9416b508780fcdc3ca58d3e
2023-03-08 15:05:10 +00:00
Ed Sanders 30b0f10c27 Template context: Link to source templates in "Generated from:" list
Bug: T328021
Change-Id: I0960f4033f99813ac761daf69abf437b00e7d3f0
2023-02-24 00:12:15 +00:00
Arlo Breault c068c166e2 Preserve link content for broken media
Parsoid will start populating the link content with the alt text if it's
available before falling back to the filename.  Preserving what's there
is needed to avoid dirty diffs during the transition and for cached
content.  In the future, we can remove errorText and replicate Parsoid's
new behaviour..

Bug: T273014
Needed-By: Iddf3e204d6e489cc8a33034da0d9e540efe65553
Change-Id: I7ab3d141b1df92d4447f7e3d6164082844d5bd10
2023-02-22 00:40:20 +01:00
jenkins-bot 8710f1ce75 Merge "Update MWGallery tests with newer Parsoid output" 2023-02-21 22:44:41 +00:00
Ed Sanders 1d4f828cbd Don't allow table attributes to be edited when hasExpandedAttrs
...but do allow table contents to be edited.

Bug: T307305
Change-Id: I4d714b35d2787d7259aab8250d6a772533dfde2e
2023-02-20 23:35:27 +00:00
Ed Sanders 3eb41eae26 Update MWGallery tests with newer Parsoid output
Change-Id: I3c13ac60747c07b7e6d5f418e47154f41b2e11c1
2023-02-15 14:50:58 -08:00
jenkins-bot 2dd4987b57 Merge "DesktopArticleTarget.init: Ignore fake section edit links added by gadgets" 2023-02-13 23:39:26 +00:00
jenkins-bot 09a3f24e57 Merge "DesktopArticleTarget.init: Fix init from "Add topic" tab in some cases" 2023-02-13 23:39:23 +00:00
Bartosz Dziewoński 7aa1d55a48 DesktopArticleTarget.init: Ignore fake section edit links added by gadgets
Bug: T328094
Change-Id: Ia9554bfa90944fec0ebc0eadde65f13beb562fbd
2023-02-13 22:57:23 +01:00
Bartosz Dziewoński d7e0d1deae DesktopArticleTarget.init: Fix init from "Add topic" tab in some cases
Going through onEditSectionLinkClick() is not needed, and it confused
some code that actually expected a section edit link.

Bug: T328094
Change-Id: I8975ade38d9dd064272781fb9d4bd22bab4d65ce
2023-02-13 22:34:36 +01:00
jenkins-bot a70826e8bd Merge "Follow-up I3412c53cc: Fix reference to target in ve.ce.MWWikitextSurface" 2023-02-12 15:14:28 +00:00
Ed Sanders 12395b0a57 Follow-up I3412c53cc: Fix reference to target in ve.ce.MWWikitextSurface
Bug: T329439
Change-Id: I67632bf62c0373e7825ccd9fbe263116928e7e35
2023-02-12 11:13:48 +00:00
Jack Phoenix eb71d7710a Loosen the edit link selector specificity in setupMultiTabs()
This allows VE to support even more skins with minimal or no changes to the skins themselves.

Partially reverts 75ff121b29.

Change-Id: I7536610459b7401015d4a033cc516c5d9a0ca5f1
2023-02-07 20:28:32 +00:00
jenkins-bot b5b4d42b3b Merge "Target#tryTeardown should succeed when target isn't active" 2023-02-07 16:41:05 +00:00
Bartosz Dziewoński 5736f8ead6 Target#tryTeardown should succeed when target isn't active
It makes other code easier to write when we want to make sure
that no target is active.

Change-Id: Ica75f8334ef32ffbcc59109a46624acdf271847d
2023-02-07 00:03:07 +01:00
David Lynch d8fd73d72a Avoid error if watchlist has been toggled before editing
onWatchToggle didn't cope with the case where there was already an event
in the hook-queue when it was registered during setup

Bug: T328955
Change-Id: Ic80f707e86ba3c9f88097cac8aec8c6b3cc32cee
2023-02-06 15:58:45 -06:00
Ed Sanders 722e639ccb Update VE core submodule to master (b5c670c7a)
New changes:
0cf02db3a [BREAKING CHANGE] Pass Target to UI Surface and use instead of ve.init.target

Local changes:
* Pass target to surface

Bug: T305762
Change-Id: I3412c53cc70346c8ba4b8b76976ba9c7535e945f
2023-02-02 23:19:40 +01:00
jenkins-bot 257dc1bd20 Merge "Add language and direction to preview" 2023-02-02 21:21:20 +00:00
jenkins-bot e70bdb06bf Merge "Mark config parameter as optional where it is" 2023-02-02 17:08:55 +00:00
jenkins-bot 696b791127 Merge "Error logging for native URL errors" 2023-02-02 16:10:28 +00:00
thiemowmde c57e86d325 Mark config parameter as optional where it is
This goes along with I3f239e0 in Cite.

Change-Id: Ife88431ef810f978f5c4466ee82405fd4c791032
2023-02-02 10:47:32 +01:00
jenkins-bot bd105f2fc1 Merge "Re-apply "Rewrite mw.libs.ve.getTargetDataFromHref with URL API"" 2023-02-02 09:22:45 +00:00
Bartosz Dziewoński 99b1220aca Re-apply "Rewrite mw.libs.ve.getTargetDataFromHref with URL API"
This reverts commit a92dce4999.

A workaround for the previous problem was added in ContentTranslation
in I945897a27db479986855002b389034a745bf9bef.

Bug: T325249
Bug: T325566
Bug: T327779
Change-Id: I2d9c330dc4328468a65315ec6bed1d0f53ebd1f6
2023-02-01 22:45:56 +00:00
jenkins-bot a1c1366b30 Merge "Document need to remove data-mw-section-id attributes when saving" 2023-02-01 21:15:11 +00:00
jenkins-bot 34a0634e16 Merge "Set a min-height on surface in Vector 2022" 2023-02-01 21:11:49 +00:00
Ed Sanders 4155ac51f6 Document need to remove data-mw-section-id attributes when saving
Bug: T328268
Change-Id: I429d692053c3bf02135b57471b76f72519221e99
2023-01-31 15:14:16 +00:00
Brandon Fowler 988097b09a Add language and direction to preview
Bug: T328388
Change-Id: I5ea63a743d9e497133ad6f35ba64d3a754eb7f5d
2023-01-31 00:18:14 +00:00
jenkins-bot 2fdac8851c Merge "Revert "Rewrite mw.libs.ve.getTargetDataFromHref with URL API"" 2023-01-30 14:13:38 +00:00
Bartosz Dziewoński a92dce4999 Revert "Rewrite mw.libs.ve.getTargetDataFromHref with URL API"
This reverts commit 461c76981f.

Bug: T328143
Change-Id: Ib59192c650736eac9d4a2db130c3e29720c30486
2023-01-30 13:52:53 +00:00
Ed Sanders c5cccfc85b Set a min-height on surface in Vector 2022
We could do something more complex and compute the height of the
available space, but a fixed height is a reasonable solution with
a fraction of the complexity.

Bug: T328048
Change-Id: I0b7bfa55f23afc16be43b85270666ec6a480ca32
2023-01-28 14:07:11 +00:00
Bartosz Dziewoński e52058fad3 Error logging for native URL errors
Bug: T328094
Change-Id: I7d0e3bb403db7ddbc233d6b0a770533f02883c5a
2023-01-27 10:48:45 +01:00
Ed Sanders 420c0f6c10 ve.ui.MWLiveExtensionInspector: Account for this.selectedNode being null in debounced method
Change-Id: I74ab091d3bfbdd9290429cd50688f458118701e7
2023-01-26 17:58:00 +00:00
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
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
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
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
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
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
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