Commit graph

14661 commits

Author SHA1 Message Date
jenkins-bot f336f44813 Merge "Update VE core submodule to master (5c98d9b41)" 2024-12-11 13:45:38 +00:00
Zoë dc9cf6624a Update VE core submodule to master (5c98d9b41)
New changes:
5c98d9b41 Keep track of recently used symbols

Added i18n keys:
- visualeditor-specialcharacter-recentlyused

Local changes:

Register preference for SpecialCharacterDialog recently-used list
Implement `canUseUserConfig` platform method

Bug: T110722
Change-Id: Ie869ccd4292f87354222af6648d7ea0e5ae50387
2024-12-11 13:24:06 +00:00
Ed Sanders 3a9c8f78ba Replace x.slice(0,x.length-y) with x.slice(0,-y)
Requires y to be non-zero.

Change-Id: I033732cb78b5e3149ac26e19243bf21b143eb105
2024-12-04 18:04:20 +00:00
jenkins-bot b222377bd7 Merge "Dialogs: Go back or close when pressing escape" 2024-12-02 17:57:21 +00:00
jenkins-bot 8aa265358d Merge "MWTransclusionDialog: Remove unnecessary empty label hack" 2024-12-02 17:55:16 +00:00
Ed Sanders 03b557f167 Dialogs: Go back or close when pressing escape
Decide based on the currently available actions.

Change-Id: Ida805efbf14071967bf2359788486028fb6c9a09
2024-12-02 15:26:54 +00:00
Ed Sanders 6a26905d87 MWTransclusionDialog: Remove unnecessary empty label hack
The blocking task was resolved 7 years ago...

Change-Id: I4853af45f6ea210be9478fd1deac8efb13e47877
2024-12-02 15:25:30 +00:00
Ed Sanders 3a2df21703 Add an <html> class for the current surface's mode
Change-Id: I167a460e129969f1e25dde717df5f3cb4b67b34e
2024-12-01 21:20:37 +00:00
Ed Sanders 6d4caef304 CollabTarget: Set ve-activated on <html> instead of <body>
This is what our other targets do.

Change-Id: I2ffbee8d74612d112509065b1e5e45ebc3487e6f
2024-12-01 21:20:33 +00:00
Ed Sanders 2fb7b81caf ArticleTarget: Don't throw error on new heading node
Change-Id: I4e0566de9ffa2112d99d9d574621ce57ce8b37f2
2024-12-01 21:20:17 +00:00
jenkins-bot 0c582e359e Merge "Upstream CSS hacks from skins" 2024-11-27 16:20:08 +00:00
Jon Harald Søby f539f436dc Fix styling for #catlinks:hover in Visual Editor
Use the same color (transparent blue) as `.mw-references > li:hover`
from `ve.ce.MWReferencesListNode.less`.

Bug: T370609
Change-Id: I8d8339b4c75aa5bc51c61df870fd1684dea2b183
2024-11-27 15:39:23 +01:00
Ed Sanders 4332698408 Upstream CSS hacks from skins
Change-Id: Ic2aca1e005c5d5f89a97372de40bd8aa6f4b2aa0
2024-11-25 14:02:55 +00:00
Ed Sanders 3e28af7602 ArticleTargetSaver: Use mw.deflateAsync
mw.deflate is deprecated. mw.deflateAsync is faster in supported browsers.

Change-Id: Ia16e5823365b55b741f3184572b7bdeb5bbb1bd6
Depends-On: I722ebb03c0db7c7b3ee16cc8881e41909142cee9
2024-11-21 13:23:31 +00:00
jenkins-bot c6f6967e45 Merge "MobileArticleTarget: Make close/publish buttons fixed width" 2024-11-18 11:45:48 +00:00
Bartosz Dziewoński 02654c0086 Fix forwarding promise rejection arguments
Follow-up to arrow functions refactoring
(4db99d7a27).

Change-Id: I6ea41256d9a91552736742100630aab333375125
2024-11-14 21:38:23 +00:00
Ed Sanders e434ad65ec MobileArticleTarget: Make close/publish buttons fixed width
This aligns them with the mobile wikitext editor. At mobile
widths the difference is negligible. On tablets this distinguishes
"navigation" buttons from the surface toolbar buttons.

Bug: T344370
Change-Id: I342e3bb579afb9f26e2af743e28eedb32efa3d46
2024-11-12 23:01:05 +00:00
jenkins-bot 98d112aec0 Merge "Diff extension body contents" 2024-11-10 14:01:07 +00:00
Ed Sanders b8f032d266 Handle view tab clicks even on edit pages
This allows the proper "discard changes" dialog to show.
A few more steps of the teardown now happen in the client,
but eventually in DesktopArticleTarget#teardown we check
again if we weren't on a view page and redirect (as this
is what we do after save).

Bug: T379367
Change-Id: I995649f37e5d841b6c1784a74f3bd353adfbe69f
2024-11-08 14:05:09 +00:00
Ed Sanders 176e9c3297 CollabTarget: Use generateUniqueId
Change-Id: I69faf3b2efe70d1d880585dd41f227d2d0562594
2024-11-05 15:44:39 +00:00
jenkins-bot b7c2b41754 Merge "Remove side padding from toolbar dialogs in Vector 2022" 2024-10-30 22:42:44 +00:00
Ed Sanders d06e9dbc31 Update VE core submodule to master (0e82a6db8)
New changes:
db0f21d03 ve.ce.Surface: Check dataTransfer.files is non-empty
e1cd78933 [BREAKING CHANGE] Move selection handling code to SelectionManager
b4b63a463 Move drag/drop handling code to DragDropHandler
540272769 Use the onPaste handler for dropped content
d3f9d8485 ClipboardHandler tests: Run tests in series
1232c0420 Tests: Introduce ve.dm.example.annotateText to simplify runs of annotated text
69d7ca482 Apply an annotation to imported (pasted/dropped) text
0e82a6db8 ve.ce.ClipboardHandler: Fix async test running

Added files:
- src/ce/annotations/ve.ce.ImportedDataAnnotation.js
- src/ce/ve.ce.DragDropHandler.js
- src/ce/ve.ce.SelectionManager.js
- src/dm/annotations/ve.dm.ImportedDataAnnotation.js
- tests/ce/ve.ce.DragDropHandler.test.js

Local changes:
- Implement new selection manager architecture

Added files:
- src/ce/annotations/ve.ce.ImportedDataAnnotation.js
- src/ce/ve.ce.DragDropHandler.js
- src/ce/ve.ce.SelectionManager.js
- src/dm/annotations/ve.dm.ImportedDataAnnotation.js
- tests/ce/ve.ce.DragDropHandler.test.js

Bug: T371996
Bug: T377427
Bug: T78696
Change-Id: If8d38246badf919c32915beda7c9a14f16e62a8a
2024-10-30 17:52:56 +00:00
Ed Sanders b82cd1c975 Remove side padding from toolbar dialogs in Vector 2022
Change-Id: Idcd4491c814154a2d0474eca0e076e12295b7681
2024-10-30 17:29:13 +00:00
Ed Sanders 7ac339ce29 Diff extension body contents
Bug: T359469
Change-Id: Iad2cddcd7c86f8f4c5a9c575e871392f1942aff4
2024-10-30 14:31:06 +00:00
jenkins-bot 80eff2ac37 Merge "MWGalleryDialog: Highlight item at closest index when removing an image" 2024-10-29 14:50:15 +00:00
jenkins-bot 407bb951b8 Merge "MWGalleryItemWidget: Remove unnecessary event argument" 2024-10-29 14:50:13 +00:00
jenkins-bot 9425db2172 Merge "Update VE core submodule to master (bae9101b7)" 2024-10-29 14:17:54 +00:00
Ed Sanders 4bc814f1a0 Update VE core submodule to master (bae9101b7)
New changes:
7906a6b9e build: Updating npm dependencies
92e6a5338 TextStyleAnnotation: Don't register abstract base class
456ca9b2e Localisation updates from https://translatewiki.net.
a68ba80d2 Get all annotations by ranges
dc49d9592 Demos: Default to WMUI theme
222ac7d23 Add unit tests for ve.dm.BranchNode#getAnnotationRanges
ba73b9e91 Return annotation ranges in lexicographic order
6e40aa524 Localisation updates from https://translatewiki.net.
1a4640a4a ve.ce.Surface: Remove unused $deactivatedSelection and $findResults
9455e0f0a ve.ce.Surface: Replace text/xcustom clipboard storage with a custom key
ddd14aa9b [BREAKING CHANGE] Move paste handling code to ve.ce.ClipboardHandler
19f0e500b CollabProcessDialog: Replace mw.user.getName with platform method
ecd607353 Implement pasteSourceDetectors
bae9101b7 Localisation updates from https://translatewiki.net.

Added files:
- src/ce/ve.ce.ClipboardHandler.js
- tests/ce/ve.ce.ClipboardHandler.test.js

Local changes:
* Implement new paste handler architecture
* Use new clipboard key

Bug: T360624
Bug: T376306
Bug: T78696
Change-Id: Iea10d32b6132ae364d486cc6b96895bb937ac944
2024-10-22 15:31:24 +01:00
Ed Sanders 3dfef738e2 MWGalleryDialog: Highlight item at closest index when removing an image
Bug: T373981
Change-Id: Ib0edc97279c6ec4e0529197d9beb1d7c9c51ee28
2024-10-21 17:18:43 +00:00
Ed Sanders 332188807a MWGalleryNode: Check node still exists when updating
Bug: T377717
Change-Id: I13f9c1ced3e59d4d88aaca02b884d06cc57b11a6
2024-10-21 14:03:15 +01:00
Ed Sanders 4cd67004de editcheck: Remove mw.editcheck.Diff
This object just contained a pointer to the surface and dm,
and had one utility method.

Move the method to mw.editcheck, and pass around a surface model
or document model to other methods as appropriate.

Change-Id: Ie81d76dea2823b633328f982ee20027808bfc8e3
2024-10-17 17:10:02 +01:00
jenkins-bot c2dd7617a3 Merge "ve.ce.MWPreNode: Fix primaryCommandName" 2024-10-08 16:38:41 +00:00
Ed Sanders 67b5e1c5e1 ve.ce.MWPreNode: Fix primaryCommandName
Change-Id: I20f3c946ef9a7436756dc298fa9609ffd05ce5a1
2024-10-08 15:16:02 +01:00
Bartosz Dziewoński 365cefa878 tests: Use real mw.Api in ve.ui.MWTemplateTitleInputWidget tests
Otherwise the changes to mw.widgets.TitleWidget in
Iec338e9f595b452c19ce8e74eb81339fbce11640 cause the test to fail.
To avoid making real API requests, use fake server instead.

Change-Id: I7ff705af79760e33200a2dfbfdd05138c18bb110
2024-10-07 19:24:43 +00:00
Bartosz Dziewoński e6f1698bcb Fix "target is undefined" exception when loading fails
When loading the editor fails, getTarget() should return a rejected
promise. However, the rejection handler that logs the loading error
also accidentally converted the promise to a resolved one.

The easiest way to reproduce is to enable offline mode in your
browser's developer tools, then click "Edit".

Change-Id: Icf6ea14f4d4e3afcb6608f4c0c49b76c297bf9a3
2024-10-07 19:24:43 +00:00
Ed Sanders 365950cbe6 Get attached node from document model, instead of surface
Change-Id: I37b3dfeabe7666878884d21113f928691363a39a
Depends-On: I813c341cb1a0751443880d2e05aa209d3d973a00
2024-10-01 15:01:43 +00:00
Ed Sanders cefa56ecb9 Use fixed font size for UI componenets in Vector 22
Use rem's to set the font size of the toolbar and local/global
overlays, as the font size is now variable in that skin.

Bug: T373875
Change-Id: Ib2511debd01dbc0cf03ff6d92cd9bfe71078c387
2024-09-05 11:21:08 +01:00
Ed Sanders ac652a2e36 MWGalleryItemWidget: Remove unnecessary event argument
Listeners will already know which object emitted the event.
Currently this event is used once as a aggregate event,
(as 'editItem' in the ve.ui.MWGalleryGroupWidget constructor)
in which case the emitting object is already prepended as the
first argument (as documented in OO.EmitterList.prototype.aggregate).

Change-Id: I490f368af8e9cae60eacac918bf83702999f705b
2024-09-04 10:58:06 +01:00
jenkins-bot f363c943cc Merge "Allow &veaction=editsource to load 2017WTE regardless of user prefs" 2024-08-30 06:20:42 +00:00
jenkins-bot 1b777d45e0 Merge "Fix exception editing cross-wiki redirects" 2024-08-29 22:54:21 +00:00
Mahmoud Al-Qudsi a9278f654b Fix exception editing cross-wiki redirects
As described in T326169, when editing a (manually created) cross-wiki redirect,
VisualEditor will throw a null dereference exception causing it to fail to load
in the browser (looking like it is just taking forever to load).

This patch prevents the exception from occurring by not attempting to write to
the null object.

Bug: T326169
Change-Id: I50fa803c7b4ce65dac1fe345431d8b8f9d0b3d61
2024-08-28 13:27:09 -05:00
Bartosz Dziewoński b4fc696ad5 Reattempt save as temporary user only when we were previously anon
…but not when we were previously logged-in. Temporary accounts no
longer leak IP addresses, but it's still not nice to lose attribution
of edits by logged-in users.

Follow-up to 317d6dd724.

Bug: T345975
Change-Id: I24c786c0f060921f773e1d6d1c7463f1cc79aab2
2024-08-27 23:23:11 +02:00
jenkins-bot 24c53a321e Merge "Reattempt save when refreshing temporary user if session expired" 2024-08-27 13:49:58 +00:00
Bartosz Dziewoński c93d4a9695 Allow &veaction=editsource to load 2017WTE regardless of user prefs
Bug: T239796
Change-Id: I0391d44d15763980cfb48b2945bac35e5b08e930
2024-08-26 20:13:36 +02:00
Timo Tijhof 07a132d310 tests: Force templateDataInstalled condition for MWTemplateTitleInputWidget
Change-Id: I730a0e53547d4e7510fcec09905ea98030490c0d
2024-08-22 00:29:16 +01:00
jenkins-bot fcce9b0b89 Merge "Move edit section colorings to core" 2024-08-17 14:19:55 +00:00
jenkins-bot b54f4ebb28 Merge "Fix getTemplateDataQueryTitle() when the title ends with a newline" 2024-08-16 15:30:57 +00:00
Ebrahim Byagowi 84557b6d13 Move edit section colorings to core
Bug: T372436
Depends-On: I691dbef2313e006de4b7d096232c531d81bdd380
Change-Id: If6c606cd6d3816b9286aee0ffd4d96be704521d4
2024-08-14 22:24:00 +03:30
Jamie Kuppens 317d6dd724 Reattempt save when refreshing temporary user if session expired
A notice already appears and informs the user of the visual editor that
they're not logged in if their session has ended. Showing an additional
error dialog informing the editor of this when saving changes is not
needed.

Bug: T345975
Change-Id: I20a904dbc6d3c2f0d08e4ceea27e35ee1b65bb71
2024-08-13 16:33:55 -07:00
jenkins-bot c3e7d584e5 Merge "Reenable Cite-related test" 2024-08-05 08:10:00 +00:00