Commit graph

101 commits

Author SHA1 Message Date
jenkins-bot 2f568758de Merge "Replace confusing use of rawParams() in onSkinEditSectionLinks()" 2024-01-25 13:01:51 +00:00
Umherirrender 5ec06f50d6 Drop RL targets definitions from module class, no longer honoured
Bug: T328497
Follow-Up: I0ba090e37cef19219a2145b3c062b3a3c98f0e95
Change-Id: I3b430a4bd7d098f82b06a8d2871aeb19e729a62e
2024-01-23 21:40:20 +01:00
Bartosz Dziewoński 79d2e5a3ac Replace confusing use of rawParams() in onSkinEditSectionLinks()
This message is treated as text, and the entire result is escaped
later. rawParams() has no effect except for avoiding parsing wikitext,
so use plaintextParams() instead.

Change-Id: Ifa1f1b51546d4c24b8789b6264302a3ced81cd52
2024-01-15 22:50:54 +01:00
Jon Robson 8e97b19742 phan: Use ActionEntryPoint
Ib70e4e67e4cb1b65ac218c095864fb6eb43d0929
changed the type of the last parameter of
BeforeInitializeHook::onBeforeInitialize

Bug: T354216
Change-Id: Icd9e2a70fe001aa706b4059236b93db2eeb79369
2024-01-05 10:03:24 -08:00
jenkins-bot ba5c9995d0 Merge "Recognize DEFAULTSORT again" 2023-11-16 17:50:50 +00:00
Bartosz Dziewoński d23e912884 Use expression builder instead of addQuotes()
Bug: T350992
Change-Id: Ide2edebf979a21628aa5832d6ac8774fc55310f6
2023-11-11 00:29:25 +01:00
Nardog 9b9f2c50b0 Recognize DEFAULTSORT again
Since Parsoid now treats DEFAULTSORT like any other template, we have to
scan mw:Transclusion spans.

Bug: T337398
Change-Id: Icba92fc14c1c56ec4711ba49407e8be368d57842
2023-11-09 21:26:20 +00:00
Ed Sanders e238544d6e Document generated messages
Change-Id: I4467f0563a5c09ae063e13c372ebbde4f6e1d112
2023-11-03 15:39:00 +00:00
jenkins-bot 6e34b3b730 Merge "Use options-messages to delay message parsing on Special:Preferences" 2023-10-13 23:37:16 +00:00
Umherirrender 4cc8926974 Use options-messages to delay message parsing on Special:Preferences
This also removes double escaping from the messages as 'options'
for type = select gets escaped by the html form

Change-Id: I31cc19cbe1f6e61849f3ff806e53a14082e06849
2023-10-13 22:12:02 +02:00
jenkins-bot a664de74f2 Merge "Change icon for supported skins for section edit links, too" 2023-10-13 15:29:12 +00:00
jenkins-bot 0e370a84cd Merge "Remove 'VisualEditorTransitionDefault' and AutodisableVisualEditorPref.php" 2023-10-13 15:27:59 +00:00
Bartosz Dziewoński 137914de28 Change icon for supported skins for section edit links, too
Bug: T346944
Change-Id: I4653671ccb2bba2da3940897371d7dfac4bbd0f2
2023-10-09 20:13:24 +02:00
Jon Robson bc4c367bba Disable $wgVisualEditorUseSingleEditTab on mobile site
Bug: T348353
Depends-On: I92f7c2c5f4691bd511219432c53379ddd928eae2
Change-Id: I3108f884173526f95d86d975d7421b4af1cff447
2023-10-06 16:29:48 -05:00
Jon Robson 47815e9d2b Change icon for supported skins when both VE and source edit icons are present
This introduces an extension attribute EditIconSkins which allows extensions
or skins to request the rendering of edit icons.

This will be used by Minerva in I3c9d59f49f1b939981a7b2b450448db6736d5958

Bug: T346944
Change-Id: I401805224c0f387ac85b52b50c1f298b83c03a91
2023-10-04 22:16:13 +00: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
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
jenkins-bot 2f3b31eeb2 Merge "Add editcheck-references-activated when UI is shown" 2023-09-01 01:57:51 +00:00
jenkins-bot 0139b042be Merge "Fix remote page detection logic" 2023-08-24 15:14:05 +00:00
jenkins-bot 1c93f24a40 Merge "Implement add a reference edit check" 2023-08-24 03:30:48 +00:00
jenkins-bot 21a15315e7 Merge "Improve 2017WTE preference labels" 2023-08-23 12:39:43 +00:00
Dringsim 90ccc475df
Fix remote page detection logic
Remote pages can be global user pages, etc., not restricted to files on Commons.

Change-Id: I89368c93e25ca970bf35ad742a1054473b6d6c48
2023-08-22 17:13:09 +08:00
Bartosz Dziewoński c8a2f9b0ad Improve 2017WTE preference labels
* Remove full stop. No other preference label has a full stop.
* Mention "2017 wikitext editor" as the alternative name, similar to
  WikiEditor (I6d17359166f58811ba99893ce4a4500a87deb827).

Change-Id: I48f64f1507b263da61c8a5711afc8ac4981763ee
2023-08-21 18:14:46 +00:00
gerritbot d5cc6fc32a Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I1bb6e39d33b2bdb00fbe70fec0bcca1d71ad3a17
2023-08-19 12:17:42 +00:00
Ed Sanders 975dc2c237 Add editcheck-references-activated when UI is shown
Bug: T342462
Change-Id: If6303df1a3dde8d6bb288ed04f40f7d43c4b90ae
2023-08-16 17:19:28 +01: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
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 4231c7a328 Merge "Use different titles for "Edit" and "Edit source" links (section headings)" 2023-07-17 23:07:44 +00: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
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
Esanders b33bb734af Revert "Revert "Add tag when reference added to the page""
This reverts commit 235e5aca00.

Reason for revert: Re-applying with fixes

Change-Id: I9dc5a77045ea5f15c90cf84a15815e13dffd5739
2023-07-06 17:50:08 +01:00
Bartosz Dziewoński 235e5aca00 Revert "Add tag when reference added to the page"
This reverts commit d4460219bd.

Bug: T341202
Change-Id: I8e608a5a34a3bb18d1994d5c182c3918e6d6f89d
2023-07-06 11:35:50 +00:00
Ed Sanders d4460219bd Add tag when reference added to the page
Bug: T325713
Change-Id: Ia4abe256c7ffffa749ad6cdb537dd26091ea07da
2023-07-03 15:09:12 +00:00
Ed Sanders d7d344035c Add tag when content added, according to EditCheck heuristic
Bug: T333714
Change-Id: Id806e6d4d856aead4af98d43078c534d4d46c7f0
2023-07-03 14:43:14 +01: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
hmonroy 4a028f1336 React to hooks that are fired when inline switch is present
React to hooks fired by core when the inline diff type switch is
present. VE needs to be able to disable the inline switch
when 'visual' mode is selected and enable the switch when 'wikitext'
mode is selected. When the 'wikitext' mode is selected and there is an
inline switch, the interface needs to show the diff type format previously
selected.

Toggle using new `mw-diff-element-hidden` class that is used by core so
that there's no clashes when hidding and showing the diffs.

Bug: T331589
Depends-On: Ie6a48e495f2bb299d8b984e7c40363d534c7915b
Change-Id: I4f790370dbfeb521f3b61c4d604245f77094abe9
2023-06-26 04:20:16 +00: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 f1ce07c29d Merge "Move the diff-mode selector to the new TextSlotDiffRendererTablePrefix hook" 2023-06-06 18:26:57 +00: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