Commit graph

14521 commits

Author SHA1 Message Date
jenkins-bot aac7f99742 Merge "ve.ui.MWEditSummaryWidget: Use built-in 'allowLinebreaks' option" 2023-10-26 15:55:41 +00:00
Ed Sanders 1fcf167028 Template dialog: Use wrapping/expanding input for "line" inputs
Bug: T348482
Change-Id: I5cbbd84723c042dee176be8d77a7beec7d86e226
2023-10-26 09:16:24 -05:00
Ed Sanders c6f732914f Template dialog: Remove height override of collapsed LazyMultilineTextInputWidget
The default rendering is already correct unless there are more
than 2 lines of text present.

Change-Id: I5be936d75f81dcbbb58793d93796240540555124
2023-10-26 14:22:10 +01:00
jenkins-bot 60b7420e3f Merge "Media Dialog: make the alt field wrap and autosize for longer values" 2023-10-26 12:48:31 +00:00
David Lynch e2a7592bab Media Dialog: make the alt field wrap and autosize for longer values
Bug: T349319
Change-Id: I60e0a9c85f24132651007b436f146be801e77ebb
2023-10-26 12:20:05 +00:00
Arlo Breault f909f87b02 Roundtrip media tag name in galleries
This should have been part of
If5dc6b794dacd6973d3b2093e6b385591b91d539

Bug: T348703
Change-Id: I85f83d8b336ab4d6799bbe8007ef0441570a84ca
2023-10-25 13:29:19 -04:00
Arlo Breault 2497a5254e Set alt in data-mw for non-img media
Follow up to I02ea8421e468635ba6297bb5cda488a5a79c9a1d the depends on
I7a5c24f6ffc15ff0455adf5b025b695ee71501b6 in Parsoid.

Note that the mediaTag isn't currently being passed around for gallery
image nodes so, for example, a <video> becomes an <img> as is.  But,
that's independent of this patch, and a follow up will fix it.
Noted in T348703#9278332

Bug: T348703
Bug: T214603
Change-Id: I5f7d3dfe0a41fac1568c97dccc41209c14e741d0
2023-10-25 13:23:47 -04: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
jenkins-bot 07f4a7b3b1 Merge "styles: Replace WikimediaUI Base vars with equivalent skin variables" 2023-10-25 09:42:25 +00:00
Volker E fa3f2781b7 styles: Replace WikimediaUI Base vars with equivalent skin variables
Replacing several values with MediaWiki skin variables featuring new
Codex design tokens, available since >= v1.41.0.

The values are 1:1 visual replacements in the default Codex
'WikimediaUI' theme, a continuation of the base vars, and the default
for Vector and MinervaNeue skins.

Also replacing
- other static color values with variables
- and outline value as the Codex default brings an accessibility
  advancement for free

Bug: T334934
Change-Id: I512427803cffce1c16879015c45cf1e35fe17480
2023-10-25 09:30:56 +02:00
Translation updater bot c599481ad9 Localisation updates from https://translatewiki.net.
Change-Id: I924ae372146604460c0cc04821c879c5cdd44233
2023-10-24 09:38:59 +02: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 7601bcd9f3 Merge "Gallery image nodes: fall back to alt attributes in container mw-data" 2023-10-16 18:59:32 +00:00
David Lynch c65662ebfc Gallery image nodes: fall back to alt attributes in container mw-data
Video thumbnails have no alt attributes, and so we were causing dirty
diffs in any edit of a page that had a gallery containing a video.

Bug: T348703
Change-Id: I02ea8421e468635ba6297bb5cda488a5a79c9a1d
2023-10-16 11:58:50 -05:00
jenkins-bot a06398c685 Merge "Don't try to update tab text if a custom message is incompatible" 2023-10-13 15:31:36 +00:00
jenkins-bot ed18e0480a Merge "Fix handling of 'edit-local' and 'create-local' messages" 2023-10-13 15:31:12 +00:00
Bartosz Dziewoński a60b3719f6 Don't try to update tab text if a custom message is incompatible
Some wikis customize messages, e.g. 'skin-view-create-local', in ways
that are not compatible with the client-side message parser.

Bug: T306807
Change-Id: Ie2f2ba4bba3b5b6f4fd6dbed6773d87f096a8944
2023-10-12 21:01:39 +02: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
Translation updater bot d54f6459e1 Localisation updates from https://translatewiki.net.
Change-Id: If46b98030d4a01ec5646a4f6ab6e5710fdfdc629
2023-10-10 08:53:08 +02:00
David Lynch 9ed539235c Edit check: avoid a hardcoded "continue" in the rejection dialog
Change-Id: I6a771dd6a7508fc44c1d8c67812d6b4b6111cb7a
2023-10-09 10:02:19 -05:00
David Lynch 87145e818a Edit check: stop an error on save if no reference-needing content added
saveProcessDeferred will only exist if content was actually added. This
wasn't causing any functional issues, just an error in the console after
you save.

This issue was introduced via I1dccc3c.

Bug: T344382
Change-Id: Icb0c29b64d960308343ddbb3f9d2ee641552b814
2023-10-07 17:47:53 +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 8c21352cd5 Merge "Fix wikitext mixed toggling" 2023-10-03 21:31:20 +00:00
hmonroy 3e223bdf52 Fix wikitext mixed toggling
Allow Core to handle the toggling for Wikitext when the inline switch is
present to avoid duplicated functionality.

Bug: T345836
Bug: T346213
Bug: T346299
Depends-On: Ib88836f13cdb5cd2344e3ba12f6c942baa0fc1f1
Change-Id: I3bb9fcabe17a20c9934274766e3335f63d51aac4
2023-10-03 16:15:37 +00:00
Ed Sanders 70c116a17a Edit check: Simplify "experience" config to "maximumEditcount"
There's no product need for anything other than an upper limit
on edit count. If one arises in the future we can adjust accordingly,
but better to keep the JSON, and any UI implementation, simple
for now.

Change-Id: I892847ad78b19695f0f0f664002d3c566f7806de
2023-10-03 16:20:51 +01:00
Translation updater bot 47dc22d6c0 Localisation updates from https://translatewiki.net.
Change-Id: I33a2510f8dcc7b2ff9f05867839b7e5ea1fe3d23
2023-10-03 09:33:33 +02:00
Translation updater bot d6e9e9af06 Localisation updates from https://translatewiki.net.
Change-Id: I4a17e4464c6d0fae1a737003dabb7d75408515a0
2023-10-02 10:58:37 +02:00
Translation updater bot 63d4d6966b Localisation updates from https://translatewiki.net.
Change-Id: I23a7e91c0da62b69512585da8ad4187e108a1309
2023-09-27 09:21:21 +02:00
jenkins-bot de9b3936b8 Merge "Update comment w/ rename of Article::getRedirectHeaderHtml()" 2023-09-26 19:35:23 +00:00
Translation updater bot aa645e7381 Localisation updates from https://translatewiki.net.
Change-Id: I34cce5cd5975157a7b45409abf0863343a90c29a
2023-09-26 08:45:13 +02:00
thiemowmde c581f0e3bc Favor jQuery's .toggleClass() to reduce code duplication
Change-Id: Ic616ffbfac410849413e8fad6dde260514884efb
2023-09-25 18:59:10 +00:00
Translation updater bot 112f7af925 Localisation updates from https://translatewiki.net.
Change-Id: I4739ba42495affb3ad1cf9476ae328ae6655e41d
2023-09-25 08:47:16 +02:00
Translation updater bot 8488367377 Localisation updates from https://translatewiki.net.
Change-Id: I55853ad501fa7e2a550f25aaf44e81c38c44fcad
2023-09-22 08:47:50 +02:00
jenkins-bot 29689414d4 Merge "Update banana check to use config.MessagesDirs" 2023-09-21 15:07:35 +00:00
Ed Sanders 6730748707 Update banana check to use config.MessagesDirs
Add missing qqq strings so the tests will pass.

Bug: T346170
Change-Id: I7c43cb6db24d5c98341de2de4387689982b35e96
2023-09-21 09:18:30 -05:00
Ed Sanders 27c90dcf0a Edit check: Handle the manual citation workflow
Assume that the next window closing promise is from
the plain "Cite" dialog and use that data to resolve
the edit check promise, instead of resolving it
as soon as a manual type is selected.

Bug: T346405
Change-Id: I5b7f084269c9e870446529f63aed27f8ed995e8c
2023-09-18 18:42:01 +01:00
Translation updater bot 00ad2c5ab5 Localisation updates from https://translatewiki.net.
Change-Id: I75bf03b1e85865b55017052e2212e8d52451223e
2023-09-18 08:45:22 +02:00
C. Scott Ananian 43e4a3363b Update comment w/ rename of Article::getRedirectHeaderHtml()
Change-Id: I20f29af6856129bd952bbb003ae967376a203984
Depends-On: I4d0de0e72473ae039dca420a2733bc746d8c2951
2023-09-15 15:14:19 -04:00
jenkins-bot 22bca2a005 Merge "Don't offer visual diffs for non-wikitext pages" 2023-09-14 14:42:03 +00:00
Bartosz Dziewoński 0cfaaa5ff4 Don't offer visual diffs for non-wikitext pages
Bug: T346252
Change-Id: I1be1690b0414bb643f137f74c421ba1034563c7b
2023-09-14 14:22:32 +02:00
Translation updater bot fc6a68a212 Localisation updates from https://translatewiki.net.
Change-Id: I48c83d915f5201021c30a0d194e39549557f1634
2023-09-13 08:32:50 +02:00
Ed Sanders cba0bf6da1 Edit check: Clean up when VE is deactivated
* Remove the vetags save field handler
* Reject the save process deferred

Bug: T344382
Change-Id: I1dccc3cedcd5bca14f83ea16fdcad567bd641136
2023-09-12 11:37:34 +01:00
Translation updater bot 3475d1d0bb Localisation updates from https://translatewiki.net.
Change-Id: Ic83723b06fd5787adf54b6d099b2e79ec8e3cc83
2023-09-12 08:27:26 +02:00
David Lynch 80f3ef9531 Edit check config: account-state and experience
Bug: T330112
Change-Id: If713a7edcb71a5ea8123da27a3b1bffc45992ad0
2023-09-11 15:56:42 -05:00
jenkins-bot a9c0d1e8ad Merge "Update edit check tag labels" 2023-09-11 18:44:08 +00:00
jenkins-bot a2d601b4ab Merge "Add mw-no-invert class to thumbnails" 2023-09-11 17:19:17 +00:00
David Lynch 5447004d2c Update edit check tag labels
Bug: T329593
Bug: T342462
Change-Id: I299dc0308522f4e0585e26637bbf2d814f5dc8e0
2023-09-11 11:55:50 -05:00
jenkins-bot f722ed83f8 Merge "Remove use of wgFlaggedRevsEditLatestRevision" 2023-09-11 13:15:50 +00:00
Translation updater bot 5e43577ff4 Localisation updates from https://translatewiki.net.
Change-Id: Iabcf0accc27ce477e009fe10c3a63a274c98a742
2023-09-11 09:05:35 +02:00
jenkins-bot e45da5269a Merge "Update edit check decline reasons and record tags for them" 2023-09-08 15:17:08 +00:00
jenkins-bot 0320f44ca4 Merge "Instrumentation for edit check features" 2023-09-08 15:13:19 +00:00
jenkins-bot 1a4ee92b86 Merge "Track when edit notices are shown" 2023-09-08 15:05:28 +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
David Lynch 81ab55407c Instrumentation for edit check features
Also alters the context/inspector names to be reference-specific.

Bug: T324735
Change-Id: I3cc943aa559f622899a8a5d2fbd42265ffe810a8
2023-09-08 15:47:19 +01:00
jenkins-bot 947210e29f Merge "Only trigger edit check when inserted text is in a new paragraph" 2023-09-08 00:08:11 +00:00
jenkins-bot d75d070992 Merge "Place reference before punctuation when configured" 2023-09-08 00:07:50 +00:00
jenkins-bot 1711d09374 Merge "Comment edit check logic for pure insertion check" 2023-09-07 17:45:08 +00:00
Translation updater bot e1a150a558 Localisation updates from https://translatewiki.net.
Change-Id: I30b4b5671eb135863ca2f4a0356740e2b9bd0ebd
2023-09-07 11:14:22 +02:00
Bartosz Dziewoński 1fcd67b368 Remove use of wgFlaggedRevsEditLatestRevision
Renamed to wgEditLatestRevision in FlaggedRevs.

Change-Id: I9310aaacc475b40cd886b2be2d5dc25c0f152db2
2023-09-06 19:21:12 +02:00
Ed Sanders 7c403b2c98 Edit check: Turn on when ecenable=1 is set
Bug: T345297
Change-Id: Ie41258dbf87ef9ae00cdf830bf8cb84ed848d0a7
2023-09-05 14:34:20 +01:00
Ed Sanders 24453c25ba Add eslintrc to packageFiles folder
Change-Id: If9c1d0eb7fc3ec74ec3466abdae9a4b495a8c288
2023-09-01 14:15:29 +00:00
Ed Sanders f2fb29ddbe Only trigger edit check when inserted text is in a new paragraph
Bug: T345121
Change-Id: Iee954045bb2ccf4d177e1b0b3ea0049be3c5c1af
2023-09-01 14:32:07 +01:00
Ed Sanders a798721e23 Place reference before punctuation when configured
Bug: T344962
Change-Id: Ib4ae46d423e69c0bb45a2b1fa1c23fa7e84a8077
2023-09-01 13:44:45 +01:00
Ed Sanders 80cbe6bf3b Comment edit check logic for pure insertion check
Change-Id: Ie07aef5326eea3018686da6d872360e29712418e
2023-09-01 13:42:57 +01:00
Ed Sanders a59335fac6 Rename config.references to config.addReference
Change-Id: I5e4b70d8bff1e9b26ca78f9f6f8c9ac8d5f7297b
2023-09-01 13:41:52 +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 2f3b31eeb2 Merge "Add editcheck-references-activated when UI is shown" 2023-09-01 01:57:51 +00:00
Ed Sanders 1053204077 Add mw-no-invert class to thumbnails
Bug: T345281
Change-Id: I49d9b65fefd4fae15715d2a10db83b90c7021027
2023-08-30 19:02:52 +01: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 69c37c9863 Merge "Fix showing temp user popup after page reload" 2023-08-30 13:32:37 +00:00
jenkins-bot 4e9baea69a Merge "Acquire a temporary user username before previewing" 2023-08-30 13:20:46 +00:00
David Lynch 481dd52067 Track when edit notices are shown
VisualEditorFeatureUse as feature: notices, action: show.

This doesn't distinguish between the automatic on-load show and manually
showing them from the toolbar.

Bug: T344465
Change-Id: I5a0d7e87592c286afe51e02ae8436f7d2ce71021
2023-08-24 14:03:42 -05:00
Bartosz Dziewoński cc2b4e27d8 Fix showing temp user popup after page reload
I apparently forgot to pass the parameter to fireHookOnPageReload()
that I introduced exactly for this purpose. As a result, the basic
post-edit popup appeared, but the temp user popup did not.

Also rearrange code so that fireHookOnPageReload() is still called if
we need to redirect to complete creation of the temp user.

Bug: T344879
Change-Id: I36c64f27d2b8866ca88642621a135e7e25a91ce1
2023-08-24 16:09:12 +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
Ed Sanders 2b4dab6703 build: Update stylelint-config-wikimedia
Change-Id: I4e56a07c0cd478fb2ea1908c79f584ea3e4d788e
2023-08-21 16:06:40 +01:00
jenkins-bot 9e42850609 Merge "Remove extra margins from visual diff in Minerva" 2023-08-16 16:22:27 +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 79d0fcb585 Merge "Add a Process to the save workflow" 2023-08-16 15:32:54 +00:00
jenkins-bot fc7fd630d6 Merge "Edit check: Reduce scope of try block" 2023-08-16 15:32:52 +00:00
jenkins-bot a28977ee71 Merge "Edit check: Guard against completeHistory being empty" 2023-08-16 15:30:02 +00:00
David Lynch 228596cba0 Add a Process to the save workflow
A new hook `ve.preSaveProcess` is triggered to give other code the
chance to add steps to the process. The save dialog won't show until
the process completes. A step can be failed to return to normal
editing.

Change-Id: Id0740ff58ba9d9519c81174100ef1b8f8740870b
2023-08-16 15:59:04 +01:00
Ed Sanders 4c69113ed8 Edit check: Reduce scope of try block
Change-Id: Ife185999d3a0e084720a7aac4d360d65db08a131
2023-08-16 15:58:27 +01:00
Ed Sanders 3d92231cd1 Edit check: Guard against completeHistory being empty
When the document store has no entries (e.g. an empty page)
we don't initialise completeHistory with a retain transaction.

Bug: T333710
Change-Id: I5cc4ab3ea5f63a7eab804831df62d5c7ce2447e9
2023-08-16 15:57:54 +01:00
jenkins-bot 9070d1e98b Merge "Catch errors in addPlugin callbacks so VE load isn't broken" 2023-08-16 14:29:12 +00:00
David Lynch 745d13ae4b Catch errors in addPlugin callbacks so VE load isn't broken
Change-Id: I8a1eb058f10e356b3af5588862633b78f0b0ff92
2023-08-15 13:49:16 -05: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
Bartosz Dziewoński 4bb8d8f8ea ArticleTarget: Remove unused retrying support
This has not been used for many, many years, since we started using
mw.Api#postWithToken, which automatically retries on 'badtoken' errors.
Most of our code for it was removed (e.g. save() is never called
with three parameters), but some comments and parameters remained.

Change-Id: Ibca2a222f808e6e2796ed6a61e9587a646afcf31
2023-08-14 19:58:26 +02:00
Bartosz Dziewoński 46f661ac66 ArticleTarget: Remove duplicate error codes when logging
Occasionally we end up logging error codes like
"abusefilter-disallowed,abusefilter-disallowed,abusefilter-warning"
when someone hits a bunch of different filtes.

Change-Id: I967d374d13473ca684412b380d732653a3ceaff3
2023-08-14 19:58:26 +02:00
jenkins-bot 4b1503e3cd Merge "Convert WikitextPasteContextItem to PersistentContextItem" 2023-08-14 05:08:05 +00:00
jenkins-bot 704e7ab295 Merge "Port Parsoid's WTUtils::textContentFromCaption" 2023-08-11 22:02:10 +00:00
jenkins-bot 023fe1af0a Merge "Use passive event listeners for window scroll events" 2023-08-11 21:30:14 +00:00
Ed Sanders 916b7beb22 Convert WikitextPasteContextItem to PersistentContextItem
Depends-On: Id2900c2d2c692b611e611b7eee6cacb74a737a8c
Change-Id: Ic539a41e8623c4ed12e4fa0e24db826ca967ee5a
2023-08-11 12:54:38 +01:00
Arlo Breault 674095bbaf Port Parsoid's WTUtils::textContentFromCaption
Matches the changes in Ice62d61d1a4f661770869b43d54eb8fc20824b71

Bug: T339237
Change-Id: I16301750ae8693e850aa3ce83bbb477f820d5cae
2023-08-10 18:06:27 -04:00
Ed Sanders a54f36c886 Use passive event listeners for window scroll events
TODO comments suggested using the VE helper util, but
that is no longer necessary since all our browsers
support passive events.

Change-Id: Idb7e702d58931208d555a3f994cd0b73abec2e20
2023-08-09 16:42:23 +01:00
jenkins-bot 8be133fe66 Merge "Reduce code duplication in ve.ui.MWGalleryDialog" 2023-08-08 18:55:30 +00:00
jenkins-bot e2efe5079a Merge "Use different tooltips for ca-edit and ca-ve-edit links" 2023-08-03 15:53:21 +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
Ed Sanders 85d584930f Simplify definition of textStyle group in toolbar
This makes it easier for 3rd parties to insert extra tools
in sensible places.

Change-Id: I6c8d0c96f53655d8f9ae9f01e5d0e1a1678d29a1
Depends-On: Ib8882fa6319915d291b345a69ab95f362739ad7b
2023-07-31 11:06:18 +00:00
jenkins-bot 16623ac116 Merge "Simplify code for showing "Loading" message in template context" 2023-07-31 10:16:40 +00:00
jenkins-bot 7970346855 Merge "build: Upgrade stylelint-config-wikimedia from 0.15.0 to 0.16.0" 2023-07-26 12:54:43 +00:00
jenkins-bot b9f0764711 Merge "Prevent JS code from changing 'skin-view-edit-local' message to 'skin-view-edit'" 2023-07-17 23:54:53 +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
James D. Forrester 325ca8a40a build: Upgrade stylelint-config-wikimedia from 0.15.0 to 0.16.0
Change-Id: I993074948832a50997255bd413192c8fdeaf9edb
2023-07-14 13:02:49 -04:00
David Lynch 7d1e9f3eaf When switching from WikiEditor activate VE *after* notifying WikiEditor
This affects logging behavior -- notifying WikiEditor lets its logging
clean up after itself before the init event for VE fires. This was only
an issue when switching *with* changes, because that path resulted in
the timings being cleared, making future events whose timing depended
on the init event have NaN timings.

(This wasn't an issue before we centralized the logging code into
WikimediaEvents, as before that WikiEditor and VE were maintaining
separate timing registries.)

Bug: T237063
Change-Id: Icdb307fa0ce0d1dac3744e4bab41b3588f14777f
2023-07-13 09:32:55 -05:00
沈澄心 70cb30c2a8 Prevent JS code from changing 'skin-view-edit-local' message to 'skin-view-edit'
Change-Id: I33ab649959226a848e1c57fc7c2b7e95a014e4bd
2023-07-13 02:51:12 +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
Ed Sanders 3d8315f4c3 Simplify code for showing "Loading" message in template context
Instead of passing a "teardown callback" to a specific dialog,
run the command as usual and clear the loading message once
the dialog has successfully opened.

Change-Id: Icacabb298f1a0d7a587ab8b992759b04ff59c5c3
2023-07-12 11:04:59 +01:00
jenkins-bot 82f72cfeda Merge "Merge mobile and desktop save buttons" 2023-07-11 21:34:17 +00:00
jenkins-bot 067cbd3438 Merge "Fix ContextItem documentation" 2023-07-11 21:32:59 +00:00
jenkins-bot 7ae61934a3 Merge "Remove remains of lossy-switching and discard-switching" 2023-07-11 15:34:52 +00:00
jenkins-bot 5574237f47 Merge "Support '&editintro=…' etc. on subsequent loads via page tabs" 2023-07-11 15:33:30 +00:00
jenkins-bot c4fb50b59f Merge "Support '&editintro=…' etc. on back/forward and VE/NWE switch" 2023-07-11 15:33:26 +00:00
jenkins-bot 93427a6708 Merge "Reload page or redirect when saving an edit creates a temp account" 2023-07-11 15:16:56 +00:00
Bartosz Dziewoński 0dddd98b5f Reload page or redirect when saving an edit creates a temp account
Depends-On: I6cdc014fb39d35ce1f091b53dc3a9c4a3c95f9e9
Bug: T338002
Change-Id: I01e13ce1ebab462eeb0ba3847d4205a88965a127
2023-07-10 19:33:16 +02:00
Ed Sanders 4f90ce2594 Merge mobile and desktop save buttons
Use toolbar groups where appropriate.

Change-Id: If4e0d157f04ba741ed4cf891e4183fe351d537b8
2023-07-10 17:06:58 +01:00
Ed Sanders 2a1076e295 Fix ContextItem documentation
* Be more specific about the type of context which a
  context item belongs to.
* Make grammar clearer.

Change-Id: Ic480411cead80a1651c61ce9841dfbdc24a7b915
2023-07-10 14:32:12 +01:00
jenkins-bot 6a2b36bc16 Merge "Drop visualeditor-beta-warning from help menu" 2023-07-08 00:43:18 +00:00
jenkins-bot 76ed447217 Merge "Convert MWPopupTool into MWHelpListToolGroup" 2023-07-08 00:19:14 +00:00
jenkins-bot 329faab1e9 Merge "MobileArticleTarget teardown behavior is upstreamed to MobileFrontend" 2023-07-07 23:49:57 +00:00
jenkins-bot 0f5eedc26f Merge "Only trigger editcheck on pure insertion (remove.length === 0)" 2023-07-07 15:00:34 +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
thiemowmde 60409599f5 Reduce code duplication in ve.ui.MWGalleryDialog
Change-Id: I7e3f831b9abd8834cc55460e579261cbf9d5fcff
2023-07-07 10:25:55 +02: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
Ed Sanders fc41331470 EditCheck: Exclude nodes that aren't at the document root (i.e. image captions, table cells)
Bug: T340086
Change-Id: I8f5343f908efb3d39f20be97d132b146115910f9
2023-07-03 14:40:21 +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
jenkins-bot 1d6a748fed Merge "Revert "Revert "Targets: Use align:'after' instead of actionGroups""" 2023-06-30 18:05:44 +00:00
jenkins-bot 19904571b8 Merge "Replace ve-ce-surface-enabled with ve-ce-surface" 2023-06-29 19:32:36 +00:00
Bartosz Dziewoński bbda4fc160 Revert "Revert "Targets: Use align:'after' instead of actionGroups""
This reverts commit e2b5e2a1bb.
It should be safe to re-attempt this now.

Bug: T339317
Change-Id: Ia4ebb11ca162a4e6d985076ea2d2dd914d04fc1d
2023-06-29 18:17:01 +00:00
Ed Sanders d857750e12 Make better use of toolbar groups
Bug: T340751
Depends-On: Ie7ca24cbcd95baa082b3b1cb907354f6da21d93c
Change-Id: Ibcc81c90bc9ba6c5fd012c512daf861973b03b2e
2023-06-29 16:58:38 +00:00
David Lynch 14b32181ea MobileArticleTarget teardown behavior is upstreamed to MobileFrontend
Bug: T334263
Depends-On: If1ad6e88cf595ef3d3e54d41c00f0b79704be043
Change-Id: Idb95bfd2b71f5967396a1f36636b0a155dec2fb2
2023-06-29 09:54:03 -05:00
jenkins-bot 312b1c08ec Merge "Unwrap headings in lists (and <blockquote>) when pasting external HTML" 2023-06-27 18:18:16 +00:00
Sam Wilson c5040810c7 Switch back to oo-ui-element-hidden from mw-diff-element-hidden
Using the OOUI class name is an established pattern outside of
OOUI widgets, so it's easier to stick with it for the diff page
hiding and showing (switching to and from inline/table diffs, etc.).

Depends-On: I805b6b71d8e137eaa3e000b15455557df42af838
Bug: T324759
Change-Id: I0300b40d4e79319592bfc1f57912460f65c7051c
2023-06-26 17:54:46 +00:00
jenkins-bot f22f0d4c68 Merge "React to hooks that are fired when inline switch is present" 2023-06-26 05:29:44 +00: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
Bartosz Dziewoński 5a792b6558 ApiVisualEditorEdit: Allow not returning the new revision content
Sometimes we call this API and then reload the page (or navigate to
another URL), without using the page content it returns. Save some
work and some data transfer and don't generate it in those cases.

Change-Id: Ic5fac61f3ef9b2dfce6ff757f1d414a9f41f217d
2023-06-22 21:08:15 +00:00
jenkins-bot 68265fcd14 Merge "Use new helpers to show the post-edit message" 2023-06-22 15:33:28 +00:00
Ed Sanders 94fb927242 Replace ve-ce-surface-enabled with ve-ce-surface
The former is deprecated, and not required here.

Bug: T340124
Change-Id: I874b40bd8288763aeba8946ce40cecfd27e47c1b
2023-06-22 16:26:47 +01: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 ac8f8791f1 Don't show edit notices popup after switching VE/NWE
The user has already seen the notices, and getting hit with yet
another popup doesn't feel nice.

Bug: T169179
Change-Id: I421e42d32cb67ea210644b705e9c6e5af74e75ee
2023-06-22 13:42:25 +00:00
David Chan 99f7df7702 Only trigger editcheck on pure insertion (remove.length === 0)
Bug: T340088
Change-Id: I3d8fc2a3e7e6df908ca445af85a14c87a73e0ad3
2023-06-22 09:33:58 +08:00
jenkins-bot 1f76a0e8f7 Merge "Make "add undocumented parameter" hotkey ctrl+shift+d work much better" 2023-06-21 19:52:11 +00:00