Commit graph

1113 commits

Author SHA1 Message Date
Zoë a6f826e989 Confirm abort if saving would make a change to the underlying document
Bug: T334513
Change-Id: Ia8935b5b1acb87a351fd02d07f72875e4d7a005c
2024-04-30 16:20:45 +01:00
Ed Sanders 58f56c0418 Delete MWConfirmationDialog
Despite its generic name, this class exists just for the
template dialog and does 3 things:

1. Provides generic accept/reject override messages
2. Provides a new function signature when the prompt
   and success callback are passed
3. Focuses the delete button

(1) and (2) can be provided by a local helper function.
(3) should be implemented upstream, although given this
was done to prevent users taking destructive actions
accidentally I'm not sure why this should be overridden
here.

Change-Id: Id5aa018310eded7a3552a182d19ca16b040abcbd
2024-04-16 14:46:23 +01:00
Ed Sanders b6a7d8c8da Update VE core submodule to master (70279c60a)
New changes:
70279c60a Refactor SpecialCharacterPage into SymbolListPage + SymbolListBookletLayout

Local changes:
* Use new special character layout

Added files:
- src/ui/layouts/ve.ui.SymbolListBookletLayout.js
- src/ui/pages/ve.ui.SymbolListPage.js
- src/ui/styles/layouts/ve.ui.SymbolListBookletLayout.less

Deleted files:
- src/ui/pages/ve.ui.SpecialCharacterPage.js

Bug: T120512
Change-Id: I357595ae490b36bcf5dd477a95c5684f3a246753
2024-03-19 20:03:40 +01:00
Ed Sanders 9ee1b51fbe Move CSS files to LESS
Change-Id: Ic818efe7315187bf96ead7bd6468ecb3d44d988d
2024-03-19 13:56:30 +00:00
Ed Sanders 960edae818 Move dialog CSS files to LESS
Change-Id: Ic91cbb285675116e62cb2546b21927c704ad5e65
2024-03-19 12:46:22 +00:00
Ed Sanders b446420306 Update VE core submodule to master (e32eea10e)
New changes:
91410d266 Localisation updates from https://translatewiki.net.
6fc7ff406 ve.collab: Make dialogs closeable
f5572e584 Ensure GeneratedContentNodes have at least one non-void element
c33a7f9d1 Support LESS files
a9a139518 Rename all CSS files to LESS
f7925398d Nest LESS files

Added files:
- demos/ve/demo.less
- lib/less/less.js
- src/ce/styles/nodes/ve.ce.ActiveNode.less
- src/ce/styles/nodes/ve.ce.AlienNode.less
- src/ce/styles/nodes/ve.ce.BranchNode.less
- src/ce/styles/nodes/ve.ce.CheckListNode.less
- src/ce/styles/nodes/ve.ce.FocusableNode.less
- src/ce/styles/nodes/ve.ce.ParagraphNode.less
- src/ce/styles/nodes/ve.ce.ResizableNode.less
- src/ce/styles/nodes/ve.ce.RootNode.less
- src/ce/styles/nodes/ve.ce.SectionNode.less
- src/ce/styles/nodes/ve.ce.TableCellNode.less
- src/ce/styles/nodes/ve.ce.TableNode.less
- src/ce/styles/ve.ce.Surface.less
- src/init/sa/styles/ve.init.sa.Platform.less
- src/themes/apex.less
- src/themes/wikimediaui.less
- src/ui/styles/contextitems/ve.ui.LinearContextItem.less
- src/ui/styles/contextitems/ve.ui.LinkContextItem.less
- src/ui/styles/dialogs/ve.ui.CommandHelpDialog.less
- src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.less
- src/ui/styles/dialogs/ve.ui.ProgressDialog.less
- src/ui/styles/dialogs/ve.ui.SpecialCharacterDialog.less
- src/ui/styles/dialogs/ve.ui.TableDialog.less
- src/ui/styles/dialogs/ve.ui.ToolbarDialog.less
- src/ui/styles/elements/ve.ui.DiffElement.less
- src/ui/styles/inspectors/ve.ui.FragmentInspector.less
- src/ui/styles/inspectors/ve.ui.LanguageInspector.less
- src/ui/styles/tools/ve.ui.FormatTool.less
- src/ui/styles/ve.ui.DebugBar.less
- src/ui/styles/ve.ui.DesktopContext.less
- src/ui/styles/ve.ui.Overlay.less
- src/ui/styles/ve.ui.Surface.less
- src/ui/styles/ve.ui.TableLineContext.less
- src/ui/styles/ve.ui.Toolbar.less
- src/ui/styles/widgets/ve.ui.AuthorItemWidget.less
- src/ui/styles/widgets/ve.ui.CompletionWidget.less
- src/ui/styles/widgets/ve.ui.ContextOptionWidget.less
- src/ui/styles/widgets/ve.ui.DimensionsWidget.less
- src/ui/styles/widgets/ve.ui.LanguageInputWidget.less
- src/ui/styles/widgets/ve.ui.LanguageSearchWidget.less
- src/ui/styles/widgets/ve.ui.TargetWidget.less

Deleted files:
- demos/ve/demo.css
- src/ce/styles/nodes/ve.ce.ActiveNode.css
- src/ce/styles/nodes/ve.ce.AlienNode.css
- src/ce/styles/nodes/ve.ce.BranchNode.css
- src/ce/styles/nodes/ve.ce.CheckListNode.css
- src/ce/styles/nodes/ve.ce.FocusableNode.css
- src/ce/styles/nodes/ve.ce.ParagraphNode.css
- src/ce/styles/nodes/ve.ce.ResizableNode.css
- src/ce/styles/nodes/ve.ce.RootNode.css
- src/ce/styles/nodes/ve.ce.SectionNode.css
- src/ce/styles/nodes/ve.ce.TableCellNode.css
- src/ce/styles/nodes/ve.ce.TableNode.css
- src/ce/styles/ve.ce.Surface.css
- src/init/sa/styles/ve.init.sa.Platform.css
- src/themes/apex.css
- src/themes/wikimediaui.css
- src/ui/styles/contextitems/ve.ui.LinearContextItem.css
- src/ui/styles/contextitems/ve.ui.LinkContextItem.css
- src/ui/styles/dialogs/ve.ui.CommandHelpDialog.css
- src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css
- src/ui/styles/dialogs/ve.ui.ProgressDialog.css
- src/ui/styles/dialogs/ve.ui.SpecialCharacterDialog.css
- src/ui/styles/dialogs/ve.ui.TableDialog.css
- src/ui/styles/dialogs/ve.ui.ToolbarDialog.css
- src/ui/styles/elements/ve.ui.DiffElement.css
- src/ui/styles/inspectors/ve.ui.FragmentInspector.css
- src/ui/styles/inspectors/ve.ui.LanguageInspector.css
- src/ui/styles/tools/ve.ui.FormatTool.css
- src/ui/styles/ve.ui.DebugBar.css
- src/ui/styles/ve.ui.DesktopContext.css
- src/ui/styles/ve.ui.Overlay.css
- src/ui/styles/ve.ui.Surface.css
- src/ui/styles/ve.ui.TableLineContext.css
- src/ui/styles/ve.ui.Toolbar.css
- src/ui/styles/widgets/ve.ui.AuthorItemWidget.css
- src/ui/styles/widgets/ve.ui.CompletionWidget.css
- src/ui/styles/widgets/ve.ui.ContextOptionWidget.css
- src/ui/styles/widgets/ve.ui.DimensionsWidget.css
- src/ui/styles/widgets/ve.ui.LanguageInputWidget.css
- src/ui/styles/widgets/ve.ui.LanguageSearchWidget.css
- src/ui/styles/widgets/ve.ui.TargetWidget.css

Bug: T359893
Change-Id: If2f2c73b43901f478d9c905a2d626cc692d2a192
2024-03-19 11:10:55 +00:00
Ed Sanders 13ae41f74b ve.init.MWVESwitchConfirmDialog: Convert files to LESS
Change-Id: Iacb3ee99a3d828d23534e2929a78c469d4af7c16
2024-03-14 11:37:26 -07:00
Ed Sanders d5d2fd0541 Convert ve.init.MWVESwitchPopupWidget.css to LESS
Change-Id: I4c394adc7a510b85b346366f53daf05b96811393
2024-03-11 17:39:22 -07:00
David Lynch 49d5c26c08 ve.collab: Move BetaFeature into its own file
Avoids requiring a dependency on the BetaFeatures extension.

Tell the phan config to include the BetaFeatures checkout so it'll pass
on that file, though. (Same as DiscussionTools.)

Change-Id: I258d3be59ea9cf0a798d93f0f8b1fd18a455d45a
2024-03-06 14:50:14 -06:00
Ed Sanders b3853721c8 ve.collab: Create BetaFeature
Change-Id: I36b8361f4fce8d690841e9048498bd5d52131942
2024-03-07 00:45:39 +08:00
Ed Sanders 2359b587ed ve.collab: Create ResouceLoader module
Change-Id: I2fd9d604521901e3ccdf862afc0a4f2099c533b1
2024-03-06 16:31:19 +00:00
Ed Sanders 80e8d65cff Introduce ApiEditCheckReferenceUrl
Checks the URL against SpamBlacklist, and the new
BlockedExternalDomains list in AbuseFilter.

Bug: T349261
Change-Id: I39896ae0d59db4aa918b08b3b2eaacb52bfe4a03
2024-02-22 15:39:43 -06:00
jenkins-bot 8d70615b5e Merge "Enrollment for the edit check a/b test" 2024-02-19 15:27:16 +00:00
David Lynch e7861de221 Enrollment for the edit check a/b test
The enrollment happens in ArticleTargetLoader so that the bucket will be
set for init logging.

Bug: T342930
Depends-On: I9c7c0fb52a6ec68609df6b518c7d35ddd98a95bf
Change-Id: I03c8dc8beb2eb267c052b856a30343ecab3a7657
2024-02-16 10:18:21 -06:00
Ed Sanders 265f7a5722 Separate Apex fixes from Monobook fixes
Change-Id: I5ac462ecb66d2e16910905ca62db0d9167d843ea
2024-02-13 13:58:55 +00:00
Umherirrender 4e94b88f99 Remove the VisualEditorHookRunner service
The HookRunner class is a lightweight class and not designed to be a
service, the needed HookContainer should be injected instead and a hook
runner created when needed.
The overhead from the service wiring is the same as using new objects
when needed.
This follows practice from core and the documentation in
core/docs/Hooks.md in the section "Hook runner classes"

Change-Id: Ib42281dfae8a5a260005d82ed3bb7da12e1b645e
2024-01-31 20:02:36 +01:00
Umherirrender dda33540d4 Use namespaced OOUIImageModule in extension.json
Change-Id: Icc2fbf2dc2f9c3eefd45a68caa12fe6f775cb8f5
2024-01-13 22:24:20 +01:00
James D. Forrester 2ab7f87bac extension.json: Drop RL targets definitions, no longer honoured
Bug: T328497
Change-Id: I0ba090e37cef19219a2145b3c062b3a3c98f0e95
2024-01-12 08:54:53 -05:00
Ed Sanders 6b23d6a731 Add files missing from lib/ve's modules.json to extension.json
Mostly just tests, but also ve.ce.css which contains bidi isolate
rules used by LanguageAnnotation.

Change-Id: I003c62a6944854b2df77f1bb12f21794d968f021
2023-12-08 20:06:34 +00:00
Ed Sanders b19883e8d8 Update VE core submodule to master (c788040b1)
New changes:
ace73e1dd Show selection size in merge cells context item
a5a3c576d build: Run npm audit --fix as of 2023-12-07
1fd5de1cf build: Upgrade svgo from 3.0.2 to 3.0.5 and re-run

New i18n keys:
visualeditor-table-selection-dimensions

New files:
src/ui/styles/contextitems/ve.ui.MergeCellsContextItem.css

Change-Id: I30653d829ae77b5f356eba00e476ccdeba65d621
2023-12-08 16:40:03 +00:00
Ed Sanders 876a947a7b Move EditCheck files to ./editcheck and structure as a sub-extension
Change-Id: I4085223a93b37e601b3627fc2d6db7978cac820e
2023-11-28 15:56:43 +00:00
jenkins-bot 3c609d13c5 Merge "Convert MWSaveDialog.css to less" 2023-11-17 13:41:27 +00:00
Ed Sanders 7545b46d16 Convert MWSaveDialog.css to less
Change-Id: I13d23492bcd7264076df0679a6405d2e5969919e
2023-11-17 13:12:09 +00:00
jenkins-bot 8411bd0954 Merge "Remove handling of Minerva edit links" 2023-11-16 18:37:24 +00:00
jenkins-bot ec554b48be Merge "Drop meaningless version number 0.1.2" 2023-11-14 21:11:06 +00:00
Ed Sanders 7a3120d9d5 Remove unused CSS classes
Unused since I5839ba62fe4.

Change-Id: I927e64f14f672b9fca6c7e8c6806a38cea07382a
2023-11-08 19:25:32 +00:00
Bartosz Dziewoński 89545d2b53 Update VE core submodule to master (df7099eab)
New changes:
b3a237415 Grunt: Simplify ignore pattern for node_modules
78bbdf1d4 Localisation updates from https://translatewiki.net.
538d8ad4d Make VisualDiff#compareNodes static
8652432c4 Tree diffs: Add failing test case for templates in table diff
79eebb566 Tree diffs: Use VisualDiff#compareNodes
32d8c3180 Tree diffs: Use compareElementsUnannotated when comparing structural nodes
53970774a Visual diff: Describe list type changes
23cd3d886 Update diff-match-patch, removing cleanupSemanticLossless

Bug: T332791
Bug: T337698
Bug: T346424
Bug: T350032
Change-Id: I1707d50b06703aae74c654e354cce95541ac5a96
2023-11-07 21:41:49 +01:00
Bartosz Dziewoński 5667832c1b Attach content to teleport target instead of <body>, remove Vector hacks
In MediaWiki, OO.ui.getTeleportTarget() is overridden to return
a different element (itself attached to body), which is supposed
to be styled appropriately by skins (e.g. z-index above any
floating header, font-size same as body text, etc.).

As a result, we no longer need to do weird things with the
'vector-body' class to achieve correct font size on Vector,
and we can remove some font-size overrides for Vector and MonoBook.

Bug: T348288
Bug: T339058
Change-Id: I6329b3023573b3dcfc8f471c4693be9bb1e9e430
2023-11-06 14:29:12 +00:00
Ed Sanders 3bbcb66e9a Wikitext table tool: Use different message for caption placeholder
The wikitext table tool is re-using messages meant for other
things anyway, so might as well use a message that is still
in use elsewhere, as opposed to one for a tool that was removed
7 years ago (in Ife3f3505b845d).

Change-Id: I305f5f5a67e0340f89160e6654ad86f81609f9ab
2023-11-03 15:48:55 +00:00
Ed Sanders 284fb20da4 Restore help toolbar title
Was lost when we converted it from a PopupTool
in I81d217bc1ab9.

Also visualeditor-help-title is unused since that commit,
and remove debugging code.

Change-Id: Ic1d40bac8ef76fbb6f009dd8cecec8dc74c1aa4b
2023-11-03 15:38:40 +00:00
Bartosz Dziewoński ef0d37cc97 Update VE core submodule to master (af9ff31db)
New changes:
ea961803e Localisation updates from https://translatewiki.net.
c886092d3 Attach content to teleport target instead of <body>
bacf54a22 Localisation updates from https://translatewiki.net.
c1562081b Consistent usage of header/title in toolbar groups
f8a25c2ca Remove unused messages
af9ff31db Fix remaining uses of 'parent'->'super'

Local changes:
* Remove references to unused messages

Bug: T120821
Bug: T348288
Change-Id: I82dbbc5a8f82ca6bb5b225cb1c2e1734470ed9c8
2023-11-02 23:11:44 +01:00
thiemowmde a6aa681d51 Drop meaningless version number 0.1.2
This number is from 2020. It's certainly meaningless by now. Even
causes extra confusion, see e.g.
https://www.mediawiki.org/wiki/Topic:Xsi5ull7fkcnbzuw

Depends-On: If1bbb57919af4948cecb0a63472ac323175f90c1
Depends-On: Iaae0ac43174f471d8d210958704f98182e9979c5
Change-Id: Iaa56abbc7b54f4a551ca330ff08d542cb5a2b895
2023-10-30 08:15:20 +00:00
Bartosz Dziewoński 0167346cbb ve.ui.MWEditSummaryWidget: Use built-in 'allowLinebreaks' option
New in OOUI v0.48.2.

Change-Id: I28dfa2405167ee4b9d9cd2fd3bb3e15498247ac6
2023-10-25 08:26:59 -04:00
Bartosz Dziewoński 8ec439d417 Remove handling of Minerva edit links
After the other changes in T346944, desktop Minerva can display
multiple edit tabs and section edit links without these hacks.

Bug: T346944
Change-Id: I3721f9387303386493664366988961242a26dba5
2023-10-24 03:27:09 +02:00
jenkins-bot ed18e0480a Merge "Fix handling of 'edit-local' and 'create-local' messages" 2023-10-13 15:31:12 +00:00
jenkins-bot 0e370a84cd Merge "Remove 'VisualEditorTransitionDefault' and AutodisableVisualEditorPref.php" 2023-10-13 15:27:59 +00:00
Bartosz Dziewoński fa889154c2 Fix handling of 'edit-local' and 'create-local' messages
* Remove incorrect overrides in VisualEditorTabMessages. Since
  I44bd632682d5cc52b2660ad72a492f95a04be36e, the interface should use
  'skin-view-edit-local' and 'skin-view-create-local' respectively.

* Fix the fallback mechanism in DesktopArticleTarget.init.js
  to handle these keys correctly.

Change-Id: I7dad7e3a6fb920c5caf175e0e7500fd0c4b4d0ae
2023-10-12 20:05:06 +02:00
jenkins-bot d3b933726e Merge "config: Mention ecenable in edit check config" 2023-10-05 14:50:10 +00:00
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