Commit graph

9681 commits

Author SHA1 Message Date
jenkins-bot 94b5ae6ade Merge "DesktopArticleTarget.init: Simplify parameter types" 2023-05-30 17:18:39 +00:00
Bartosz Dziewoński 53217d24e0 DesktopArticleTarget.init: Simplify parameter types
I prefer not having to think what type `link` is.
Just pass `linkUrl` everywhere.

Add and correct some related doc comments.

Change-Id: I5aa03149d7e1b32cd9ec19c589b16d03a9981857
2023-05-30 14:51:53 +02:00
jenkins-bot fda191a1cc Merge "Drop incomplete images generated by legacy parser" 2023-05-30 12:14:23 +00:00
Bartosz Dziewoński 3109c82cc4 ve.ui.MWGalleryDialog: Fix showing the search panel
Due to changes in StackLayout in OOUI v0.47.0 it is no longer able to
show a panel that was hidden using `.toggle( false )`.

Hiding it in this way seems to not have been needed anyway.

Bug: T337638
Change-Id: I81ed015986ed03fab1e65a7f3a826ac4296077b7
2023-05-29 01:30:29 +02:00
Ed Sanders dfe0283b07 Drop incomplete images generated by legacy parser
Bug: T337438
Change-Id: I076dd91bad9e5fe2758d41ac158cad8b86dbadce
2023-05-25 16:06:45 +01:00
Ed Sanders 7d39310830 build: Update stylelint-config-wikimedia to 0.15.0
Change-Id: I87b7975b91a25f994ef9fc55759549e4c27e3e8b
2023-05-24 18:50:35 +01:00
David Lynch 50c646050d Update VE core submodule to master (fd2f048e4)
Also supporting changes to support the new HelpCompletionAction,
including adding a preference to disable it if required.

New changes:
985b553cc Localisation updates from https://translatewiki.net.
aa26e27dc Localisation updates from https://translatewiki.net.
4cdc753ab Update OOUI to v0.47.0
bfc96a7ee Completions: always abandon if the first input is a space
616a6458f Fuzzy command bar
92b6525a2 Tweak the fuzzy command bar's behavior
fd2f048e4 Fuzzy bar: change how command groups are generated

Change-Id: Ic77b8822baecf5ad1ab466d94df29bb945172b55
2023-05-20 22:04:27 +03:00
jenkins-bot d6803f2533 Merge "Use edit intro messages and preloaded content from MediaWiki core" 2023-05-19 13:23:21 +00:00
Samtar 09bb8f9168
Revert "Move the diff-mode selector to the new DifferenceEngineBeforeDiffTable hook"
This reverts commit 7dbe385773.

Reason for revert: Reworking

Change-Id: I60784afa0d47e22acd9e8a981092784c84b250eb
2023-05-18 15:36:38 +01:00
Bartosz Dziewoński a88084509d Use edit intro messages and preloaded content from MediaWiki core
Use MediaWiki core helpers to provide intro messages (including edit
notices), initial page content, and CSS classes for the edit area.

The following intro messages were previously unimplemented,
and will be shown now:
* 'sharedupload-desc-create'
* 'sharedupload-desc-edit'

The following intro messages were previously unimplemented,
but they only apply to pages where VE should never be available,
and will be shown now when editing those pages with 2017WTE:
* 'code-editing-intro'
* 'talkpagetext'

The following intro messages were previously unimplemented,
and are now explicitly skipped:
* 'editpage-head-copy-warn'

The following intro messages were previously unimplemented,
but they only apply to pages where neither VE nor 2017WTE should
ever be available:
* 'userinvalidconfigtitle'
* 'usercssyoucanpreview'
* 'userjsonyoucanpreview'
* 'userjsyoucanpreview'

Depends-On: If0b05710cb52a977bf4e85947d72d68683a0a29e
Bug: T201613
Change-Id: If26e39e383b983f7ee834ed6dd73b80e0545b068
2023-05-16 02:34:35 +02:00
jenkins-bot 929b4d405d Merge "Prevent desktop init from running on mobile" 2023-05-12 10:32:22 +00:00
jenkins-bot 56e76d244c Merge "MobileArticleTarget: Removed unused class" 2023-05-12 10:32:20 +00:00
Arlo Breault 780639f8c5 Preserve classes on all file elements, not just broken images
This also adds mw-file-element to new image nodes.

Bug: T270150
Bug: T314097
Change-Id: I545ed75ed3c87e88b5e776696754e23c05645f81
2023-05-12 10:12:15 +00:00
Ed Sanders ee33c850ae Prevent desktop init from running on mobile
3rd parties may load this module inadvertently.

Change-Id: Ie545dc2bf95eae862340531cc36e88a592882c53
2023-05-10 15:25:06 +01:00
Ed Sanders 688a08715a MobileArticleTarget: Removed unused class
This was used when we had a modal toolbar.

Change-Id: I0474270d496a136b5128b6d042284c352f80f363
2023-05-10 15:24:07 +01:00
jenkins-bot 3a0ec4a808 Merge "MWWikitextSurface: Deactivate surface on mobile before showing paste context" 2023-05-10 01:09:03 +00:00
Ed Sanders 3c07178d05 MWWikitextSurface: Deactivate surface on mobile before showing paste context
Bug: T336073
Change-Id: I6d8c55f2ab7ba7c58f84ac70afe53c04241d1782
2023-05-05 17:57:45 +01:00
jenkins-bot 7c0259a3c3 Merge "Handle temporary users when dealing with user preferences" 2023-05-05 15:55:49 +00:00
Bartosz Dziewoński 37ab4c2a80 Expose automatic temporary user info in the API
Depends-On: I62b4bb630decac92cbb8c7ddf00307df0dadb516
Bug: T332435
Change-Id: I84ce108b4d46b4e19fad032382f8b69a1b0065d5
2023-05-04 00:44:10 +02:00
Sam Wilson 3658355cef Remove duplicated diff-mode selector in save dialog
The diff mode selector is now also being returned in the HTML
from the VisualEditorEdit API, but is already implemented
separately. This change just removes the element from the API's
HTML; it is perhaps not the cleanest, but it's not too far off
what is already being done for action=diff, and we want to get
a fix out for this bug as soon as we can.

Bug: T324759
Change-Id: I830b623963111f430640dd4d9a94639f753e4cda
2023-05-03 12:00:17 +08:00
jenkins-bot 86568aff16 Merge "Move the diff-mode selector to the new DifferenceEngineBeforeDiffTable hook" 2023-04-28 17:23:09 +00:00
Bartosz Dziewoński 3b1a2d9dce Handle temporary users when dealing with user preferences
As temporary users will not have access to user preferences (T330815),
use cookies or localStorage to save them, like we already do for
logged-out users.

Also add some comments to point out where we intentionally distinguish
logged-out and temp users.

Bug: T332435
Change-Id: Ic83dd8bc8bc107f603a9b0340bd9e2bcaad8ff5a
2023-04-28 15:57:46 +02:00
Bartosz Dziewoński 51a8541255 Replace references to actionsToolbar
Target#actionsToolbar and Target#toolbar refer to the same object
since change dfaed62d3632d381db9682c603b3ddbeed182292 in VE/VE
(barring bugs like T335469). Once we no longer use the old name,
we'll be able to remove this backwards-compatibility alias.

Bug: T335469
Change-Id: I577e8ae6a857519eb0e8181543ca0a96b515e019
2023-04-27 15:51:35 +02:00
jenkins-bot b82f8283b9 Merge "Add test for MWTemplateSpecModel.getDocumentedParameterOrder" 2023-04-26 01:45:37 +00:00
thiemowmde 1a09676159 Add test for MWTemplateSpecModel.getDocumentedParameterOrder
It appears like this was never tested.

Now that it is covered it's much easier to play around with the
implementation and compact it a bit.

Change-Id: Ie9cc14082f69e7240380d352fb362d0a3fa4d341
2023-04-26 01:29:23 +00:00
Ed Sanders fec0f4ecf5 Remove padding override from active external links
Since this was written, the specificity of the selector it was
overriding has increased, so isn't required any more.

Bug: T335292
Change-Id: Ib3494524f6ddfc2ea59d6d3d13a1a90138cd84af
2023-04-24 15:08:14 +01:00
Thiemo Kreuz 5b42d900cc Minor documentation updates in the TemplateSpecModel class
Change-Id: Idcbd600c1bee29c1ebdbc1acddbe9953b4e359a1
2023-04-21 16:16:22 +02:00
jenkins-bot 8cc29eca29 Merge "Fix template dialog when TemplateData contains empty parameter" 2023-04-21 13:14:54 +00:00
Sam Wilson 7dbe385773 Move the diff-mode selector to the new DifferenceEngineBeforeDiffTable hook
Use the new hook to add the diff-mode selector to the area directly before
the diff table.

Also toggles the new inline-diff legend, when the initial diff-type is 'inline'.

Depends-On: I6de30bf79eb5ac262285951792782b870d075e00
Bug: T324759
Change-Id: Ifc133856dd793693c3a2722a7b1319dfe74555a2
2023-04-21 16:03:16 +08:00
Bartosz Dziewoński 1ca9261151 Remove the "Report incorrect…" button on visual diffs in save dialog
Bug: T282268
Change-Id: Ia6e0978fb43a7ffccaa8245728c86bc3a433a2c1
2023-04-18 22:28:51 +02:00
David Lynch 4d4093b938 textSelection compat layer getCaretPosition could error if no selection
Reported as happening when a gadget was triggering some calls early in
initialization, presumably before the surface had reached the point
where it had been focused.

Bug: T334930
Change-Id: Idebc31ef042d45acf59d8dceaa7566744233f426
2023-04-18 09:59:43 -05:00
jenkins-bot a453404bb1 Merge "Stop adding the 'diffmode' parameter to the URL" 2023-04-15 22:28:55 +00:00
jenkins-bot 1f4bd72f18 Merge "Add narrowConfig for 'Insert' and 'Publish changes'" 2023-04-13 22:23:48 +00:00
Bartosz Dziewoński 40d131f727 Stop adding the 'diffmode' parameter to the URL
Bug: T213522
Change-Id: I9f724a068bfa869db0183a216ff0b764084f464d
2023-04-13 20:50:34 +02:00
Ed Sanders 9c61620fac Add narrowConfig for 'Insert' and 'Publish changes'
Bug: T92315
Change-Id: I4d35e7bc3d04312fc15632acae06cc43839bbf11
2023-04-12 23:05:08 +01:00
Ed Sanders b9d17f3dd1 ve.ui.MWTemplateTitleInputWidget: Drop workaround for unicode regexes
All browsers we support have this feature.

Change-Id: Ie1e6fe2ef7d2b446dce45d6f11a46c9279b4790f
2023-04-12 23:02:09 +01:00
Ed Sanders 2df6c004a3 Drop some IE hacks
Change-Id: I97b0f1b8cb5e799d151177c43dc8a990cf6015bd
2023-04-12 16:32:59 +01:00
thiemowmde 5343e9a015 Fix template dialog when TemplateData contains empty parameter
It's possible to specify a parameter with no name via TemplateData.
This confuses the template dialog because the empty string is a
reserved, internal value for parameters that are in the process of
being named.

Fixing TemplateData is not so easy. Therefor this workaround here.

See T333826 for a detailed description.

Bug: T333826
Change-Id: I5f4efd7069e71ba51138a23f3c3cb40e1b50d339
2023-04-11 18:19:34 +02:00
jenkins-bot 346adf77ad Merge "Follow-up I1a81484: Replace MetaItem#remove with SurfaceFragment#removeMeta in other pages" 2023-03-30 21:06:57 +00:00
Ed Sanders 56489cabd0 Follow-up I1a81484: Replace MetaItem#remove with SurfaceFragment#removeMeta in other pages
Change-Id: Ie5c79b2099b5c293534c82ae4ba8a17f801060e9
2023-03-30 16:19:41 +01:00
jenkins-bot fd534b7679 Merge "Vector: Use greyed out version of bullet image in visual diffs" 2023-03-29 19:25:12 +00:00
Ed Sanders 6ebd93b6eb Vector: Use greyed out version of bullet image in visual diffs
Bug: T332697
Change-Id: I50a7fedd8f1670daf668a6268fd12bebf578ced4
2023-03-29 21:05:24 +02:00
Ed Sanders 55eefc366b Remove convertToWikitextOnPaste flag
This was introduced as a temporary flag for
DiscussionTools, and was removed in I0514e8f8.

Change-Id: Ia8d82baf4b93cf7de53b58ba19fa31856f1bc011
2023-03-29 18:43:36 +01:00
jenkins-bot 1d90bae5c8 Merge "Gallery: Make ve.ce.Gallery(Image)CaptionNode active (editable)" 2023-03-29 15:43:08 +00:00
David Lynch f11a7b4c16 Change name of the editcheck-needreference tag to editcheck-references
Bug: T324733
Change-Id: I435100fb05cb846cb1c0e3d5d5a72a1570ada1f4
2023-03-28 10:14:51 -05:00
David Lynch 31108dda7c Add editcheck tags when VE thinks a reference is needed
Bug: T324733
Change-Id: Iddc57e07133c56000c1338e8d780fa55cc95ab89
2023-03-27 22:48:25 +00:00
Ed Sanders 6e77f963e4 Initial edit check tagging
Bug: T324730
Change-Id: I112015809e55da802e3840fdfeaf16a72e090cb3
2023-03-27 22:47:40 +00:00
jenkins-bot 5ce888cdce Merge "Centralize EditAttemptStep logging code in WikimediaEvents" 2023-03-27 15:30:45 +00:00
Ed Sanders 9d09979e9e MWSaveDialog: Center preview in Vector 2022
Bug: T328783
Change-Id: I2e18967bb41573789cc3a8554038b8ac7876d356
2023-03-27 12:29:25 +00:00
Bartosz Dziewoński 766bdedf70 Centralize EditAttemptStep logging code in WikimediaEvents
* Use the new mw.track() handlers from WikimediaEvents
* Ensure that 'integration' and 'mode' are set on init
  events, since they're not guessed in the handler any more
* Remove the setting of 'editingStatsId' tracking parameter,
  now happens in WikimediaEvents by setting an API AJAX option
* Replace ve.track with mw.track in VE-MW, so that we don't have
  to copy the events manually here and in other extensions

This must be merged together with WikimediaEvents change
Iace4d53a972396ca5b8713000570cc47c9986034 (but we can't use
Depends-On, because CI requires code here to be removed first).

Bug: T332438
Change-Id: I0ef0a96aafdf89a4ebe32131a85b18c25744bb2c
2023-03-24 21:48:45 +01:00