Commit graph

78 commits

Author SHA1 Message Date
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 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
Ed Sanders fe14ffb76b Output config var when VE disabled by hook
Currently we only disable the desktop init code when this hook
returns false, but other integrations may want to know about this,
e.g. MobileFrontend.

Bug: T174180
Change-Id: I0268239cc9ea2d397140e617fcb6e4e104a75f31
2023-05-26 18:42:19 +00: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 1c5dbf6f79 Merge "Revert "onDifferenceEngineBeforeDiffTable: Return early on Special pages"" 2023-05-18 17:20:49 +00:00
HMonroy d88cd64e52 Revert "onDifferenceEngineBeforeDiffTable: Return early on Special pages"
This reverts commit f693822f64.

Reason for revert: Reworking

Depends-On: Idc96036564291a3887935dbff4ec476f4ad07068
Change-Id: Iee3f41c1b096b82ee61ecca9ddc5fcd044f1237c
2023-05-18 16:45:15 +00:00
HMonroy ba687994d3 Revert "onDifferenceEngineBeforeDiffTable: Update comment"
This reverts commit d7262d8483.

Reason for revert: Reworking

Change-Id: Idc96036564291a3887935dbff4ec476f4ad07068
2023-05-18 16:45:11 +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
TheresNoTime d7262d8483 onDifferenceEngineBeforeDiffTable: Update comment
Bug: T336582
Follows-up: I251db11e8cb5b785744ee2c111d20a346937b78c
Change-Id: Ic1a6a3d1fe50aab163ce0fb17ae7379bff172adb
2023-05-16 17:38:05 +00:00
TheresNoTime f693822f64
onDifferenceEngineBeforeDiffTable: Return early on Special pages
Add a check of `$diff->getTitle()->getNamespace()` to ensure early
return on NS_SPECIAL pages.

Bug: T336582
Change-Id: I251db11e8cb5b785744ee2c111d20a346937b78c
2023-05-16 12:39:19 +01:00
Sam Wilson 00abad4861 Don't show the diff-mode selector if not viewing a diff
The DifferenceEngineBeforeDiffTable hook is run when viewing a
diff after switching from visual to source editing, but the
mode selection widget shouldn't be shown then.

Bug: T324759
Change-Id: Ieb8a1b77928201a45635af46635b902cac01a36d
2023-05-10 18:53:37 +00:00
Bartosz Dziewoński ec425a06af Fix one more place where we tried to set preferences for temp users
Follow-up to 3b1a2d9dce.

Bug: T332415
Bug: T332435
Change-Id: I1139f1f3421fe43dfd5e3125b18d40421930a0f1
2023-05-10 04:20:03 +02:00
gerritbot a6c5082fa3 Update moved class EditPage
See T321882. Moved in Ibefc44eb64aed

Bug: T321681
Change-Id: I5faaf6c59e96154eba0a4b199e47ecef49a89c72
2023-05-06 21:21:44 +00:00
jenkins-bot 3f43c00c2b Merge "Remove unused preferences code for "alpha" visual editor opt-in" 2023-05-05 16:39:13 +00:00
jenkins-bot 7c0259a3c3 Merge "Handle temporary users when dealing with user preferences" 2023-05-05 15:55:49 +00:00
Bartosz Dziewoński edec1ab393 Remove unused preferences code for "alpha" visual editor opt-in
Change-Id: I60601874f9442992c4f844304a842cf640f5b618
2023-05-05 16:22:46 +02:00
Bartosz Dziewoński 83d3d1f3ba Rephrase visual editor disable preference label
Visual editor is not in beta, and this preference is not temporary.

Change the message key to avoid outdated on-wiki overrides.

Unfortunately the internal preference name still has "betatempdisable"
in it. We should investigate renaming it later.

Bug: T197282
Change-Id: If1475a18474e85cd3a260224c738d087d472af70
2023-05-05 16:15:43 +02: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
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
jenkins-bot 5c89247be9 Merge "Use new showPendingTakeover OutputPage method" 2023-04-21 13:11: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 adc0bcdfcd Remove the BetaFeatures integration for historical visual diffs
Bug: T333448
Change-Id: If4f732851a42802b612cef618196c9854e2cf9da
2023-04-18 22:34:05 +02:00
David Lynch 7fb5663188 Don't hook CustomEditor for MobileFrontend requests
Bug: T334263
Change-Id: I7ccf1ba7e8f227c236a6244bfa91a2b8a9fd5765
2023-04-10 22:17:16 +00:00
David Lynch 99336933b3 Use new showPendingTakeover OutputPage method
Depends-On: I8f25f53a05ce0437b0e9f63033cc151213c797bf
Change-Id: Ib9a09514ed3da614ff8a654ae5b84a3a5b2ce886
2023-04-06 17:20:30 -05:00