Commit graph

371 commits

Author SHA1 Message Date
jenkins-bot 1ac180346c Merge "Replace hardcoded colors with Codex design tokens" 2024-07-02 17:30:01 +00: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
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 291844dbee build: Update stylelint-config-wikimedia to 0.17.1
Change-Id: I8e0f087ae3d2644df85a85791b9c49c09567c0f4
2024-06-05 18:47:49 +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 48823cad4b Merge "JSDoc: convert @cfg to @param" 2024-05-28 15:13:20 +00:00
Novem Linguae 9ffbfc77cd JSDoc: convert @cfg to @param
Bug: T250843
Change-Id: I53ef4fa4a65b017eec90cc1f2cbb7e7f0681e317
2024-05-26 21:59:02 -07:00
thiemowmde e867a49a69 Consolidate minor code duplications in DiffPage
Change-Id: I4969616c75cf201dde1094715ccbb796a92c1d92
2024-05-24 15:45:20 +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
Ed Sanders eb757c4c9f Remove unnecessary context binding when using arrow functions
Change-Id: Ie25e90aeb0519b1e0f793348b27d4d4a6b686698
2024-05-03 12:47:47 +01:00
Ed Sanders 4db99d7a27 Use more arrow functions
Change-Id: Ifdb15ea9e5ca606e02ddaf822bfd6397c3ce639e
2024-05-01 14:11:55 +01:00
Ed Sanders 33db46e6fa Use arrow callbacks with OO.ui.Process
Change-Id: I9bf32a382ffc2c0f1915f70bd8909668722cfb16
2024-05-01 14:11:55 +01:00
Ed Sanders e3659d4846 Prefer arrow callbacks
Change-Id: Ia05b27f7c71c33580ffd0718e3bbc673dd8b3d63
2024-05-01 14:11:54 +01:00
Ed Sanders 8093aa43c1 JSDoc: Update jsdoc-wmf-theme to 1.0.0
Change-Id: Ibca8da2015bdbcc08817c9852c5cda7c72e07b38
2024-04-30 12:32:58 +01:00
Ed Sanders 373538d206 JSDoc: Add namespaces
Change-Id: Id9a5e2633667786d3bd1c900893007f0ec71a8a5
2024-04-30 12:24:10 +01:00
Ed Sanders afbed7c5b3 JSDoc: Fix event documentation and complex return types
Change-Id: I5dbce39294a34a999303ccfec88261d8c92b17ca
2024-04-29 19:14:26 +01:00
Ed Sanders a913f2fc5c Fix selector for TemplateStyles exclusion
The <style> tags can also have data-mw-deduplicate instead
of just data-mw.

Bug: T298147
Change-Id: I63adf1f9bda3f299bba846cd65338a6f0d6c4288
2024-04-17 14:19:12 +01:00
libraryupgrader c51ec255d7 build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

npm:
* eslint-config-wikimedia: 0.26.0 → 0.27.0

Change-Id: Icb8391aaa2eb5826cc13bcb2b2a06f53d56bc41c
2024-03-30 16:51:06 +00:00
jenkins-bot 9ed8041cf0 Merge "ve.init.MWVESwitchPopupWidget: Add spacing after checkbox" 2024-03-14 20:27:15 +00:00
jenkins-bot 627f0bcbb7 Merge "ve.init.MWVESwitchConfirmDialog: Fix padding of button in Apex/Monobook" 2024-03-14 20:26:12 +00:00
jenkins-bot a2d81882f5 Merge "ve.init.MWVESwitchConfirmDialog: Convert files to LESS" 2024-03-14 20:22:54 +00:00
jenkins-bot ef3c244834 Merge "Compatibility with new heading HTML" 2024-03-14 18:48:26 +00:00
Ed Sanders 570766d96a ve.init.MWVESwitchPopupWidget: Add spacing after checkbox
Change-Id: I40e1c9cf770f5c00d891c71a7d18b0a622264501
2024-03-14 11:37:26 -07:00
Ed Sanders 4fb1c130fd ve.init.MWVESwitchConfirmDialog: Fix padding of button in Apex/Monobook
Change-Id: I3568ee3f1682474d1067f3f6d4456444279469e5
2024-03-14 11:37:26 -07:00
Ed Sanders 13ae41f74b ve.init.MWVESwitchConfirmDialog: Convert files to LESS
Change-Id: Iacb3ee99a3d828d23534e2929a78c469d4af7c16
2024-03-14 11:37:26 -07:00
jenkins-bot 5d27061c63 Merge "Convert ve.init.MWVESwitchPopupWidget.css to LESS" 2024-03-14 17:45:52 +00:00
Divec 013a9216df Merge "Improve opening editor when collabSession is in URL" 2024-03-14 17:00:59 +00:00
Ed Sanders 7aa6e7b250 DesktopArticleTarget.init: Document methods
Change-Id: Ida207aa83b0fb6e646c376fb4a0ff51a3bd67e57
2024-03-13 16:01:15 -07:00
Ed Sanders 46afa48a14 Improve opening editor when collabSession is in URL
* Suppress the welcome dialog
* Always load VE if collabSession is set

Change-Id: Icb61b0b06ecc477125b8deb05d5309fe34605914
2024-03-13 22:45:51 +00:00
Ed Sanders d5d2fd0541 Convert ve.init.MWVESwitchPopupWidget.css to LESS
Change-Id: I4c394adc7a510b85b346366f53daf05b96811393
2024-03-11 17:39:22 -07:00
Bartosz Dziewoński 5fb480fa9e Compatibility with new heading HTML
Small fix to support new HTML markup for headings, which will soon be
used by Parsoid page views (T269630) and by the old parser (T13555).

This fixes two issues that were only apparent when using
`$wgVisualEditorEnableVisualSectionEditing = true`:

* When starting an edit from a section edit link, the viewport was
  not scrolled to align with the clicked heading and thus didn't
  provide a smooth transition into edit mode.

* If the editor was started from a section edit link, then when
  leaving the editor without saving changes, the viewport would jump
  to the top of the page instead of returning to the clicked heading.

This is similar to change If71d4d8292 in MobileFrontend editor.

Bug: T13555
Change-Id: I89f8abac521e635f8eaa782703bdb6f6323098b0
2024-03-08 18:54:45 +00:00
Ed Sanders 4ceadc9f8e Use full filename in LESS include
This appears to be standard in core.

Change-Id: I7f543f2eaf03fb32515878130a0ae96a219cb453
2024-03-01 15:38:05 +00: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
Sam Wilson 9226a67ea1 editSwitch: Use secondary group for WikiEditor switch menu
Instead of inserting the editSwitch menu manually to the WikiEditor
toolbar, use the 'secondary' section which is already aligned to
the right.

Bug: T308423
Depends-On: Iff6d80628ebb5ec5685136fa02c2345eb5b49d42
Change-Id: Ic307f9dc7ad976862c8d8c6551ed29e6071f655f
2024-01-31 06:49:14 +03:00
Ed Sanders dd4e766d4b Remove { passive: true } from removeEventListener
This option doesn't exist when removing an event.

Change-Id: I74cc8c41ad13ae7d2b4932c41d8dc51b764e1b6b
2023-12-08 11:00:01 +00:00
Ed Sanders d42a0772bb Move verbose copyright message to AUTHORS.txt
Avoids having to update the date in every file every year,
which we stopped doing.

Change-Id: I7bf7aa0937eef911e00772470091753a7b06fd3d
2023-12-01 16:07:39 +00:00
David Lynch 094c007df0 Allow a global variable to forcible enable edit check
The URL parameter turns out to be a bit painful for people to use in
some situations.

Bug: T350749
Change-Id: I7c88dc604dd321a7c78810b21f7ad8306ff9dab6
2023-11-30 10:27:50 +00:00
Ed Sanders 3966573f02 build: Update ESLint to 0.26.0 and autofix
Change-Id: Ia5e15684c1c3dcd69985445a09fc4e4910368b5b
2023-11-28 11:18:09 +00:00
jenkins-bot 8411bd0954 Merge "Remove handling of Minerva edit links" 2023-11-16 18:37:24 +00:00
WMDE-Fisch ec47d4887b VisualDiff: Remember the current mode when the diff changes
I don't think it make sense to always fallback to the inital mode.
The wikipage.diff hook can be fired from 3rd parties to update the
diff. If the users then changes the mode inbetween without a page
reload, every following diff page update should have the latest
option as a default instead of the original option.

Bug: T346369
Change-Id: I2d0f6cbb89a2d98f247fcd77fa4d79708a4220c1
2023-11-10 10:19:15 +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
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
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
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