aboutsummaryrefslogtreecommitdiffstats
path: root/resources
Commit message (Collapse)AuthorAgeFilesLines
* Merge "DateFormatter: Fix exception if user date option is not available"jenkins-bot2025-04-071-2/+31
|\
| * DateFormatter: Fix exception if user date option is not availableTim Starling2025-04-071-2/+31
| | | | | | | | | | | | | | | | | | | | | | If the user's date option is not available in the selected user language, fall back to the site default and then to "dmy", the last being guaranteed to exist since all languages are merged with MessagesEn.php. Add test. Change-Id: I9ccc6ebe747070fec2b80398a8251924c9a28fbc
* | Merge "mediawiki.api: Fix docs for AbortController fallback support"jenkins-bot2025-04-071-3/+4
|\ \
| * | mediawiki.api: Fix docs for AbortController fallback supportBartosz Dziewoński2025-04-071-3/+4
| |/ | | | | | | | | | | | | Thanks to Krinkle's research: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1113193/comment/f2487490_d85e5600/ Change-Id: If0299825f3f784503d42fb2ae8fd2b1072c6ab62
* / Upgrade moment from v2.25.2 to v2.30.1James D. Forrester2025-04-06117-1348/+2503
|/ | | | | | | | | | Five new locales, two of which map to supported languages in core (ku-kmr -> ku, and tk -> tk), and three of which don't but are added in for future support and for languages that might be configured in production systems (ar-ps, bn-bd, and es-mx). Bug: T389416 Change-Id: Ic69ddf92f922515bf36a2ea1770b2c8ebd2c46b2
* SpecialBlock [Codex]: Include an 'Active range blocks' table for IPsMusikAnimal2025-04-034-8/+66
| | | | | | | | | | | | | | | | | | When the target is an IP or IP range, show an 'Active range blocks' accordion that lists all range blocks that apply to the target. The idea is that admins should be informed if an IP or range is already blocked, even if the target is a wider CIDR range. Each row in the table has a 'View' link to load that range as the target. We do this instead of providing direct 'Edit' / 'Remove' links because admins may not realize the range block is for a different target. In effect, 'Active range blocks' surfaces blocks that effect the target, but not directly. The 'Active range blocks' accordion is always shown for IPs and ranges (situations where there could be active range blocks) but has an empty state like the other tables. Bug: T389987 Change-Id: I4d5f42984b05cf1b30e2f962b9381779196fcab3
* Merge "Drop unused performance metrics"jenkins-bot2025-04-031-26/+1
|\
| * Drop unused performance metricsJon Robson2025-04-031-26/+1
| | | | | | | | | | | | | | | | | | We did this for the new Vector 2022 search, given now Vector 2022 is everywhere, these metrics are not being used or worth logging. Bug: T379861 Change-Id: I29212897abcac81d62f565fb6e3363dcd2c2f1b0
* | Merge "Special:Block [Codex]: Show error message when retrieving block log"jenkins-bot2025-04-032-3/+6
|\ \
| * | Special:Block [Codex]: Show error message when retrieving block loghmonroy2025-04-022-3/+6
| |/ | | | | | | | | | | | | | | Show error message when there's some unknown error message returned from the API when retrieving a block log. Bug: T388139 Change-Id: If0ee9fcb3d3567db9d3fa3e60ef6689279df01b5
* | Merge "DateFormatter.js: change JSDoc tags to better advertise the module/class"jenkins-bot2025-04-021-7/+6
|\ \
| * | DateFormatter.js: change JSDoc tags to better advertise the module/classMusikAnimal2025-04-021-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @hideconstructor should be used instead of @ignore to prevent the class as a whole from being documented. The module exports the class, thus we can use @exports instead of @module so that they are treated the same, allowing for easier navigation of the docs. Bug: T389161 Follow-Up: Ib6bc8ebd4d01317aaf32225c6006ea2dc7a1b39e Change-Id: I24e678b68de6abf8e99b5d028c8f15c2bd20d260
* | | Merge "UserLookup.vue: trigger new search when changes are made before mounting"jenkins-bot2025-04-022-24/+67
|\ \ \
| * | | UserLookup.vue: trigger new search when changes are made before mountingMusikAnimal2025-04-012-24/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the Lookup component a template ref and force a lookup and display the results when the user types in something before Vue loads. A TODO is left for making the test assert that the menu is visible. Related: T390127 Move refs to the top of setup() and document them to be consistent with the structure of other components as well as the store. SpecialBlock.php: if the Codex form is submitted, treat as no-submission since this code path isn't supposed to be possible with a JS-only form. Bug: T389955 Change-Id: I6b9788370495648f1629ec7c3b768e704d78f157
* | | | Merge "Special:Block [Codex]: Pressing enter should submit the form"jenkins-bot2025-04-021-0/+14
|\ \ \ \ | |_|/ / |/| | |
| * | | Special:Block [Codex]: Pressing enter should submit the formhmonroy2025-03-261-0/+14
| | | | | | | | | | | | | | | | | | | | Bug: T388007 Change-Id: I1c91a94a37837b230e2ad0f6a0c58ac29c9271e8
* | | | Merge "Client-side date/time formatter library"jenkins-bot2025-04-022-0/+710
|\ \ \ \
| * | | | Client-side date/time formatter libraryTim Starling2025-04-022-0/+710
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a library providing date/time formatting according to the user's preferred time zone and date preference. I tested formatting of an example date with all defined formats in all languages, and I found that it gives identical output to PHP in about 90% of our ~500 languages. Resolve some of the outstanding issues by aliasing the problematic date formats on the client side, so that the user will see the date in another acceptable format for the same language. The remaining issues mostly relate to the use of a fallback language to display weekdays and non-Gregorian month names. Details: * Add Language::getJsDateFormats(), which converts existing date formats to an options array that can be interpreted by the client. * In Messages*.php, add $numberingSystem, which is the CLDR numbering system ID. I set it for all languages that had overriden $digitTransformTable. This is sent to the client in the library's JSON config and is used as the default numberingSystem option when formatting dates. * In Messages*.php, add $jsDateFormats, which overrides the automatically generated date format options. Bug: T389161 Change-Id: Ib6bc8ebd4d01317aaf32225c6006ea2dc7a1b39e
* / | | Update Codex from v1.21.1 to v1.22.0Eric Gardner2025-04-0128-47/+76
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T310158 Bug: T386298 Bug: T386482 Bug: T388049 Bug: T388857 Bug: T389234 Bug: T390589 Bug: T390615 Change-Id: I1325618ae8ccd554f8f0891abe6a51df539ab6da
* | | Merge "SkinModule: Add dark mode styles for images"jenkins-bot2025-03-281-0/+35
|\ \ \
| * | | SkinModule: Add dark mode styles for imagesJon Robson2025-03-271-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is disabled by default but can be added on skins that support dark mode. This replaces existing code in Minerva and Vector 2022. Bug: T388197 Change-Id: I4302b629d42aa58073108bc75eaf857d7e55d9cf
* | | | editRecovery storage: Return early if db isn't openEd Sanders2025-03-271-0/+5
| | | | | | | | | | | | | | | | Change-Id: I6c4d7d8d7358d554d5f47096c9ee3cd72f81af5b
* | | | editRecovery: Add missing documentation and rename methodsEd Sanders2025-03-272-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid using on* for methods which aren't event listeners * Add missing documentation * Remove unnecessary 'use strict' directives Change-Id: I5b386e56c55c390a246595d06a5cb985f4de0ce4
* | | | editRecovery storage: Handle errors consistentlyEd Sanders2025-03-271-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | Also remove unused 'event' argument from save promise Change-Id: Ie7f1e05462af7ea1eca8aa0220b629c3626a70e4
* | | | editRecovery storage: Document promises properlyEd Sanders2025-03-271-8/+12
|/ / / | | | | | | | | | Change-Id: Ia2fb4a5876e6fe8ab41f0fe7f52d132d21b1ba52
* | / Set thumbnail image background to @background-color-base-fixed (white)Bartosz Dziewoński2025-03-263-2/+5
| |/ |/| | | | | | | Bug: T388197 Change-Id: Ie842c3aab71cf354436e273046cde1af3f83d947
* | Merge "[wmf.20] RecentChanges - Tagged edit filters icon "More information ↵jenkins-bot2025-03-261-1/+4
|\ \ | | | | | | | | | about..." doesn't redirect to target page [4H]"
| * | [wmf.20] RecentChanges - Tagged edit filters icon "More information ↵Kgraessle2025-03-211-1/+4
| | | | | | | | | | | | | | | | | | | | | about..." doesn't redirect to target page [4H] Bug: T388953 Change-Id: I3f1a5a75aaee564c717665932f861fe4719d57c3
* | | Replace a number of uses of class aliases with the real thingsJames D. Forrester2025-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | Found via disabling phan's alias support for a run (and ignoring wgLang's hard-coded state of being a \Language, alas). Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
* | | Merge "ResourceLoader: Improve error when including file in non-package module"jenkins-bot2025-03-261-0/+4
|\ \ \ | |_|/ |/| |
| * | ResourceLoader: Improve error when including file in non-package moduleHannah Okwelum2025-03-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way ResourceLoaderModule is currently set up, when packagedFiles are used to declare files, only a "main" script is initially executed, and other files are executed with require("./file path"). This is not the same with using "scripts" to declare your module files. Such scripts are concatenated together into one large script, and require() can only load modules in this instant. When you use require() in such script (outside a package file), we directly use mw.loader.require(). What this fix does is, if require("./*") is encountered in mw.loader.require(), it throws a descriptive error early, instead of later in a more confusing way as `Module "." is not loaded`. Bug: T386833 Change-Id: I97a572c9fefa41e6b97db1d9fd86706490da5c4f
* | | block: Normalize IP addresses and ranges for ApiQueryLogEventsTim Starling2025-03-243-21/+93
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Write an equivalent for IPUtils::sanitizeRange() in JavaScript. Add the tests from IPUtils, and also add a few extras for branches that were otherwise uncovered. * Use the new function when fetching block log entries for IP addresses or ranges. The linked task only mentions range normalization, but IPv6 addresses also need to be correctly normalized, e.g. the target "cafe::1" needs to search for "User:CAFE:0:0:0:0:0:0:1". * In Resources.php, specify a base path. Manually tested the Special:Block log searches with single IPv6 addresses, IPv6 ranges and IPv4 ranges. Bug: T388097 Co-Authored-by: MusikAnimal <musikanimal@gmail.com> Change-Id: Icee67dff9d5f36e48dcdbd5a3c17ae56206cb675
* | Merge "SpecialBlock [Codex]: reset blockId when the target user changes"jenkins-bot2025-03-241-0/+1
|\ \
| * | SpecialBlock [Codex]: reset blockId when the target user changesMusikAnimal2025-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The blockId is both a form field (it gets used in the API request) and also a behavioural so-to-speak, since the presence of a blockId is what highlights the row in the 'Active blocks' table. As such, when we want to clear behaviourial refs, also clear the blockId. Bug: T389056 Change-Id: I6e76ae847c9bedd47962df6330c70b60cc5481a4
* | | Merge "Special:Block [Codex]: Set the expiry infinity option in the form"jenkins-bot2025-03-221-3/+4
|\ \ \ | |/ / |/| |
| * | Special:Block [Codex]: Set the expiry infinity option in the formhmonroy2025-03-211-3/+4
| |/ | | | | | | | | | | | | | | The expiry 'Infinite' option might come from a custom message. Check the options and select the expiry `Infinite` option has been set. Bug: T388653 Change-Id: Ib22ef41deb121dc151a5ea8ca7d4ea5768041c66
* / ResourceLoader: In mediawiki.util use ES6 method syntaxTim Starling2025-03-211-32/+30
|/ | | | | | | | To reduce the bundle size and for consistency. Also use an arrow function in a place where that made sense. Change-Id: I5a638c232c13028ef75622d9f2fc0a2735fcdfa2
* build: Fix and re-enable eslint rule unicorn/prefer-includesJames D. Forrester2025-03-2146-113/+109
| | | | Change-Id: I34bb289e941751ae4722c708511326a2a5431bfc
* Merge "BlockLog.vue: show non-relative expiry where applicable"jenkins-bot2025-03-201-2/+16
|\
| * BlockLog.vue: show non-relative expiry where applicableMusikAnimal2025-03-191-2/+16
| | | | | | | | | | | | | | | | | | | | | | Log entries now correctly show the timestamp instead of a relavtive expiry if the date was entered as a timestamp. We aren't able to do the same for active blocks without a larger refactor, so for now it will continue to show computed relative expiries even for those entered as exact timestamps. Bug: T389275 Change-Id: Iae28dc9cfd6eb7193f7b5cfc7b34fd9537ae2079
* | Merge "Update Codex from v1.20.3 to v1.21.1"jenkins-bot2025-03-2033-251/+998
|\ \
| * | Update Codex from v1.20.3 to v1.21.1Anne Tomasevich2025-03-2033-251/+998
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T373222 Bug: T386152 Bug: T386482 Bug: T386485 Bug: T386997 Bug: T387217 Bug: T387218 Bug: T387867 Bug: T388709 Bug: T388710 Bug: T388831 Bug: T388835 Bug: T389094 Change-Id: Idd564f5720960a9376f6d83a25d19a42e9c50f19
* | Merge "Special:Block [Codex]: Update block form per latest designs"HMonroy2025-03-192-5/+6
|\ \
| * | Special:Block [Codex]: Update block form per latest designshmonroy2025-03-192-5/+6
| |/ | | | | | | | | | | | | | | | | * Add header to form. * Remove ":" from labels. * Update submit button label Bug: T387492 Change-Id: I1d10b8e0e4e82261f18e0ee2f3fc1379704709f1
* | Merge "SpecialBlock [codex]: fix contribs link in BlockLog"jenkins-bot2025-03-192-1/+2
|\ \
| * | SpecialBlock [codex]: fix contribs link in BlockLogMusikAnimal2025-03-182-1/+2
| | | | | | | | | | | | | | | | | | | | | Add mediawiki.Title as a dependency, used in the same component Bug: T389258 Change-Id: I2c6d7df0a0708d4131bece6bc514f4e09496101d
* | | Merge "SpecialBlock [Codex]: validate block ID when passed in via URL parameter"jenkins-bot2025-03-191-27/+28
|\ \ \ | |_|/ |/| |
| * | SpecialBlock [Codex]: validate block ID when passed in via URL parameterMusikAnimal2025-03-181-27/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the target is set properly, and thus auto-loading the form will also work (as $this->codeFormData['blockTargetExists'] is set). Use server-provided blockId in SpecialBlock.vue, and move the loading of blocks from URL param as well as the confirmCloseWindow logic to an onMounted() hook. Remove blockId from Jest fixture; this wasn't even being set by the server but we were pretending it was. Adjust other tests accordingly. Bug: T389198 Change-Id: Icf5130dc0a873b991513b4034e51ed006659f262
* | Merge "mediawiki.api: Allow setting Api-User-Agent via mw.Api constructor"jenkins-bot2025-03-191-0/+9
|\ \ | |/ |/|
| * mediawiki.api: Allow setting Api-User-Agent via mw.Api constructorGergő Tisza2025-02-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows passing a user agent in the constructor, which will be sent in the Api-User-Agent header (changing the User-Agent header is not possible under the browser security policy, and it also holds its own valuable information). Setting Api-User-Agent was possible already via the `headers` option, but was uglier and less obvious. Also, this patch adds a default of "MediaWiki-JS/<version>" * different from the MediaWiki PHP user agent ("MediaWiki/<version>"), * clearly related to MediaWiki frontend JavaScript * avoid generic words like "mw.Api" which are easily mistaken for any number of "MediaWiki" "API" things. Usage: const api = new mw.Api( { userAgent: 'MyGadget/1.0.1' } ); This allows gadgets, user scripts, MediaWiki core, and extension code to easily identify which client makes an API request. Identifying the client helps: * WMF and other sysadmins, to debug and find the source of a problem. * MediaWiki maintainers, to assess what disruption would be caused by backwards-incompatible changes in the API response or with proactively fixing clients before such changes. * Gadget and extension maintainers, by enabling them to use Special:ApiFeatureUsage to check whether they rely on deprecated APIs. Bug: T373874 Change-Id: I08cbe95675c7e3b6b3a20875f3d061afdc04efd6