Previously, ResourceLoader's CodexModule class was using a hard-coded
list of message keys to add to the payload any time Codex components
get used. But now we can get the list of messages directly from
Codex. This change replaces the hardcoded list of strings with
a call to file_get_contents().
The list of messages is defined in a file called "messageKeys.json"
in the Codex package. In the next release of Codex, this file will
be pulled in via foreign-resources.yml; for now it has been added
manually to the Codex files in resources/lib.
Bug: T371330
Change-Id: Ib7ca66d67153dfba72d8d49b0181d49b007eedce
Note that CSS module filenames in this release have an extra 'Cdx'
prefix - this is a known bug that will be resolved with the next
release. For now, these files are not used directly, and are
properly tracked by the manifest, so there should be no discernible
changes. See T366206.
Bug: T363432
Bug: T363858
Bug: T364611
Bug: T364636
Bug: T364762
Bug: T364789
Bug: T364894
Bug: T364927
Bug: T364929
Bug: T364934
Bug: T365003
Bug: T365363
Bug: T366097
Depends-On: I04c1250aef3afbff43c11a012194263ec6b0f533
Change-Id: I4988a93e8cb0f33c198303403dde8d92223d63c4
This commit does not yet delete the following files, which are still
used by MinervaNeue:
- resources/lib/codex-design-tokens/theme-codex-wikimedia-experimental.css
- resources/lib/codex-design-tokens/theme-codex-wikimedia-experimental.less
- resources/lib/codex-design-tokens/theme-codex-mode-dark.less
These files will be deleted in a follow-up change.
Bug: T346168
Bug: T360069
Bug: T360071
Bug: T360079
Bug: T360806
Bug: T361325
Bug: T362709
Bug: T362710
Bug: T362861
Bug: T363006
Bug: T363137
Depends-On: I350cb2dcf2de2e1944fffd38c8cafe9522706f0c
Depends-On: I539f4523b8d15a7815b303078529eb945c479be4
Depends-On: Icfcb5c7418061a5727580f0685054356ba4edb72
Change-Id: I1f54bf4f144eaec6ed317c04bd0c851c2f01b42c
This patch removes Codex search references from the
foreign-resources.yaml file since MediaWiki no longer makes use of the
files to get access to search functionality.
This is a follow-up to
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/992458.
Instead MediaWiki uses the code splitting approach described in
https://phabricator.wikimedia.org/T349423.
Bug: T357596
Change-Id: Ibff5e3128519fb731a2bd8f765bdc544fd700c4b
This is still experimental and not necessarily stable, but adding this
for now so that skins can experiment with it.
A skin can select this theme by setting the SkinCodexThemes entry for
its skin to "experimental".
Also rework CodexModule::getManifestFilePath() to be array-based, now
that we have more than two themes to handle there.
Bug: T356542
Change-Id: I6791d4d8c6686845181af7bc79f6eecc1e601add
In preparation for updates to the CodexModule class, which will
enable ResourceLoader modules to request a subset of Codex
components, styles, and/or composables, add the distributed
module files for each component and composable, plus the
generated manifests that map dependencies.
This patch both:
- Includes the module directory in the foreign resource definition,
so the module and manifest files will be included during
subsequent releases
- Adds the files themselves
Bug: T350054
Change-Id: I8f03eceb053d3edb690d6f0182da438cfff7c468
This includes new unminified ESM files for codex and
the codex-search subset.
Bug: T295186
Bug: T347613
Bug: T348608
Bug: T348775
Bug: T348890
Bug: T349411
Change-Id: Ib69e00cdedf40fa7f054c21002554360d5682406
In preparation for Codex's upcoming 1.0 release, this patch makes
some additional changes in how the library is vendored into MW.
* foreign-resources.yml: codex-search is removed as a stand-alone
package (the upstream NPM package has also been deprecated).
The search-specific build of Codex now lives in the main "codex"
package. The foreign-resources.yml file has been updated to pull
in the codex-search scripts and styles from this new location.
* resources.php: The resource module definitions for codex-search
and codex-search-styles have been updated to use the relocated
CSS/JS files.
* UMD bundles: Upstream, Codex now designates the CJS bundle as the
primary entry point. A UMD bundle of the main Codex library is still
produced but this is intended mainly for usage through CDNs or basic
script-tag inclusion; in the future the codex.umd.js bundle may be
removed from MediaWiki and users should not rely on it. The
codex-search.umd.js bundle has been removed.
* MJS bundles: Codex also produces .mjs (ESM) bundles upstream;
for users outside of MediaWiki these are the recommended bundles
to use. However, within MediaWiki only the CommonJS build should be
used, as ResourceLoader does not support delivery of ESM scripts at
present. The codex.mjs and codex-search.mjs bundles have been removed
from MediaWiki with this patch.
Bug: T335324
Bug: T340020
Bug: T340119
Bug: T344848
Bug: T345281
Bug: T345688
Bug: T346099
Bug: T346435
Bug: T346988
Change-Id: I84b26ddf5f9a0a98faf0df8c7acaa5f678032786
Also update the location of the codex-icon-paths.less alias file for a
change made in Codex v0.8.0, and add newly added tokens to
mediawiki.skin.defaults.less.
Bug: T285592
Bug: T295165
Bug: T295711
Bug: T312987
Bug: T324708
Bug: T328602
Bug: T331403
Bug: T332167
Change-Id: I0ed32fb5913a3bc33245c8e884a64abb11afa5b8
If5c0cb9f1458ecbc22e1b16d2c400043958fe453 added several .less files to
the list of files to download from Codex, but in parallel to that,
I72f5b2f95db0fa266d355a47f6b568c24f916bb3 updated Codex from 0.6.2 to
0.7.0. This resulted in the 0.6.2 versions of these files being added
even though we're already on 0.7.0.
Redownload these files so that they're updated to the 0.7.0 versions.
Change-Id: I55a30e6669d270427fbbf64b41f5b1aa1fc4121b
This release adds separate -legacy CSS files, which should be used in
skins with a 14px base font size. For now, use these legacy styles in
all skins. Using the non-legacy styles in non-Vector skins will be done
in a follow-up change.
Bug: T260617
Bug: T295711
Bug: T305411
Bug: T312582
Bug: T313318
Bug: T314661
Bug: T321470
Bug: T322383
Bug: T323524
Bug: T324367
Bug: T324792
Bug: T325105
Bug: T325560
Bug: T325772
Bug: T325903
Bug: T326557
Bug: T327048
Bug: T327395
Change-Id: I77215c2ae328c143920c64b1cdb162931546d6df