Commit graph

1306 commits

Author SHA1 Message Date
Ammarpad e4684a751c modules: Remove width limit for code block with copy button
Enabling copy button should not affect block width.

Bug: T40932
Follow-up: Ic8ef030514c3b6dd2cb9b137f032588869ab3762
Change-Id: I47475fa5e974eb999386bd612e16898ebfbd3046
2024-09-26 17:47:50 +00:00
Translation updater bot 0159930cdd
Localisation updates from https://translatewiki.net.
Change-Id: I97ab3dbeb15021ee1796e97a9b417f484c3c8bf5
2024-09-26 09:20:34 +02:00
Translation updater bot d572751d2a
Localisation updates from https://translatewiki.net.
Change-Id: I7b91c2e90659b5be6ac17f3b519a8aadb9bd177d
2024-09-25 09:18:44 +02:00
jenkins-bot 4577cbe62f Merge "Fix bugs in link generation" 2024-09-24 23:33:22 +00:00
jenkins-bot e58d391b91 Merge "Implement copy buttons for code blocks" 2024-09-24 13:10:37 +00:00
Siddharth VP 341cd2bc37 Fix bugs in link generation
* Use mw.Title so that template links work for templates outside
template namespace, and so that titles are normalized.
* Use recursion instead of while loop so that both the segments before
and after the inserted link are searched for further linking
possibilities. Among other cases, this fixes the case where a template
link before a wikilink (on the same line) was not working. This also
avoids infinite iteration if mw.Title.newFromText() failed to create a
valid Title object.

Bug: T368166
Bug: T374693
Change-Id: I4d485340928b81df26ca035874422fdb5930710f
2024-09-15 11:57:26 +05:30
Siddharth VP 55630cc5ea Implement copy buttons for code blocks
<syntaxhighlight> blocks with a boolean "copy" param will now have a
button next to them for copying the code to the clipboard. Not
applicable for inline code blocks.

Adapted from the mediawiki.org gadget written by Krinkle.

Bug: T40932
Change-Id: Ic8ef030514c3b6dd2cb9b137f032588869ab3762
2024-09-11 01:31:14 +05:30
Siddharth VP 16538948ae Fix accidental use of IIFE
The function was being invoked immediately instead of as the jQuery
ready callback.

Change-Id: I08c5a5dad6652a598a2b4a6bed196ab18bee452a
2024-09-11 00:11:59 +05:30
jenkins-bot f2d0dde88c Merge "Enable clicking on wikilinks and external links in highlighted code" 2024-09-09 13:29:52 +00:00
jenkins-bot 3ff590922e Merge "Fix forced light mode background-color applied to the wrong element" 2024-09-09 13:18:01 +00:00
Translation updater bot 57278f4509
Localisation updates from https://translatewiki.net.
Change-Id: I912e0272c518e2f27d168d3d1feb52c355f6f6fe
2024-09-09 09:23:12 +02:00
libraryupgrader 906294c858 build: Updating micromatch to 4.0.8
* https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: Ie0006a39f08052ba94540ff30c8f8b0b166636b5
2024-08-31 07:52:05 +00:00
Bartosz Dziewoński 91f3235ed9 Fix forced light mode background-color applied to the wrong element
Changes for T356956 applied the styles in the wrong place.

`<div class="mw-highlight">` should have no background (and we need
to override the default Pygments styles that add it).

`<div class="mw-highlight"><pre>` and `<code class="mw-highlight">`
should have background (and we need to override core MediaWiki styles
that adapt to light/dark mode with forced light mode colors).

Bug: T365927
Change-Id: I473203b12673f7bc004f953ab33fe36fb897e095
2024-08-29 20:43:40 +02:00
Translation updater bot a8a6329362
Localisation updates from https://translatewiki.net.
Change-Id: I671f4de40302014c0df83d320ed09a25344be024
2024-08-28 09:40:23 +02:00
James D. Forrester d39e6b3a76 build: Update MediaWiki requirement to 1.43
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I6866c9075b425e2fd83feff6b1af1271a736528c
2024-08-22 18:28:23 -04:00
Translation updater bot 603db26e10
Localisation updates from https://translatewiki.net.
Change-Id: I7ba935fe2bc28152ab72494ab5c4811eeaced186
2024-08-19 09:25:22 +02:00
libraryupgrader 0bfdeec707 build: Updating mediawiki/mediawiki-codesniffer to 44.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected

Change-Id: I90829d944447688b0e8ed20a89b5bdfddaea392b
2024-08-13 06:30:06 +00:00
Fomafix b58d0bded1 Use MainConfig instead of global variables
Also use MainConfigNames.

Change-Id: I5b61c2badd2aa2163cbc429003a890bf559dc4f6
2024-08-12 21:06:29 +00:00
Fomafix 173e215bde Use overrideConfigValues instead of setMwGlobals
Also use MainConfigNames.

Change-Id: Ic51c376be4642eecbeb29d2ec2d2b2de388c2f61
2024-08-05 18:34:51 +00:00
Translation updater bot c1c5c68f52
Localisation updates from https://translatewiki.net.
Change-Id: Ie71bad428dc48414bda06f2b7d2a5750634832b4
2024-08-02 09:40:59 +02:00
Translation updater bot de56f35c4d
Localisation updates from https://translatewiki.net.
Change-Id: I9945becb44e59cab2d7155fd4f9fbd781bbcf6b5
2024-07-30 09:44:33 +02:00
Translation updater bot 41d2c6e605
Localisation updates from https://translatewiki.net.
Change-Id: I9d36eba6fe2d7c16e0cbf348c888df14f6b5a2f6
2024-07-29 09:28:37 +02:00
Translation updater bot 6fa111de51
Localisation updates from https://translatewiki.net.
Change-Id: Ie993d9d55d0410b7c29ff716af1899a867d92fcb
2024-07-26 09:46:55 +02:00
Translation updater bot 79331f6677
Localisation updates from https://translatewiki.net.
Change-Id: Ib557d34447aa245abcf13ce60aa91e7f4519ccef
2024-07-19 09:41:56 +02:00
Andrea Denisse Gómez-Martínez 0249ef7273 Migrate MediaWiki.syntaxhighlight_shell.*.rate to statslib
This patch migrates the `syntaxhighlight_shell` metric to the new Prometheus
format while copying the equivalent graphite counterpart to Graphite for
backwards compatibility with the existing Grafana dashboards.

Bug: T359270
Change-Id: I95bc2e749324092aae5db9135847c28aa16c64ea
2024-07-05 10:30:25 -06:00
Translation updater bot 70d0df0867
Localisation updates from https://translatewiki.net.
Change-Id: Ib4ebbe058df8b943147c1e37ca812e65d291b14a
2024-07-01 09:26:30 +02:00
Translation updater bot e3f230f6a4
Localisation updates from https://translatewiki.net.
Change-Id: Idc1ed49426b8c1aea103bce0cedc2a1507419669
2024-06-28 09:42:51 +02:00
Siddharth VP 7fa3abe91e Enable clicking on wikilinks and external links in highlighted code
It's common practise to use [[wikilink]] syntax to mention page names
in comments of JS/CSS/Scribunto code where the links ordinarily don't
work. Using JavaScript to actually make the syntax clickable makes
navigation easier.

{{Templates links}} and external links are also supported.

Bug: T368166
Change-Id: I999937c1f6303ecc64adb6285e73a9ce10f67bd8
2024-06-22 12:35:22 +05:30
libraryupgrader dbb735bda8 build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.0 → 0.28.2
* grunt-stylelint: 0.20.0 → 0.20.1
* stylelint-config-wikimedia: 0.17.1 → 0.17.2

Change-Id: Ie72ab806709d12d2f143de7da9f019b4263498fd
2024-06-22 02:53:34 +00:00
Translation updater bot 69a8a31c0a
Localisation updates from https://translatewiki.net.
Change-Id: I42587706b1faa5f4950b1b92da837871d9a6cd50
2024-06-17 09:33:01 +02:00
Translation updater bot 4127ae3181
Localisation updates from https://translatewiki.net.
Change-Id: Icb85b207b548bbaa0116697d20a401d5dd4ab01f
2024-06-12 09:22:59 +02:00
Umherirrender 888aa0e373 Use namespaced classes
Changes to the use statements done automatically via script

Change-Id: Ifa5d93fd8c4b96fa22e6c4bbadc0e9c5315d7be1
2024-06-10 20:40:28 +02:00
libraryupgrader a3a2e5a060 build: Updating npm dependencies
* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: Iee3227463ce4544d7a2ea7d3bf3b4fb0f3e77df9
2024-06-08 04:58:42 +00:00
Ed Sanders cd421a4b1d build: Update eslint-config-wikimedia to 0.28.0
Change-Id: Ia565bd4d314b7b512a46c4bb2af74784d5c2edc1
2024-06-06 16:33:02 +01:00
jenkins-bot 780b3baf13 Merge "JSDoc: @mixins -> @mixes" 2024-06-03 21:11:47 +00:00
Translation updater bot c4ce195386 Localisation updates from https://translatewiki.net.
Change-Id: I0891fa3810ca390e8778fc8ed4ae8ac488de1a83
2024-06-03 09:33:08 +02:00
Novem Linguae 859db0ef3d JSDoc: @mixins -> @mixes
Convert old JSDuck syntax to new JSDoc syntax

Bug: T366230
Change-Id: If1103a5945f6be02f9f6d81ec361e873e40d0192
2024-05-31 15:38:02 +00:00
Steven Rawson 8662badc21 SyntaxHighlight: Add color to override skin
Bug: T356956
Bug: T365774
Change-Id: I968aa7c9fe28ee83cb62dfd78575e426da5daf5e
2024-05-25 23:32:36 +00:00
jenkins-bot 4688fe720a Merge "Apply background to pre tags" 2024-05-20 19:25:47 +00:00
jenkins-bot ce65160b40 Merge "Pygmentize: report stderr when exit code != 0 and stdout is empty" 2024-05-20 13:31:10 +00:00
libraryupgrader 8edabdced1 build: Updating grunt-banana-checker to 0.13.0
Change-Id: I9ccd09b18e0f89bd5a2a6be83dbb62a925041ed0
2024-05-19 04:06:16 +00:00
Bryan Davis ee1a6c20d7 Pygmentize: report stderr when exit code != 0 and stdout is empty
Most python error messages are reported to stderr rather than stdout. In
the event of a catastrophic failure executing the Pygments binary we are
likely to need to report stderr so that folks can debug the problem with
the executable.

Bug: T364249
Change-Id: Id5e5dbc515fdcdeb6eec61aacbbb9cbeddc79fab
2024-05-17 11:01:28 -06:00
Jon Robson 9ecaf3bd13 Apply background to pre tags
This overrides the default skin rule for pre elements as seen
on [[mw:MediaWiki-Docker%2FExtension%2FWikiLambda]]

Bug: T356956
Change-Id: I0a28323f4269e7afb89dce78927e048734f15a49
2024-05-17 14:37:43 +00:00
Novem Linguae e96144ff92 eslint: remove redundant ruleset wikimedia/jsdoc
The ruleset wikimedia/client-es6 already contains
the ruleset wikimedia/jsdoc. So wikimedia/jsdoc
doesn't need to be declared.

Bug: T365047
Change-Id: I59c8f9a244ff727273783b4a3104929232801819
2024-05-15 18:08:16 +00:00
Translation updater bot 0ed68b8c60 Localisation updates from https://translatewiki.net.
Change-Id: Ie7d2a6e57581284fb13bf39c6b124f3dbb88a265
2024-05-14 09:27:20 +02:00
libraryupgrader ac48cdaa71 build: Updating grunt-banana-checker to 0.12.0
Change-Id: I29142c3edc4c0839d0e35e615b72ced962282530
2024-05-11 00:20:44 +00:00
libraryupgrader af69aef865 build: Updating composer dependencies
* mediawiki/minus-x: 1.1.1 → 1.1.3
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

Change-Id: I0b7c50835b030cd73f1ea947bf73116fe5463777
2024-05-06 07:07:38 +00:00
James D. Forrester 5e92671865 eslint: Configure to lint against JSDoc, not old JSDuck
Bug: T138401
Change-Id: I82ae6840c1a37ce9b71e946674eb078c98f84c4b
2024-05-01 08:15:32 +01:00
Ed Sanders e69f76ffc8 Use ES6 syntax (arrow callbacks and let/const)
Change-Id: I494f8ee3ab3d805aafbc1c95a5b19b34de598d2b
2024-04-29 21:09:27 +01:00
Ed Sanders 596981f4ef build: Update linter config
Change-Id: I9c02dbfb7ccb1c50676f940357abbd6fbadede73
2024-04-29 21:09:27 +01:00