Commit graph

1029 commits

Author SHA1 Message Date
jenkins-bot 68265fcd14 Merge "Use new helpers to show the post-edit message" 2023-06-22 15:33:28 +00:00
Bartosz Dziewoński dd509c1072 Use new helpers to show the post-edit message
Undo some changes from 95454e710f1b619f7c538bc1dc88f238409719ca,
as this functionality is now provided by the core code.

Depends-On: I1c9020b2efb2785279f5c09539a49208a310ccf7
Depends-On: Ifeffcf214719f0d5c1371dc7d51a410fb313c978
Bug: T338003
Change-Id: I90a618897699c844f9c558bbeb4d1563f8050fe3
2023-06-22 13:51:59 +00:00
jenkins-bot ca8399d97c Merge "ApiVisualEditorEdit: Remove unnecessary check" 2023-06-15 18:09:26 +00:00
David Lynch 55b7f4ffea HelpCompletionTool wasn't added to extension.json
Follow-up to ac85050f2d

Bug: T338254
Change-Id: I8f66e5cb2b7237b1d0d63dc664854a66229cd6b5
2023-06-15 14:36:09 +00:00
Bartosz Dziewoński 8573df0233 ApiVisualEditorEdit: Remove unnecessary check
There are no occurrences of the error message in our error logging
data, so it most likely can never happen.

https://superset.wikimedia.org/superset/sqllab/
```
select count(*)
from editattemptstep
where event.save_failure_message = 'visualeditor-docserver'
```

Change-Id: I8172564057418283468c657cbc6d42ce8ddb35f4
2023-06-12 17:56:13 +00:00
jenkins-bot f1ce07c29d Merge "Move the diff-mode selector to the new TextSlotDiffRendererTablePrefix hook" 2023-06-06 18:26:57 +00:00
Ed Sanders 9f3d61ba6b Make new wikitext editor available by default for 3rd party installs
Note that it is still disabled by default in user options.

For WMF environments this value is set explicitly for all wikis, so
should result in no change.

Change-Id: I4629cd433107a3413933b4ea19c844dd869a2eb0
2023-06-05 14:46:10 +01:00
Ed Sanders 9e64821bd6 Add i18n for category sort key changes
Also treat the empty string as unset.

Change-Id: I72d9ab0180f416122ca31c44787fe86aa32e88e2
2023-06-01 00:23:23 +02:00
Sam Wilson 137124a837 Move the diff-mode selector to the new TextSlotDiffRendererTablePrefix 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: I2a3c67bcfa47313dee597e602a62073e4e298cd2
Bug: T324759
Change-Id: I1584a84b3caea9eb142afba976c6ff47650c3832
2023-05-31 15:45:22 +10:00
Ed Sanders 9520ef84aa extension.json: Add missing i18n message
Change-Id: I92ac152c882815aa34e110f86f0e136c9a368724
2023-05-24 18:33:25 +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
James D. Forrester 40ccea6a10 Add VisualEditor's libraries to Special:Version
Also add spark-md5, not listed before.

Change-Id: I58dcfcd0d0795350fcc49e86ba253cf2343e0a94
2023-05-10 08:46:51 +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
jenkins-bot 86568aff16 Merge "Move the diff-mode selector to the new DifferenceEngineBeforeDiffTable hook" 2023-04-28 17:23:09 +00:00
James D. Forrester a44cd6aea8 lib: Drop promise-finally polyfill, now required by MW
Follows-up Ia6cdb85d33d2b3e0e (c895c60907) from 2018. Was added to
support Chrome <= 64 within WMF CI at the time.

Change-Id: I870de7d148395926d60d8c360f8cae19ac7c4573
2023-04-28 14:01:13 +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
Ed Sanders 51759c3f7e Remove DiffPageEnable config option
Visual diffs are always enabled on history pages, there is no
long a need for this to be configurable.

Change-Id: I9cef558b2b9d32bc86c47f6a6095270220d036db
2023-04-26 17:05:57 +01: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 adc0bcdfcd Remove the BetaFeatures integration for historical visual diffs
Bug: T333448
Change-Id: If4f732851a42802b612cef618196c9854e2cf9da
2023-04-18 22:34:05 +02: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
Ed Sanders de95fdf30d Update VE core submodule to master (58561f036)
New changes:
c239ab1fb Localisation updates from https://translatewiki.net.
0052cc2a1 Localisation updates from https://translatewiki.net.
47be93405 Localisation updates from https://translatewiki.net.
da198ce3a [BREAKING CHANGE] Drop support for ES5
5521054ce SupportCheck: Change ES5 test to ES6
4a38732ed [DEPRECATING CHANGE]: ve.init.Platform: Drop isInternetExplorer/isEdge
85a6560b0 ve.ce.Surface: Remove fallback for selectionchange event
0f6b9d65a ve.ce.Surface: Remove IE11 hack for iframe focus
2e2a51eb3 [DEPRECATING CHANGE] Drop ve.normalizeNode
c1e09cbb8 [DEPRECATING CHANGE] Drop IE11 DOM parsing hacks
28bd579f9 ve.resolveAttributes: Drop IE11 try/catch
e1db3af5b [DEPRECATING CHANGE] Drop ve.supportsIntl
3d317501e [DEPRECATING CHANGE] Drop ve.supportsSplice
58561f036 Localisation updates from https://translatewiki.net.

Change-Id: I7e13fb5826da2c1ded53520f40ff0470f34361ad
2023-04-13 16:05:37 +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
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
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
Bartosz Dziewoński 1cdb641116 Simplify timing tracking code
Peel off some layers, remove some unused computation,
remove code from ve.init.mw.trackSubscriber.js (which
is to be removed in T332438).

Change-Id: I4073b9a2a4b2af06f30e603a9d2a1968203f3b6d
2023-03-24 21:48:14 +01:00
Jon Robson 4604c4a79f Remove unnecessary targets
VisualEditor already checks inside onBeforePageDisplay hook for
whether it is in the mobile site. The rest of the checks rely
on OO.ui.isMobile which operates using wgMFMode which is a configuration
variable added explictly by MobileFrontend so not affected by this change.

I verified that mw.loader.getState('ext.visualEditor.desktopArticleTarget.noscript')
returns 'ready' on desktop, but 'registered' on mobile site

Bug: T328497
Bug: T236944
Change-Id: Iea1135c22c750c47f2e34c7ae1fd2e828bd92cc7
2023-03-24 10:39:32 -07: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 31879219bb Enable VE by default for 3rd party installs
This shouldn't affect WMF wikis as they always set
the config explicity:
https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/CommonSettings.php#L2698-L2705

Change-Id: Iec2e0f97311befdfd5308aca3d339daaaa725760
2023-03-08 14:55:40 +00:00
Ed Sanders d813ddd85f Remove unused user option 'visualeditor-enable-language'
The features this used to control are now enabled unconditionally.

Change-Id: I77afdf36a96bac703f1c41d43fc7ddd2574fb78c
2023-03-08 14:55:40 +00:00
daniel 1d9af50f71 Per 1.40, VE should use parsoid directly in MW core.
VRS should no longer be needed to communicate with RESTbase.
The VisualEditorDefaultParsoidClient setting is retained for backwards
compatibility.

Change-Id: I1e7cdaa61d3d5b075b5551844d8b0293092c99ed
2023-03-02 18:39:17 +01:00
jenkins-bot b5b7d69c47 Merge "Enable visual diffs on history pages by default" 2023-02-13 22:08:41 +00:00
Ed Sanders 44f5f47636 Enable visual diffs on history pages by default
Bug: T314588
Depends-On: I1617433d307b92075cab33efae7e57f3a3fcc7d9
Change-Id: I0948add56007368bc95e20687d01d70495e013c5
2023-02-13 21:49:58 +00:00
Bartosz Dziewoński a9aade6d66 Don't unnecessarily load huge icons for Wikimedia logos
The only icon we use from 'oojs-ui.styles.icons-wikimedia'
is the CC licenses logo.

Recently in I6217692e98088814c7a33bbc7ef8174622e03f25 more
Wikimedia project logos were added to that pack, and some
of them are positively huge. They may be improved in T328492,
but we're not using them anyway, so it makes sense to me
to use a custom icon pack here.

This reduces the download size for opening the editor for
the first time (uncached) by around 500 KB.

Change-Id: Ibe8a9ce9e4f1ded28fc9fd7e4ee41d5823123ceb
2023-02-08 19:08:38 +01:00
jenkins-bot be9977ad8c Merge "Re-apply "Remove references to mediawiki.Uri"" 2023-02-02 09:23:43 +00:00
Bartosz Dziewoński cc72825835 Re-apply "Remove references to mediawiki.Uri"
This reverts commit afe3b7187e.

Bug: T325249
Change-Id: Ie2ce4816cd8fb6cc9805e0fd70dadb337719c551
2023-02-01 22:46:14 +00:00
jenkins-bot e9fd00aa7f Merge "build: Remove unused 'targets' property for QUnitTestModule" 2023-01-31 21:18:02 +00:00
Bartosz Dziewoński afe3b7187e Revert "Remove references to mediawiki.Uri"
This reverts commit 15bbafbe8c.

Bug: T328143
Change-Id: I57e6d953ed5a1735541987a256ad39037170da5a
2023-01-30 13:52:26 +00: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 8371d24c78 Remove unnecessary test file
Change-Id: Ib81f70d290374451c5164bff7adbe4e18b9e2a8f
2023-01-21 15:09:14 +01: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
Timo Tijhof e38a56bb1a build: Remove unused 'targets' property for QUnitTestModule
When tests run, the target filter isn't applied, which is why tests
can excercise both mobile-only and desktop-only code from the same
module. The 'targets' property was added here only to satisfy an
overly strict lint check (PHPUnit ResourcesTest), which is fixed
in MediaWiki as of Ia062ff2d8.

Depends-On: Ia062ff2d8b8732b0d3498c1a614bbf6a3e3a7ddb
Change-Id: Ia00f3b987de89b8b5789d1ced125ed8a57b079df
2023-01-10 01:16:08 +00:00
jenkins-bot 8d7c36cfb5 Merge "Allow using native URL (or polyfill)" 2023-01-04 08:12:08 +00: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 62d3fc128e Remove unused message 'visualeditor-dialog-transclusion-placeholder'
Unused since e1ea921f76.

Change-Id: I88a51de0ae5583ba52bb3477625879d273150b39
2022-12-29 16:14:35 +00:00
Pols12 afca7bf0af TemplateDialog: separate “Add template” messages
Use distinct messages for section heading, button label and input
aria-label, to allow a potentially better localization.

Bug: T304121
Change-Id: I3e3b06a035e2f11f5f32face789b934e22916e49
2022-12-22 15:08:31 +01:00