Commit graph

4247 commits

Author SHA1 Message Date
Steph Toyofuku 1f564dfb23 Fix color for inline styles with background color in night mode
Use CSS to target parsed content where a background color is defined
inline without an accompanying text color.  Additionally, add an ADR
documenting this decision to the repo

Visual change in night mode only, as the text color will now be correct

Bug: T358797
Change-Id: If375c4c9691462d314e91a74da0fc8365137cd8c
2024-03-11 15:43:37 -07:00
jenkins-bot df7c22088c Merge "Fix casing of dropdown-related less file" 2024-03-11 13:41:03 +00:00
Translation updater bot 2edfaae7c6 Localisation updates from https://translatewiki.net.
Change-Id: Ia952bc92195d10b3d5a8b9563bedb1b5369bc025
2024-03-11 08:30:24 +01:00
jenkins-bot 6954616670 Merge "LanguagesHelperTest: Use @dataProvider to configure test cases" 2024-03-11 07:18:51 +00:00
Umherirrender 88b78b247c build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: I693651564cc544b881e1a45ea8abeff8d58d8fb6
2024-03-11 00:34:07 +01:00
Fomafix 52dd233f5e Move Hooks::setMinervaSkinOptions to class SkinOptions
This allows to inject the services.

Change-Id: If091c7c5df2d498cdb7d82db89876dab8a82c3fc
2024-03-09 22:34:28 +00:00
Fomafix 916ead077f Remove useless ->expects( $this->any() ) or use $this->once()
Change-Id: Icfb5a6294f86a108c66c872270de0f0205596b4d
2024-03-09 21:29:44 +00:00
Umherirrender e82d8e7121 Fix casing of dropdown-related less file
Follow-Up: Ifda13ba9dee316709c424636ec3b285de8d0e9b1
Change-Id: I4c310770af6039cfa7931f4319571c77d35b9ef6
2024-03-09 15:45:32 +01:00
Jon Robson 0ca85691dd Expand the list of classes where colors are disabled in night mode
Based on list on [[mw:Recommendations_for_mobile_friendly_articles_on_Wikimedia_wikis]]
and running color contrast checker on every project.

Bug: T358164
Change-Id: I1ecbc1bac060eae4b9d99f461284d15b5da3d576
2024-03-08 21:55:59 +00:00
jenkins-bot 201cad0f66 Merge "Inject service LanguageConverterFactory in LanguagesHelper" 2024-03-08 20:44:55 +00:00
Jon Robson 9614949134 Force color and background rules in night mode for infoboxes
In the current theme the background and color can be overriden by
style attributes, however in night mode this shouldn't happen

This helps the following projects:
- https://ext.m.wikipedia.org/wiki/Par%C3%ADs?minervanightmode=1
- https://kl.m.wikipedia.org/wiki/Paris?minervanightmode=1
- https://szl.m.wikipedia.org/wiki/Pary%C5%BC?minervanightmode=1

Bug: T357453
Change-Id: I4c45b1e62b60d9ae42a2948707134745a9b7f808
2024-03-08 09:16:43 -08:00
Jan Drewniak 65f1300b78 Add color: var( --color-base ); to .notheme class
Adds a rule that makes elements using the .notheme class
inherit black text unless specified otherwise.
This addresses situations where elements relying on
inheritance for color.

Bug: T358528
Change-Id: Ie59c31b5e25684ff5ecad507a273fbe71af4bca0
2024-03-07 16:02:02 -08:00
Translation updater bot 9864299738 Localisation updates from https://translatewiki.net.
Change-Id: I2f76f31f49b670620941fe85a3ced56729b03c26
2024-03-07 08:51:18 +01:00
Translation updater bot 9fbbabfc92 Localisation updates from https://translatewiki.net.
Change-Id: I23a8563133b0465db482ab0498ca0fe4f23c8131
2024-03-06 08:21:32 +01:00
Jan Drewniak aef7b869b1 Rename --color-link--visited to --color-visited
During the Codex experimental build integration, some non-standard
variable color names were not replaced with standardized ones.

This patch replaced:

--color-link--active -> --color-progressive--active
--color-link--visited -> --color-visited

Bug: T356928
Change-Id: I48925009300565adbd7af815138d150219c7e88a
2024-03-05 20:05:46 -05:00
Fomafix 5a5315b927 Fix typo in variable name
Change-Id: I5461ea73b15bb8064d02a5f87135dc13b0ec53d5
2024-03-05 20:58:06 +00:00
bwang 72be98a638 Set background/color to inherit for common templates in dark mode
Bug: T358164
Change-Id: I494275970728e2c6be5cebe422249ab4c4f88ba5
2024-03-05 19:34:29 +00:00
Fomafix 2f5b6f7c02 LanguagesHelperTest: Use @dataProvider to configure test cases
The two test cases can combined.

Change-Id: I7bff4993e87d8c7a95eb55d4e4596f9330105391
2024-03-05 18:37:35 +00:00
jenkins-bot aef5d42e2e Merge "Implement PreferencesGetLayoutHook" 2024-03-05 16:07:33 +00:00
Translation updater bot e7f9d348c7 Localisation updates from https://translatewiki.net.
Change-Id: I50bac3bf5f872808bfb96d487a6df01e695723c0
2024-03-05 08:29:50 +01:00
Jdlrobson 211171f227 Partial Revert "Set background/color to inherit for common templates"
This (partially)
reverts commit 9f541aafcc.

Reason for revert: Applying in light mode as well as night
mode where it was intending. The [bgcolor] rule is safe in both
modes so can stay.

Bug: T358164
Change-Id: I68c4d81209199d0257b7ba2590d19c258d9152e6
2024-03-04 20:02:27 -08:00
jenkins-bot 6dc80f7f05 Merge "Define message box, diff colors and missing box shadows for two themes" 2024-03-05 02:17:20 +00:00
jenkins-bot 2e321f29dd Merge "Remove wrong parameter $this->once()" 2024-03-05 02:03:13 +00:00
Jon Robson aa0a596c7d Define message box, diff colors and missing box shadows for two themes
Bug: T358402
Change-Id: I171b6ad8bb36e52704224c5d28bc6081bc07ace5
2024-03-05 01:51:18 +00:00
jenkins-bot 7721ffad8a Merge "Don't strip colors from links" 2024-03-05 01:17:05 +00:00
jenkins-bot d6330ef6d2 Merge "Strip color from infoboxes in night mode" 2024-03-05 01:16:23 +00:00
Jon Robson 9e4a81528a Don't strip colors from links
- in main page
- in sideboxes - these only contain over div elements so
use div instead of * selector

Bug: T357722
Change-Id: If0e9eeb9471f3990afd5254b51af8dbe9cb538e0
2024-03-05 00:54:46 +00:00
Steph Toyofuku 04708df310 Strip color from infoboxes in night mode
Target a number of common infobox formats and strip the custom colors of
text and backgrounds, as well as borders.  This is explicitly a first
pass, so not overly broad but will hopefully encompass a large portion
of the infoboxes we're concerned with

Visual change in night mode only

Bug: T357453
Change-Id: If57f1b1ef6b86a9e45ca655e2317fc31330d207e
2024-03-04 15:50:49 -08:00
jenkins-bot 708dc44fb9 Merge "Integrate Codex experimental design token build" 2024-03-04 23:46:36 +00:00
Jon Robson db465050d5 Fixes last modified bar colors when visited link
The last modified bar "by" text is purple when the link is visited.
(https://phabricator.wikimedia.org/F42396630)

Change-Id: I9a3789fe68b5427e00f617f1d0e1436e59842661
2024-03-04 23:17:09 +00:00
Jan Drewniak 649cb10622 Integrate Codex experimental design token build
Use the Codex experimental design token build to
providing CSS custom property version of design tokens
for night mode.

The build also provides Less variables which are
references to the CSS custom properties. These are
pulled into the mediawiki.skin.variables.less file
and propagated across core and extensions.

Bug: T358059
Change-Id: I78558f6cc1de91d62fb9f8cbf571f73b51eae8ca
2024-03-04 23:04:57 +00:00
bwang 9366943f7e Make notheme exception to CSS hacks
Bug: T358164
Change-Id: Ie7fe3b32be4fb6aa308574da42ce9413ab97eb94
2024-03-04 18:34:42 +00:00
Translation updater bot 2757cbc5ad Localisation updates from https://translatewiki.net.
Change-Id: Ib153a13174fc3e8b2150767bfbad335251848295
2024-03-04 08:26:17 +01:00
Fomafix fd0e6d4e4c Implement PreferencesGetLayoutHook
Change-Id: Iccf0fa1ba5b4c547a221f2d152f0f387f04848a2
2024-03-03 14:40:39 +00:00
Fomafix 52583a336d Inject service LanguageConverterFactory in LanguagesHelper
Change-Id: I2fd1b4c3b25a94cca59d08216390652759859a62
2024-03-03 13:00:31 +00:00
Fomafix 751da83410 Remove wrong parameter $this->once()
This parameter was probably intended as parameter for getTitle(), but
it is in the wrong parentheses. And even on a repair of the parentheses
the tests still fail with:

> 1) MediaWiki\Minerva\LanguagesHelperTest::testReturnsWhenOutputDoesNotHaveLangLinks
> ILanguageConverter::hasVariants() was not expected to be called more than once.

Also remove the useless ->with( $languageMock ).

Change-Id: I35a0617de2fe7dd0b58060cc8273ef756051d04f
2024-03-03 12:57:25 +00:00
libraryupgrader b8d656274a build: Updating npm dependencies
* jsdoc: 3.6.10 → 4.0.2
* jsdoc-wmf-theme: ^0.0.8 → 0.0.12
* es5-ext: 0.10.62 → 0.10.64
  * https://github.com/advisories/GHSA-4gmj-3p3h-gm8h

Change-Id: Id20981bd5cc0cdd104de29c4a9c50af33ac541f1
2024-03-03 02:28:50 +00:00
Fomafix 0e82eb5d40 LanguagesHelperTest: Remove unused parameter from method getTitle
The remaining
  ->expects( $this->any() )
is also removed, because it doesn't check anything.

Change-Id: I7651fa7f04fb314ff998cd9d68fd2a6099e4aadb
2024-03-02 21:50:12 +00:00
jenkins-bot 707d9340a5 Merge "build: Add coverage folder to .stylelintignore" 2024-03-02 02:46:08 +00:00
jenkins-bot e5c670f25b Merge "Move color-scheme property from :root to .skin-night-mode-clientpref-2" 2024-03-01 22:02:22 +00:00
jenkins-bot 351cfebce9 Merge "Invert all icons in UI that use background-image" 2024-03-01 21:42:28 +00:00
Umherirrender bf48b36b19 build: Add coverage folder to .stylelintignore
Change-Id: Ica44862fd57f77d27e5039d175e29cc773cc5b63
2024-03-01 22:36:41 +01:00
Jon Robson 89c99df5ef Invert all icons in UI that use background-image
Bug: T356822
Change-Id: I02e89837310009135d084ba31ab76fe2be5907af
2024-03-01 15:09:35 -06:00
jenkins-bot a46ac64378 Merge "Inject services in SkinMinerva" 2024-03-01 19:24:58 +00:00
jenkins-bot 1067ea5a2c Merge "Inject service UserIdentityUtils in DefaultMainMenuBuilder" 2024-03-01 19:01:43 +00:00
Jan Drewniak 0efbd88259 Move color-scheme property from :root to .skin-night-mode-clientpref-2
The color-scheme property allows certain elements
to change their appearance based on the system
light/dark mode settings.

Therefore, this property should only be applied if "auto"
night mode is enabled.

Bug: T358814
Change-Id: Ic2b836d9696706ab2c628e78cc2592716963e9a5
2024-03-01 14:00:37 -05:00
jenkins-bot ff82ad0428 Merge "Inject services in Hooks and MobileFrontendHooks" 2024-03-01 18:58:40 +00:00
jenkins-bot fd5c1413f8 Merge "Improve PHP code style" 2024-03-01 18:21:18 +00:00
jenkins-bot 57441d798a Merge "MinervaPagePermissionsTest: Remove unused parameter in buildPermissionsObject" 2024-03-01 18:20:36 +00:00
Translation updater bot 354345a831 Localisation updates from https://translatewiki.net.
Change-Id: Ic5e0943bd680f5f35cbc428293d1ebb8fb6925a1
2024-03-01 08:36:13 +01:00