Commit graph

1125 commits

Author SHA1 Message Date
Bartosz Dziewoński be36f1fab1 DesktopArticleTarget.init: Remove code for updating edit links
This JS code duplicates the PHP implementation in VisualEditorHooks
in order to allow changes to the configuration of edit tabs
(e.g. wgVisualEditorUseSingleEditTab and wgVisualEditorTabPosition)
to take effect for logged-out users immediately, without waiting
for the HTML caches to clear.

It was worthwhile 10 years ago when VisualEditor was being rolled out
to new wikis or reconfigured daily, but it is not today when we hardly
ever change these settings.

It proved difficult to maintain as the skins change, it has several
known bugs (T292125, T306807, T346944), and probably several more
unknown ones, given that it hasn't been tested in about 10 years.

Let's remove it and save ourselves the headache. (Also also reduce the
amount of code we ship on all page views by almost a kilobyte.)

Bug: T292125
Bug: T306807
Bug: T346944
Change-Id: Ib82f5402872a2429445463a1e1ef92806d3326f9
2023-10-05 03:11:40 +02:00
jenkins-bot 8d40677037 Merge "Remove the BetaFeatures integration" 2023-09-21 15:29:34 +00:00
David Lynch 8c47e0ecb0 Update edit check decline reasons and record tags for them
Bug: T329593
Change-Id: Ib8f465c31a6c601545d55bd58a6c1fa78139757a
2023-09-08 15:49:09 +01:00
Ed Sanders fcc2040dc2 config: Mention ecenable in edit check config
Change-Id: I7216e28e2062c19eee3727c4c698d78d6c9c8d23
2023-09-08 15:44:53 +01:00
jenkins-bot d75d070992 Merge "Place reference before punctuation when configured" 2023-09-08 00:07:50 +00:00
Adam Wight 609e4d51da Share diff page initialization with non-text diffs
This solves a conflict with RevisionSlider, in which navigating
between diffs caused inconsistent rendering depending on whether the
user first entered the page through a diff with or without a
text-slot change.  After this change, the ResourceLoader modules are
always available.

Module initialization seems to be safe to run on non-text diff pages.

Bug: T344596
Change-Id: I936d45a132dee3a044a52e22c4751c0538a5bcdc
2023-09-07 09:25:05 +02:00
Bartosz Dziewoński 497e8df608 Remove 'VisualEditorTransitionDefault' and AutodisableVisualEditorPref.php
Bug: T344759
Change-Id: Ib268fd493070a646a49799dc5fb8a4774e25ec3e
2023-09-06 19:03:31 +02:00
Bartosz Dziewoński c180c2f58e Remove the BetaFeatures integration
Bug: T344757
Change-Id: If08eab93d30341333feaa4459f85fbc791435e91
2023-09-06 19:03:30 +02:00
Reedy aad68834c4 Switch MW core hooks to HookHandlers
Bug: T271034
Change-Id: I2c84d457c286878b8d903ead13120608b205a326
2023-09-04 19:10:41 +02:00
Ed Sanders a798721e23 Place reference before punctuation when configured
Bug: T344962
Change-Id: Ib4ae46d423e69c0bb45a2b1fa1c23fa7e84a8077
2023-09-01 13:44:45 +01:00
David Lynch cd43f126d1 Edit check configuration system
This creates a message called `editcheck-config.json` which will be
loaded and sent to the `modules/editcheck/config.json` packageFile.

Bug: T330112
Change-Id: Idc58ddf1045fcc0491701a739f3778c8cf4dd955
2023-09-01 13:41:52 +01:00
jenkins-bot 86f75b341d Merge "Remove deprecated RESTBase-related VE config settings" 2023-08-30 16:04:07 +00:00
Bartosz Dziewoński 5991d40f11 Remove deprecated RESTBase-related VE config settings
Bug: T341618
Change-Id: Id114ad15d264416ac13915d7fac27992d8ef05b6
2023-08-30 17:11:04 +02:00
jenkins-bot 54cae18fb8 Merge "Update messages when becoming logged-in/logged-out for IP masking" 2023-08-30 13:37:00 +00:00
jenkins-bot 4e9baea69a Merge "Acquire a temporary user username before previewing" 2023-08-30 13:20:46 +00:00
jenkins-bot 82067ffac2 Merge "ext.visualEditor.diffPage.init: Add missing dependency" 2023-08-25 09:12:30 +00:00
Bartosz Dziewoński f469fe77c8 ext.visualEditor.diffPage.init: Add missing dependency
Compare to the list of module-styles loaded in
onTextSlotDiffRendererTablePrefix() hook.

This doesn't do anything now but may be needed for T344596.

Change-Id: I16b7170467fc03365ae35c48237fe0489aed8423
2023-08-24 21:40:04 +00:00
jenkins-bot 1c93f24a40 Merge "Implement add a reference edit check" 2023-08-24 03:30:48 +00:00
Bartosz Dziewoński 59a665c424 Acquire a temporary user username before previewing
Abortable promises are definitely among my least favorite things.
It takes all of this bookkeeping to make .abort() work consistently
(so that it always aborts a request if one is in flight, and always
causes the final promise to be rejected even if we didn't start a
request yet or it has already finished). But, if you squint and ignore
every line with the word "abort", it's like a normal promise chain.

Depends-On: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
Bug: T331397
Change-Id: I67309c79e6d211d69630fe89cbf5402f8fbd350c
2023-08-22 23:40:55 +02:00
James D. Forrester 2ca0c7beaf build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: If8982b746fd74abefcbbdf803e9f3242555fa578
2023-08-19 14:15:01 +08:00
jenkins-bot 9e42850609 Merge "Remove extra margins from visual diff in Minerva" 2023-08-16 16:22:27 +00:00
Ed Sanders 3ece481e71 Implement add a reference edit check
Change-Id: I4cebc5bbaa34300d1c5bb5fde8277269b14779c9
2023-08-16 17:19:28 +01:00
jenkins-bot b65e676d80 Merge "Merge SkinTemplateNavigation::Universal hook handlers" 2023-08-16 16:03:20 +00:00
Umherirrender 08b33b2a7d Use HookHandlers for BetaFeatures hook
Bug: T271034
Change-Id: I74ca4a6645c05795c83df5474314d3d1dc556eb0
2023-08-16 05:23:38 +00:00
Umherirrender 9b4c433cd8 Merge SkinTemplateNavigation::Universal hook handlers
- The code in the hook handler is more related to the hook and the
  structure of the $links array as to the special page.
- Loading another class to process the hook is not necessary.
- Allows better migration to new hook handlers (special page classes and
  hook handler should be separated).
- Replace SpecialCollabPad::getSubPage with
  SpecialPageFactory::resolveAlias.
- The local url to Special:CollabPad is now in the content language
  (only relevant for non-english wikis).

Change-Id: I82985a8ba129b4e336cee337af31452e804090b3
2023-08-15 20:39:10 +02:00
Bartosz Dziewoński 9dd85ee26f Update messages when becoming logged-in/logged-out for IP masking
See T343848 for discussion about the phrasing.

Bug: T343848
Change-Id: I15628492fd2ff7ba93f91d3eeefa4b65ca313ca5
2023-08-14 23:37:04 +02:00
Ed Sanders 241d3da05d Remove extra margins from visual diff in Minerva
Bug: T344181
Change-Id: I5a2a9413ee5125ca7dc416ce3e8b75060dc96b83
2023-08-14 19:13:50 +01:00
Bartosz Dziewoński 870841b407 ArticleTarget: Remove misleading error message on 'badtoken' errors
This method was only called, and the message was only shown, when
retrying after the first 'badtoken' error and refreshing the token
fails again.

If this happens, it usually indicates some terrible problem with
the wiki, and it is not something that can be fixed by logging in
again (or anything else the user can do).

Let the default API error message appear ("Invalid CSRF token.").
While not very helpful to the user, it should be more helpful to
the site administrator trying to unbreak their wiki.

Remove the "visualeditor-savedialog-identify-trylogin" message.
Keep "visualeditor-savedialog-error-badtoken", which is re-used
in another error message. I'll fix that separately.

Change-Id: Ib680218bce5ae38aa52d7d941218a6410ab7e09e
2023-08-14 19:58:26 +02:00
Ed Sanders c9ab1d148e Update VE core submodule to master (d90ae3a9c)
New changes:
88fe7eef7 Localisation updates from https://translatewiki.net.
54d9ce473 Localisation updates from https://translatewiki.net.
ddb809ba1 Implement PersistentContextItems
7fd68cde3 Add a "review mode" to the surface view
850d0655c Localisation updates from https://translatewiki.net.
d90ae3a9c Localisation updates from https://translatewiki.net.

Change-Id: I4439a413045125972d9756a5a6f149d7abf82f82
2023-08-10 13:59:51 -04:00
jenkins-bot 2fb87f11e0 Merge "Add option to unify display of VE enable preference" 2023-08-07 15:33:40 +00:00
jenkins-bot 5d079c2012 Merge "Fix conditions for 'visualeditor-autodisable' that depended on WMF config" 2023-08-07 15:31:52 +00:00
Dringsim cce52fae65 Use different tooltips for ca-edit and ca-ve-edit links
Bug: T337653
Bug: T341424
Change-Id: I3aa79fec71ca2c40a0ece3ca73dd934cf6c9d5a8
2023-08-02 16:36:54 +00:00
jenkins-bot e4c4f63c32 Merge "Update VE core submodule to master (8cd2c4933)" 2023-07-18 02:10:15 +00:00
jenkins-bot 4231c7a328 Merge "Use different titles for "Edit" and "Edit source" links (section headings)" 2023-07-17 23:07:44 +00:00
David Lynch fde414149e Update VE core submodule to master (8cd2c4933)
New changes:
4ac9b4290 Localisation updates from https://translatewiki.net.
5db1e6972 Localisation updates from https://translatewiki.net.
439b29f3e PreviewElement: Remove slugs and nails using JS instead of CSS

Bug: T341901
Change-Id: I5da36fe06bd6631f17172029261b1c18daa72bf4
2023-07-17 10:38:04 -05:00
沈澄心 8523b5a876 Use different titles for "Edit" and "Edit source" links (section headings)
Bug: T337653
Change-Id: I6793d458b7a1573de6752177cab5a9bfae9ffca0
2023-07-13 02:47:50 +00:00
Bartosz Dziewoński 8091b5ce26 Update VE core submodule to master (245923176)
New changes:
4ca24a453 Fix ContextItem documentation
9135b868c ve.ce.Surface: Implement hasNativeCursorSelection
953ffb066 Mobile demo: Use 16px font ssize for global overlays as well
44f347a6b Provide alternate keyboard shortcut for toolbar search for Firefox
245923176 CompletionWidget: Add isolateInput mode

Bug: T341603
Change-Id: Iafedee8fc08fde5dbe82f8e1cc35162d5954c5a7
2023-07-11 23:14:12 +02:00
Derick Alangi f2bb8cf45d Remove VirtualRESTService code from VisualEditor
This follows the event of VE no longer using RESTBase anything. All
actions related to stashing and Parsoid and now handled in MW core.

Bug: T339227
Change-Id: I50b20ed5abb721a6ac8987cac37a6f395a4816dc
2023-07-11 19:38:05 +02:00
jenkins-bot 7ae61934a3 Merge "Remove remains of lossy-switching and discard-switching" 2023-07-11 15:34:52 +00:00
Ed Sanders 0f33f7193f Drop visualeditor-beta-warning from help menu
Bug: T341350
Change-Id: I69b886e7681281057c92ddb4175de2998512f0ed
2023-07-07 15:54:15 +01:00
Ed Sanders ea03287908 Convert MWPopupTool into MWHelpListToolGroup
The popup contains three buttons, one of which already exists
in core as a tool. By converting them all to tools we can reduce
some duplication, and better integrate with other features
that use the tool factory, such as HelpCompletionAction.

Bug: T339153
Change-Id: I81d217bc1ab9a1a6a9bf7c7ad588c2a3216b10db
2023-07-01 11:10:53 +01:00
jenkins-bot 55b04b8820 Merge "Replace the last use of mediawiki.Uri" 2023-06-30 19:57:45 +00:00
Bartosz Dziewoński be0b140965 Add option to unify display of VE enable preference
Setting `$wgVisualEditorUnifiedPreference = true` makes the VE enable
preference appear consistently on the preferences page, while still
being backed internally by the old 'visualeditor-enable' and
'visualeditor-betatempdisable' preferences.

(It effectively overrides `$wgVisualEditorEnableBetaFeature`, which
needs to remain unchanged to use the values from the right preference.)

Bug: T335056
Change-Id: Iad710a769c7176c4673c475d540dff2b7782e159
2023-06-29 01:33:51 +02:00
Bartosz Dziewoński e1cdab7931 Fix conditions for 'visualeditor-autodisable' that depended on WMF config
Previously, this code relied on 'visualeditor-enable' being set to '1'
when VE was opt-out (so not using that preference). That default does
not make sense for a beta feature (which uses that preference), so WMF
config was overriding it to 0 when the beta feature mode was wanted.

Instead of making assumptions about the default values of preferences
that depend on whether beta feature mode is enabled, just check the
beta feature config.

I also added and updated comments documenting this preference.
Previously I never really understood what it was for, and I think
I figured it out now.

Bug: T340696
Change-Id: I45eef42939149ff5be63bf299c48ef70ee535e76
2023-06-29 01:25:59 +02:00
Bartosz Dziewoński 34c6d3e1a3 Remove remains of lossy-switching and discard-switching
After the demise of RESTBase we are always able to switch from
wikitext to visual mode with changes, and we no longer need to
support these two poor experiences.

Bug: T339871
Bug: T339872
Change-Id: I2be4068447b21e16c87db0e56d6422ea64ba4708
2023-06-25 09:16:45 +00:00
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
Bartosz Dziewoński 2b8c3edab2 Replace the last use of mediawiki.Uri
Depends-On: Ia95a27c7d7ebc9e4779f82598152145f02993b29
Change-Id: I8736111c4ec3cf9a9480df2efbdf080b5d72d514
2023-06-21 15:35:06 +02: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
Jon Robson 9c25161966 QUnit test module should explicitly target desktop
Setting to desktop as it has dependency
ext.visualEditor.desktopArticleTarget.init
which is a desktop only module

Bug: T127268
Change-Id: I5083cb6ccf9ab918a90c41afc6644fc839b8950e
2022-12-14 17:46:22 +00:00
Jon Robson a1f939415f Set targets explicitly on desktop only module
I'd like to change the default targets value for ResourceLoader.
Doing that flags that VisualEditor has a few modules that should
be explicitly defined rather than relying on the default value
here.

Bug: T127268
Change-Id: I5bc4a24bc00dc338b113332a911c67241d139dfb
2022-12-12 14:38:56 -08:00
Ed Sanders 95b4bd1a4b Update VE core submodule to master (099b95023)
New changes:
e8c13e337 Localisation updates from https://translatewiki.net.
e59d14a98 Localisation updates from https://translatewiki.net.
347e09eac Localisation updates from https://translatewiki.net.
8592cdc07 Make use of native .map() in ve.ui.LanguageSearchWidget
6412add28 Localisation updates from https://translatewiki.net.
921892af2 Localisation updates from https://translatewiki.net.
a8aa6b475 Localisation updates from https://translatewiki.net.
69e6e5473 Localisation updates from https://translatewiki.net.
8ce65a801 Add test for use of ve.sanitize (DOMPurify) in external paste handler
e11290da1 Add unit tests for ve.sanitize
d248b851a Upgrade DOMPurify to 2.4.1
57eeb8b87 Sanitize href attribute in LinkContextItem and LinkAnnotation
099b95023 Localisation updates from https://translatewiki.net.

Local changes:
* Add ve.sanitize.test.js to test module

Bug: T322704
Change-Id: Ibb34f3cff9e9d891d6d9fd37151a704a67535ab0
2022-11-24 12:51:18 +00:00
jenkins-bot a584e73975 Merge "Remove usage of User::isBlockedGlobally and User::getGlobalBlock" 2022-11-16 15:22:09 +00:00