Commit graph

11367 commits

Author SHA1 Message Date
Kunal Mehta
39edc88921 Commit swagger-ui's NOTICE
It contains the copyright statement that accompanies the LICENSE.

This doesn't not address the concerns in T382086, which is that
swagger-ui bundles other projects without retaining their copyright
statements, but gets us one step closer by including at least some
information.

Change-Id: I11e80abee385576e7e0350bd5d7a43758d2b2e92
(cherry picked from commit 9361efc5bc0d92c4e49ed5a3cadae357bafb79a7)
2025-01-15 16:09:22 +00:00
SomeRandomDeveloper
f0ea287c97 Fix color contrast issue on Special:ProtectedPages
Change the color for elements with the class mw-protectedpages-unknown to use
the color-subtle token instead of #72777d, as discussed in T367826. This
increases the constrast in dark mode.

Bug: T367826
Change-Id: Ibfe437242dcf6875c77ddddcd84e4705d50cdc30
(cherry picked from commit c1322844652e5285c4c6663770047d408fb1506d)
2024-11-15 22:52:23 +00:00
Anne Tomasevich
816e44f199 Update OOUI to v0.51.2
Release notes:https://gerrit.wikimedia.org/g/oojs/ui/+/v0.51.2/History.md

Bug: T210534
Bug: T324382
Bug: T376276
Depends-On: I50ec27302347203170cb14c7228b6c3d3264b24c
Change-Id: Iea7cbc00d988504660754e8728707d0021ae37d7
(cherry picked from commit eb6a4ea1ae271668a0ef78e86ccc180d84614e68)
2024-11-13 20:20:25 +00:00
Bartosz Dziewoński
2c611fa5be mw.jqueryMsg: Simplify special cases for parser functions' first param
It turns out that the fix in Ia4d57fd953dbd34e45789208ec8e765cce6ddf15
is general enough that we don't need these special cases any more.

Bug: T379418
Change-Id: I7c29d68325a3525463cd22cd6da5710848619b85
(cherry picked from commit 35c367cbef4da5be6d4ba54190efdf20a5d18b26)
2024-11-12 14:21:35 +00:00
Bartosz Dziewoński
cc98ec4e1b mw.jqueryMsg: Allow complex expressions in parser functions' first param
When parsing wikitext like `{{func:a|b|c}}`, jqueryMsg accepted
multiple expressions in the parameters following '|' (which are
handled by templateParam()), but not in the first parameter
following ':' (which is handled by templateWithOutReplacement()).

So, `{{#FORMAL:Informal hello|{{GENDER:|Formal}} hello}}` worked,
but `{{#FORMAL:{{GENDER:|Informal}} hello|Formal hello}}` didn't.
Now they both work.

Bug: T379418
Change-Id: Ia4d57fd953dbd34e45789208ec8e765cce6ddf15
(cherry picked from commit 8b173830762738206919bd7b1a9ce3bba72dab5d)
2024-11-12 14:21:26 +00:00
Jon Harald Søby
6ff5c7dcb0 Support {{#FORMAL:}} syntax in jqueryMsg
Add support for the new {{#FORMAL:}} syntax in jqueryMsg.
Add formalityIndex to mw.language.data, and add parsing for
this syntax mediawiki.jqueryMsg.js.

Bug: T366602
Change-Id: Idc6ce0d590729830fd734cccae860f2430b8475c
(cherry picked from commit 05170a2ea8d10b5f177cba1797e00babea52e941)
2024-10-24 16:51:37 +00:00
jenkins-bot
6cf20c5296 Merge "mediawiki.special.block: "Editing their own talk page" is inverted" 2024-10-22 08:47:39 +00:00
MusikAnimal
f6e92bbda3 Special:Block [Codex]: show full list of namespaces when field is empty
Bug: T377715
Change-Id: I7a6a620350a8218be5bfec9fb2d7c4d2e627bfdf
2024-10-22 00:25:51 -04:00
hmonroy
76775b907f mediawiki.special.block: "Editing their own talk page" is inverted
'allowusertalk' should be set in the block API call  when the "Editing
their own talk page" is NOT checked.

Bug: T376924
Change-Id: I19bab1e4dd6172e3d43c4bbda50765a173f6bcf0
2024-10-21 09:42:47 -07:00
jenkins-bot
d4fd7ebb07 Merge "Follow-up I7e66bd7517: Only emit onRouterHashChange when the hash changes" 2024-10-21 13:59:19 +00:00
Ed Sanders
85a8921272 Follow-up I7e66bd7517: Only emit onRouterHashChange when the hash changes
Bug: T377672
Change-Id: I8f4ed957a4a71014b7ea6d87e4a758edfd4a5790
2024-10-21 13:38:53 +01:00
jenkins-bot
1d79c173cf Merge "SpecialBlock [Vue]: add NamespacesField and PagesField components" 2024-10-21 01:53:28 +00:00
Anne Haunime
72b9cfd0f8 Simplify code to avoid interpreting "$" characters in string replacement
Bug: T375132
Change-Id: I568ab391fe8a3cf093afae857e0d249e05fb5f38
2024-10-18 22:14:23 +00:00
jenkins-bot
47f055f6a6 Merge "SpecialBlock: Handle partialBlockActionOptions being null" 2024-10-18 17:27:57 +00:00
jenkins-bot
a8c7976868 Merge "mediawiki.router: Call onRouterHashChange after push/replaceState" 2024-10-18 15:32:10 +00:00
Sam Wilson
6c1f729858 SpecialBlock: Handle partialBlockActionOptions being null
Bug: T377448
Change-Id: I3419d83e6b990bfb5e7519e6c84b80d09f46d690
2024-10-18 08:54:46 +00:00
jenkins-bot
e0ef813778 Merge "live preview: Do not add edit/view-source link for special pages" 2024-10-18 00:14:14 +00:00
jenkins-bot
5b7fdde90d Merge "SpecialBlock [Vue]: require confirmation for hidehuser and self blocks" 2024-10-17 21:58:17 +00:00
MusikAnimal
4a8c6c4838 SpecialBlock [Vue]: load extension-provided messages
Extension:Thanks adds an action to block user from sending thanks.
This uses the 'ipb-action-thanks' message, which we don't want to
explicitly ask for because it is not a Core message.

Bug: T377402
Change-Id: Iceceb860e2bc7c373fd26624cfc3f57467136555
2024-10-16 22:00:47 -07:00
jenkins-bot
a6be63ed10 Merge "SpecialBlock [Vue]: add Pinia store for state management" 2024-10-17 04:46:00 +00:00
Ed Sanders
07cbb7f9d7 mediawiki.router: Call onRouterHashChange after push/replaceState
history.push/replaceState doesn't trigger a hashchange event,
so call onRouterHashChange manually.

This means a preventable 'route' event is always emitted when the
hash is changed.

Change-Id: I7e66bd7517d2e708ed9150c80a56eeb104143be7
2024-10-16 23:00:58 +00:00
Ed Sanders
6a2b602cce mediawiki.router: Move hashchange handler to a real method
Change-Id: Ice98552aa2987e0fe97a6c45193aecd7e645eaae
2024-10-16 22:59:00 +00:00
MusikAnimal
5fcc50be82 SpecialBlock [Vue]: add NamespacesField and PagesField components
These use the new CdxMultiselectLookup component.

Values for the two inputs can be pre-filled with the
'wpPageRestrictions' and 'wpNamespaceRestrictions' URL parameters.

Tests to be added in a future patch (along with other tests around
partial blocks).

Bug: T362718
Bug: T362912
Bug: T368583
Change-Id: I53739bcdd63870fbfb57bc96298fc8d467bdfc2b
2024-10-16 18:39:36 -04:00
MusikAnimal
fa8dea7798 SpecialBlock [Vue]: require confirmation for hidehuser and self blocks
Special:Block is supposed to show a 'Confirm block' checkbox under two
conditions: if the 'hide username' option is being used, or if the user
is blocking themselves.

This patch takes the SPA-like behaviour a step further and will disable
the submit button and show the confirmation checkbox if the user target
is changed to the current user, or if the 'Hide username' checkbox is
checked. The logic of hiding the confirm checkbox and re-enabling the
submit button should follow the same rules.

Add `withSubmission()` helper to SpecialBlock.test.js and add test cases
for the newly added code.

Bug: T376754
Change-Id: Ie990051ae62b11f3a27bbc4cfc5c714a0096e2f3
2024-10-16 17:30:05 -04:00
MusikAnimal
b5fcc80af0 SpecialBlock [Vue]: add Pinia store for state management
Add a 'block' Pinia store to house all block-related data use in the
SpecialBlock.vue application. Minimal refactoring is done to make use of
the store, rather than passing around props.

UserLookup is reworked to only update the store's targetUser property on
a 'change' event, since the Codex Lookup component wants a "selection"
while we want to allow arbitrary input. This means anything that listens
to changes to the targetUser isn't fired off too quickly (i.e. API
requests, or flashing error states).

Other changes:

* Remove 'disabled' attribute from ExpiryField as the disabled state is
  applied automatically.
* Change SpecialBlock.test.js to test against a date that's not a mere
  decade away.

Bug: T376741
Depends-On: Ia88d987bf7e5afa1a17d63b4ebc96448ccec2f6c
Change-Id: Id6cff21eeeeb86876e59f70994ad10658ab6d9be
2024-10-16 17:30:04 -04:00
jenkins-bot
544a959d5b Merge "Add ARIA labels for the table of contents toggle button" 2024-10-16 17:36:55 +00:00
lwatson
15eea4cea6 Update Codex from v1.13.1 to v1.14.0
Bug: T362650
Bug: T370057
Bug: T371118
Bug: T374659
Bug: T374882
Bug: T375699
Bug: T375700
Bug: T376024
Bug: T376622
Change-Id: I18684997862a1a6427627d8061a2583fff00e621
2024-10-16 09:11:15 -07:00
Amir E. Aharoni
e2003b9bd2 Add Tai Nuea to line-height fixes file
Bug: T377294
Change-Id: I5fd3a942a6438a902307c651f90e95002df78435
2024-10-15 22:50:22 -04:00
jenkins-bot
1f7b364be1 Merge "mediawiki.router: Convert some instances of let to const." 2024-10-16 01:26:37 +00:00
Ed Sanders
5a72d16766 mediawiki.router: Convert some instances of let to const.
Change-Id: I59c68476dbde9acd0e8223d07fecfd452d502a6c
2024-10-16 00:38:41 +00:00
jenkins-bot
5c5d0882ef Merge "mediawiki.router: use this" 2024-10-16 00:21:10 +00:00
Simon Legner
3acd948ed4 mediawiki.router: use this
Thanks to arrow-callbacks, we can use `this` directly.

Change-Id: I31c6280b2d80df8dd9b755d8d36c44f0f3e0f141
2024-10-15 23:42:45 +00:00
Ammarpad
3036dd8f4f live preview: Do not add edit/view-source link for special pages
'Templates' shown in preview can contain transcluded pages and
special pages. Skip adding edit/view-source links for special
pages as they're always not editable and have no viewable source.

Bug: T376964
Change-Id: Ie8021e79d8032074a4c37affdf3a47e2574df62b
2024-10-15 17:19:56 +01:00
Bartosz Dziewoński
3620f2da18 SpecialBlock.vue: Autofix eslint warning
I ran `grunt eslint --fix` and noticed these changes.

Change-Id: I5f7ee10981c9a48da3ffd90f6bc76320cd347233
2024-10-15 16:48:45 +02:00
hslater
3ec3ff8d42 Add ARIA labels for the table of contents toggle button
Added "Show the table of contents" ARIA label for the button when the TOC is hidden.
Added "Hide the table of contents" ARIA label for the button when the TOC is displayed.

Bug: T336098
Change-Id: I922dc12287c241d6937acad0d9ec12eccc439014
2024-10-15 21:46:46 +13:00
jenkins-bot
4289b8a576 Merge "Deprecate .horizontal-gradient and .vertical-gradient Less mixins" 2024-10-12 11:10:33 +00:00
jenkins-bot
a11f20989b Merge "mediawiki.special.block: Clarify "no reason given"" 2024-10-10 19:38:46 +00:00
jenkins-bot
4220cc9fe8 Merge "mediawiki.special.block: Add "See full log" link" 2024-10-10 18:38:40 +00:00
jenkins-bot
081d9e7ee4 Merge "mediawiki.special.block: Preset remaining URL parameters" 2024-10-10 17:18:06 +00:00
TheresNoTime
e3c25ad3ee mediawiki.special.block: Clarify "no reason given"
Set a distinct style on the "no reason given" message
Set `aria-label` to clarifying message for screen readers

Bug: T376746
Change-Id: I7d0f73ff7031f9d08f488a580681ccc8b7c3d93c
2024-10-10 14:06:09 +01:00
jenkins-bot
0393cd05b5 Merge "mediawiki.special.block: Link timestamp to log entry" 2024-10-10 12:23:27 +00:00
jenkins-bot
4570f1bc3a Merge "mediawiki.special.block: Modify TargetBlockLog behaviour" 2024-10-10 12:22:19 +00:00
TheresNoTime
c41eae4b17 mediawiki.special.block: Add "See full log" link
Add a "See full log" link to TargetBlockLog
Add Jest test to TargetBlockLog

Bug: T376742
Change-Id: Ibf1ef088c23fa67c1710ea037cc5838977113007
2024-10-10 12:27:41 +01:00
TheresNoTime
23c2ee4abc mediawiki.special.block: Link timestamp to log entry
Link to `Special:Log?logid=` from the timestamps in the
TargetBlockLog table.

Bug: T376743
Change-Id: I86d18b3a887f3a5623660ca4410c808139c579ee
2024-10-10 11:01:02 +00:00
TheresNoTime
816baee019 mediawiki.special.block: Modify TargetBlockLog behaviour
Remove the "target" column
Add a column "type" with fields "Blocked"/"Unblocked"
Add Jest test for TargetBlockLog

Bug: T368111
Change-Id: I3e9145df62046baaa3fe762a6f57c932a976508c
2024-10-10 11:47:45 +01:00
hmonroy
0d1fbcb2dc mediawiki.special.block: Preset remaining URL parameters
Add wpEditingRestriction, wpReason, wpReason-other, wpHideName to
parameters that are allowed in the URL.

Bug: T368583
Change-Id: Ibf08eb8b4e44383407dbf4f9a30ef86a2b317276
2024-10-09 10:38:47 -07:00
jenkins-bot
566b8c49db Merge "SpecialBlock, mediawiki.htmlform: remove OOUI/Codex conflicts" 2024-10-08 12:01:24 +00:00
jenkins-bot
3de08aa913 Merge "ExpiryField.vue: fix preselection of expiry field and add tests" 2024-10-08 06:07:07 +00:00
MusikAnimal
092aab36e5 SpecialBlock, mediawiki.htmlform: remove OOUI/Codex conflicts
Instruct Special:Block to only load OOUI and the old JS module
when we're not using Codex.

Fix six year-old bug (from I20d11d7cc4) in mediawiki.htmlform's
selectandother.js where OOUI was incorrectly being assumed, causing
'Widget not found' errors at Special:Block when $wgUseCodexSpecialBlock
is true.

Bug: T358934
Change-Id: Ia959d297ac9043804975f170eec66ddd4c1fe492
2024-10-08 02:04:00 -04:00
MusikAnimal
8087bef18a ExpiryField.vue: fix preselection of expiry field and add tests
With this change, the ?wpExpiry query param and the interface message
[[MediaWiki:Ipb-default-expiry]] accept only the following formats:

* /\d+ [a-z]+s?/ – such as "1 month", "2 weeks", etc.
* infinity values: 'infinite', 'indefinite', 'infinity', 'never'
* ISO 8601-like datestamp

In addition, [[MediaWiki:Ipboptions]] now requires an option be preset
with the value 'infinite'.

Rename `blockDefaultExpiry` to `blockExpiryDefault` for consistency.

Bug: T368583
Change-Id: Ibc648117e6d4981c84e9df9f933ba033d339e908
2024-10-08 00:31:36 -04:00