Commit graph

9991 commits

Author SHA1 Message Date
Ebrahim Byagowi 5c798b0eea Move editsection bidi isolate to MediaWiki
MediaWiki needs this even without VisualEditor so let's move it there.

Bug: T371702
Depends-On: I4dcfa3916a07e92565b5667adb2ead0115fdb438
Change-Id: I0562ea1e5bd28eabd3ef0bcd8372155da67bcd0c
2024-08-02 18:52:54 +03:30
Ebrahim Byagowi 0f85b14328 Define brackets spacing in a direction aware way
This also resolves the bug but it hides the underlying issue on it
that's why I like to have this but after having
Ia7dd8076c8789ed04d3fb52a078c70561ee5c6f8

Bug: T371665
Change-Id: I7340829acbd2bf3fcccfb631848964e5338470b0
2024-08-02 11:30:27 +03:30
Ebrahim Byagowi 6965da7012 Don't set direction for editsections
This causes editsection to jump

Bug: T371665
Change-Id: Ia7dd8076c8789ed04d3fb52a078c70561ee5c6f8
2024-08-02 11:09:45 +03:30
James D. Forrester 8c9605921c DesktopArticleTarget: Set wgCurRevisionId and wgRevisionId once publish goes through
Bug: T370771
Change-Id: I0100c155352ec55275f40616f87e69af52d6e97b
2024-07-25 12:28:15 -04:00
Ed Sanders b302e0288b Disable edit mode switch in multi-user environment
Bug: T370819
Change-Id: I8244aaa0783e35ca70385045a8165e0bcb9a91dc
2024-07-24 13:37:18 +01:00
Adam Wight b4da46585c Temporarily disable Cite-related test
This can be reenabled once Cite changes are merged.

The disabled test is also updated in this patch so that it will pass
with the new Cite code.

Bug: T370512
Change-Id: I56b52c399d2c76689fdcb0bc7fd50a8c0ced28fd
2024-07-24 11:43:33 +02:00
Timo Tijhof ba6f60032b tests: Fix DesktopArticleTarget dirtying location.href
Without this, wheneve VE is installed, test execution ends with the
address bar rewritten to Special:Badtitle, which affects reloads etc
and makes debugging anything else harder.

Bug: T250045
Change-Id: Ic453ae388c842369ff1cb1e84dcad4a8bbc7d54f
2024-07-20 04:05:42 +00:00
jenkins-bot c322fe0459 Merge "Rewrite a conditional to make the logic a little clearer." 2024-07-17 10:22:07 +00:00
jenkins-bot 4a4bda78ab Merge "Reenable test after Cite-related fix" 2024-07-15 12:07:23 +00:00
Zoë 652e140dc5 Rewrite a conditional to make the logic a little clearer.
I spent a couple minutes looking at this before I saw that we needed
`this.updateVisibility()` to only fire if the loop iterated at least
once.

Change-Id: I7d03f73a35e3ded539898effa064dc0e14ba595f
2024-07-08 15:27:07 +01:00
Ed Sanders bc9c900b6a Use transitionend events instead of hard coding animation time
transitionend is supported by all our target browsers.

Also use requestAnimationFrame without a fallback as
this is also supported by all browsers.

Change-Id: I563cacdc8b2365ad4b69dfccb7e46a9f176dbd9b
2024-07-03 00:43:19 +01:00
Divec e64037f19d Merge "Remove slug animation values overrides" 2024-07-02 18:36:03 +00:00
jenkins-bot 1ac180346c Merge "Replace hardcoded colors with Codex design tokens" 2024-07-02 17:30:01 +00:00
Adam Wight a0ece81a44 Reenable test after Cite-related fix
Bug: T247921
Change-Id: Ic5ddcb2b861186f3defd10447b4d1b525bda3fbf
Depends-On: Ieff73769f8ebbc3724f6a9b498487c4e7d09aa2e
2024-07-02 10:39:41 +00:00
Adam Wight 4715dd444d Temporarily skip a Cite-related test
Needs to be skipped in order to merge a change in Cite.

Bug: T247921
Change-Id: I32276021713876b3dac2210c26bbd27500009c14
2024-07-02 12:31:43 +02:00
jenkins-bot c3f87d277f Merge "Remove VE user-agent based browser compatibility checks" 2024-06-20 17:05:08 +00:00
jenkins-bot 2603c5c718 Merge "Update VE core submodule to master (65e536c1c)" 2024-06-19 16:24:21 +00:00
David Lynch 955bfc4b68 findAddedContentNeedingReference was removed accidentally
Replace it with a hasAddedContentNeedingReference that'll need to be
kept in-sync with the internal logic in AddReferenceEditCheck while
we're tagging this.

Follow-up to d69d366469.

Bug: T367920
Change-Id: I9f4f96bf5c6c4b7b3131b1435426b2e283c9833a
2024-06-18 16:12:30 -05:00
Bartosz Dziewoński 4c93b27c7d Update VE core submodule to master (65e536c1c)
New changes:
3135ad109 Update OOUI to v0.50.0
0eb93c340 Localisation updates from https://translatewiki.net.
2e23d8cac ve.ui.Surface: Improve documentation of surface padding
d42086d50 Allow TableCellableNode to span multiple DOM elements
65e536c1c Localisation updates from https://translatewiki.net.

Local changes:
* Allow MWTransclusionTableCellNode to span multiple DOM elements

Bug: T366984
Bug: T367061
Change-Id: I67239ac72f29b9729b73c7604ee3680ceb1b8475
2024-06-17 20:06:18 +02:00
Ed Sanders 8cb070f4d7 Remove VE user-agent based browser compatibility checks
Bug: T367735
Change-Id: I07fb1bbbd2f907672400cb9bc74fd40dea973da9
2024-06-17 13:03:04 +01:00
libraryupgrader 9e9ee59272 build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.0 → 0.28.2
  The following rules are failing and were disabled:
  * modules:
    * no-jquery/no-append-html
  * modules/ve-mw/dm:
    * no-jquery/no-append-html

* grunt-stylelint: 0.20.0 → 0.20.1
* stylelint-config-wikimedia: 0.17.1 → 0.17.2
* braces: 3.0.2 → 3.0.3
  * https://github.com/advisories/GHSA-grv7-fg5c-xmjg

Change-Id: If171a41f93d4e96606df99fb394a9f961dc36ebd
2024-06-16 15:25:54 +00:00
Ed Sanders 2a3f06676d Use full external link for link to mw.org help page
Bug: T367267
Change-Id: I472cfa7007b6468c88b5502162fbef2e9874712d
2024-06-12 10:14:40 +01:00
jenkins-bot 053ef03c8c Merge "SurfaceFragment tests: Put isolateAndUnwrap tests in a loop" 2024-06-11 19:09:15 +00:00
jenkins-bot c90200d24b Merge "Use reliability API to detect blocked external links" 2024-06-10 18:10:08 +00:00
David Lynch e6e104dda5 Use reliability API to detect blocked external links
Bug: T366751
Change-Id: If3813cb662155f674688d0ca0733fabdbb338a50
2024-06-08 13:55:43 -05:00
Jan Drewniak 2fc809dc17 Replace hardcoded colors with Codex design tokens
Replaces hardcoded color hex values with their equivalent
values from Codex, via the "mediawiki.skin.variables" system.

Bug: T366197
Change-Id: Ia929a1a8d6351222acb454c8ec750e920ae6d072
2024-06-07 14:40:07 -04:00
David Lynch b10fb53f8c getTargetDataFromHref: catch error if passed invalid URL
Could trigger this by typing `https://` into the internal link
annotation inspector.

Bug: T366822
Change-Id: Ie58ded247dbfb6c001d8177953ea148cd82ec03d
2024-06-06 10:57:35 -05:00
Ed Sanders 0a23f31227 SurfaceFragment tests: Put isolateAndUnwrap tests in a loop
Change-Id: I8791da02a91f5ddc801290121031dde290883d6c
2024-06-05 17:50:29 +00:00
Ed Sanders 291844dbee build: Update stylelint-config-wikimedia to 0.17.1
Change-Id: I8e0f087ae3d2644df85a85791b9c49c09567c0f4
2024-06-05 18:47:49 +01:00
Ed Sanders a3d4388bc1 Follow-up Ic9fad12fe: Move .css file to .less
MWCategoryWidget was converted to LESS syntax but wasn't
moved in the previous commit.

Change-Id: Ifd3e6228b96872ba40fa6d8db1617fb65b781dc0
2024-06-05 18:40:36 +01:00
Bartosz Dziewoński cc096f1bb8 Fix "implicit-arrow-linebreak" ESLint violation
Change-Id: I61bbfb0762438927c0f7bd5b8e8bf1365861d909
2024-06-04 18:58:25 +02:00
jenkins-bot 81a1c990e0 Merge "build: Updating eslint-config-wikimedia to 0.28.0" 2024-06-04 13:53:03 +00:00
jenkins-bot 595db906cc Merge "MWExtensionDialog: Fix documentation of confirmAbandon" 2024-06-04 10:57:59 +00:00
libraryupgrader 702677220d build: Updating eslint-config-wikimedia to 0.28.0
The following rules are failing and were disabled:
* modules/ve-mw/tests:
  * implicit-arrow-linebreak

Change-Id: If857233c0de24c8cf619dbb1347ebb375f3ab1ba
2024-06-04 03:40:00 +00:00
Timo Tijhof ad6e0e332e MWTemplateTitleInputWidget: Fix unstable sort affecting Firefox
I'm going to assume the order in production with Chrome, as asserted
by the unit test, is the preferred order whereby negative numbers are
intended to be prepended before the positive numbers.

This came up in I6ecbd5743f3e, where this was the only unit test across
MediaWiki core and WMF gated extensions, that fails in Firefox.

It is reproducible locally with plain MW core + VisualEditor as well.

Bug: T366299
Change-Id: I6f8546e6e604cbb41e11bd2b59f8b5f19350c676
2024-05-31 17:12:29 +01:00
jenkins-bot 8e4d4959fc Merge "Avoid Array.concat" 2024-05-29 22:02:03 +00:00
Ed Sanders b9b966de6e Avoid Array.concat
See I9addf43b2857de7bcac.

Change-Id: Ic1998ab6f7dedf6946d7ae63a985a76031f8eecf
2024-05-29 21:16:25 +01:00
jenkins-bot 66c6fa294c Merge "Change confirmation behaviour when abandoning template edits" 2024-05-29 16:58:43 +00:00
jenkins-bot 28fae02c8b Merge "Tests: Use spread syntax on string literals" 2024-05-28 19:39:59 +00:00
jenkins-bot 48823cad4b Merge "JSDoc: convert @cfg to @param" 2024-05-28 15:13:20 +00:00
jenkins-bot f41d5740c1 Merge "Consolidate minor code duplications in DiffPage" 2024-05-28 15:12:39 +00:00
jenkins-bot c3204463de Merge "Remove redundant elements from Unicode-enabled regex" 2024-05-28 15:11:37 +00:00
Zoë 3c6f0a918c Change confirmation behaviour when abandoning template edits
Previously, it was possible to close a dialog with active edits by
pressing the "<" button or pressing escape. A change was made to confirm
the user's intent before abandoning their changes, see Ia8935b5b1acb

This patch fixes a bug where the user's intent is always confirmed while
editing a template, even if the user has made no changes. This was
because for technical reasons we trimmed whitespace before making a
comparison with the new template case, but that caused the comparison
with the edit case to always fail because existing templates are padded
with whitespace.

This could have been solved by moving the trim operation into the new
template flow. This patch would still have been necessary to prevent
a bug if the default value had trimmable whitespace. I have opted to
keep the whitespace behaviour for edits for consistency.

Bug: T334513
Change-Id: I7b3370c86df67c36fc63a1f1d0e7004a098a1950
2024-05-28 15:49:19 +01:00
Novem Linguae 9ffbfc77cd JSDoc: convert @cfg to @param
Bug: T250843
Change-Id: I53ef4fa4a65b017eec90cc1f2cbb7e7f0681e317
2024-05-26 21:59:02 -07:00
Ed Sanders 155549ab60 Tests: Use spread syntax on string literals
Because `...'Foo'` is more legible than `'F', 'o', 'o'`.

Change-Id: I09ac584ee79b8f89c48f135182e60d7fb1b54557
2024-05-24 22:23:42 +01:00
thiemowmde 3a7d345093 Remove redundant elements from Unicode-enabled regex
Same as in If6c7e85 in the TemplateWizard codebase. [a-z] is already
part of \p{L}, and [0-9] is part of \p{N}.

Change-Id: I8008ac7e504739b8f4b5fb5dd732b0deca20cefc
2024-05-24 15:47:02 +02:00
thiemowmde e867a49a69 Consolidate minor code duplications in DiffPage
Change-Id: I4969616c75cf201dde1094715ccbb796a92c1d92
2024-05-24 15:45:20 +02:00
thiemowmde c3953814e4 Fix typos and outdated links in comments
That property in the magic word class doesn't exist any more.

Change-Id: Ife275944bd1c8dec603bd01dea6075ad36acf59e
2024-05-24 15:40:01 +02:00
Ed Sanders cb657e0bdf ESLint: Re-enable prefer-const and fix
Change-Id: I9dbc12335016a326f00bf5b9a960551f828c685d
2024-05-21 17:50:12 +01:00
Ed Sanders dbc696124f ESLint: Enforce no-var and autofix
Temporarily disable prefer-const as this requires
manual fixing.

Change-Id: I477b69a57e8d33535c6fc71dba196a8605780725
2024-05-21 17:40:52 +01:00