Commit graph

1294 commits

Author SHA1 Message Date
jenkins-bot ab22b1400d Merge "Migrate page issue overlay to ES6 to fix display" 2024-12-05 20:11:55 +00:00
Jon Robson ab1b4873df Migrate page issue overlay to ES6 to fix display
In ES5 you can override getters via prototype but not
with ES6.
Rather than patch MobileFrontend just for this use case
its easier to patch Minerva.

Bug: T380314
Change-Id: I69ccdb93287dc5e080a0d5a8faa9d208dc67779d
2024-12-04 17:32:03 -08:00
lmora 9b48993728 Reduce ResourceLoader modules
Delete the following deprecated modules:
skins.minerva.base.styles, skins.minerva.mainMenu.styles,
skins.minerva.icons.wikimedia and skins.minerva.mainMenu.icons
And reorganize files for skins.minerva.styles

Bug: T266361
Change-Id: I35b1d9461edd63a1a5d488a2fdc6939547fd29ad
2024-12-04 15:44:17 -06:00
Volker E. 1b2923415f styles, images: replace outdated values with design system values
Replacing error colors with amended design system values.
Note, that error icon color is slightly lighter than the error
text color.

Change-Id: Ia25a9accff2c8ed643252c2cc609b9bb63db4c47
2024-11-21 17:22:53 -08:00
Jon Robson c5b6709e8f Remove transparent PNG icon handling
The existing code prevents a black square from appearing on late loading icons.
The problem with it is that if loaded late, it can override actual icon definitions
and make the icon invisible.

Since this typically applies in the case of icons loaded via JavaScript
this shouldn't be a problem on mobile web

Bug: T266361
Change-Id: Icee701761e9db69a6bffb7af4f608ec26c30f2be
2024-11-07 17:43:54 +00:00
Fomafix bc81b04ecd Remove redundant closure for all modules with packageFiles
Modules loaded with packageFiles are always executed in module scope
(with a closure), even in debug mode.

The behaviour of non-packageFiles debug mode is the only reason files
have closures.

https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Closure

Change-Id: I14ac680eb67d892618bbc13be9298ec9b8e0e2e9
2024-11-07 08:39:58 -08:00
Sjoerd de Bruin e2d856355d Move the tablet thumb styles inside the content block so they get the correct priority when the page is loaded
Bug: T378874
Change-Id: Ie2ecdb8565f4d55175295f21abf75467edc62d1a
2024-11-04 17:39:51 +00:00
Jon Robson 98521bbb68 Drop base20 icon class suffix
Following the migration to Codex, icons do not need suffixes for
their icons.

If we merge this now, we don't need to worry about caching when working
on Bug T266361.

Bug: T266361
Change-Id: Iafeb21858c89df1af35660eb63889fa5335e2b34
2024-10-16 15:15:47 -07:00
Ebrahim Byagowi 4323ad1478 Reverse the watch star animation for RTL
Bug: T376898
Change-Id: Idb5bb4d57dfe7eac25d4568b1a470b98a8582d02
2024-10-11 12:43:18 +03:30
Ebrahim Byagowi 4c5bbc34ba Remove initial animation of watch star
It moves watchStar.less from .scripts to .base as star is
visible also when JavaScript isn't enabled so the right
time to apply styles to it isn't after scripts are added
but right from beginning to avoid initial animations.

It also limits minerva-animations-ready to transition
as that's the only style that needs page load to actually
happen and otherwise the styles will be limited to
JavaScript clients which isn't intended here.

Bug: T376872
Bug: T376559
Change-Id: I394d21689cae01822cf8791b361cd450771f5c31
2024-10-10 13:25:59 +00:00
Jon Robson ca232770db Strengthen CSS selectors for Minerva Echo icons
The .minerva-icon rule sets a transparent PNG. If rules are loaded
before (as in the case of Echo) they get overriden. Make these rules
more specific so they do not apply.

Bug: T376491
Change-Id: Ia5399fa500df69b0a0d34931e30d961fe62a2124
2024-10-07 18:16:40 +00:00
jenkins-bot dadcab3f32 Merge "Fixes Watchstar display when clicked" 2024-10-07 13:52:39 +00:00
Jon Robson fa7c131470 Page issues overlay should not show bulleted list icons
Seen on [[en:The_Black_Stork]] when clicking the page issue banner
while testing the links patch.

Change-Id: Ic9417dbe6f08bd4ada8a882b55646e76ae6c5589
2024-10-05 00:13:01 +00:00
Jon Robson 3bf80a62ef Fixes Watchstar display when clicked
Bug: T376359
Change-Id: Iaeda67b6ef063596a9c4ba43084aa6bc2472e0e7
2024-10-04 19:52:18 +00:00
Jdrewniak faf428550b Use :where() for link styling
Bug: T376394
Bug: T376361
Bug: T376126
Bug: T376098
Bug: T376363
Bug: T367892
Bug: T375994
Change-Id: I91b34a1b2bffaf1bebe2d60abd8b44877182d45e
2024-10-04 19:20:43 +00:00
ksarabia 678d02b1cd Fixes the notification circle button
* The switch to mask-image caused the regression
* Adds rule for notification circle to disable mask-image

Bug: T376414
Change-Id: I777d30458202698966ed8facfa4f7c1210d4feb2
2024-10-04 17:55:54 +00:00
bwang ca85c75536 Add minerva__tab-text class
Bug: T376363
Change-Id: I3aad38dac8029692556faebab4795784c776881f
2024-10-03 12:50:54 -05:00
jenkins-bot c7fa064bff Merge "Fixes issues with links flagged by Pixel" 2024-09-30 16:18:48 +00:00
Jon Robson 83c0105418 Fixes issues with links flagged by Pixel
Bug: T375832
Follow up to
    I6e9e29fd5b140ae8eb4e6b011d558ea778c92028
Change-Id: I3f52f88b2b08f502eb584af48dcde0c5a8eb6674

Change-Id: Ib6a5de1397f2df8dab68deb97f079b316d4701b3
2024-09-28 01:24:10 +00:00
ksarabia 5ef5694fbf Update Minerva skin to use Codex icons
- Define icon size variables in icons.less
- Update icon classes to use
  .cdx-mixin-css-icon()
- Remove temporary fixes in icons.less
- Add 'codex.styles' dependency in skin.json
- Set 'useMaskImage' to true in skin.json

Bug: T374145
Depends-On: Ia8f770aec365da77b39cb0258f546df7894e6ba4
Change-Id: I87b060cf98194d81679da2610944f58e8d941389
2024-09-27 21:53:55 +00:00
bwang 3d74f38a51 Scope codex link styles to footer and content body, remove cached CSS
Depends-on: I22e9c0d67b69ed37310c47db55bedb67f51efc90
Bug: T375832
Change-Id: I6e9e29fd5b140ae8eb4e6b011d558ea778c92028
2024-09-27 16:03:36 -05:00
jenkins-bot 91ca28e801 Merge "Bottom margin not applying to Parsoid H2s" 2024-09-27 17:43:09 +00:00
Jon Robson e03ddb1322 Cleanup: Delete unreferenced file
This got moved to WikimediaMessages and is not being referenced
anywhere.

Bug: T375802
Change-Id: Ib1cace604a9e764f50de746b144e9a8bb5bcf2b2
2024-09-27 08:57:35 -07:00
Jon Robson cef7b1f7bb Bottom margin not applying to Parsoid H2s
Bug: T375822
Change-Id: I99ce2b7640d738457495b57a16cbbbf082066217
2024-09-27 15:48:05 +00:00
Jon Robson 6bd291c9f4 Fixes last modified colors
Bug: T367892
Bug: T375586
Change-Id: I55a4f17cd3fe9ab9f1a81a28a88edc12eca01ce9
2024-09-26 16:28:52 +00:00
jenkins-bot a6f7817ad0 Merge "Remove @font-size-base" 2024-09-24 23:33:20 +00:00
bwang 96580c6a63 Remove @font-size-base
Bug: T367899
Change-Id: I0e48721397c9759c269eb27081b427e942b43422
2024-09-23 14:33:18 -05:00
Jon Robson 5900ab2c28 Fixes styles of Minerva tabs in visited/active states
Follow up to Iefa1fee9c6ac0326bc43844205dd3f5dc53fc903

Bug: T367892
Change-Id: I832e5a0b8d1febf38d574098e110bac901528b6e
2024-09-19 20:21:40 +00:00
Jon Robson e23c1ae9b6 Use codex link mixin inside Minerva
VISUAL CHANGE:
1 change relating to link color inside ambox

Bug: T367892
Change-Id: Iefa1fee9c6ac0326bc43844205dd3f5dc53fc903
2024-09-18 00:31:48 +00:00
Jon Robson e89aab6b43 Cleanup: Remove dark mode banner code
this is not being utilized any more, tested or maintained so should
be removed.

Change-Id: Ib51bc5cb829f25b8a2ab864f7b9266578a4b1232
2024-09-06 09:31:03 -07:00
Jon Robson 1d966ce00b Restore heading margin for Parsoid content
Bug: T373646
Change-Id: I3d20456695229cb203e6d1a125587f367fffe696
2024-09-03 20:48:25 +00:00
jenkins-bot 2b77c02639 Merge "tests: Adopt private require() for skins.minerva.scripts (take 2)" 2024-08-29 23:58:39 +00:00
Timo Tijhof 4ca4febd89 tests: Adopt private require() for skins.minerva.scripts (take 2)
Resubmission of Ib68f45d93a (548e94da98), which caused an error due
to `require('../../`)` not working outside the module base directory.
This is fixed with regression test in T373065.

Further confirmed in this repo by viewing
`/wiki/Special:CreateAccount?campaign=loginCTA&useskin=minerva`
with this patch applied. Without the T373065 fix, the console warns:
> Error: Cannot require undefined file …/ToggleList.js

-------

Support for private require() in tests is available since MW 1.41:
https://mediawiki.org/wiki/RL/PKG#Private_export_and_import
https://mediawiki.org/wiki/RL/PKG#Virtual_files_in_traditional_modules

This fixes a confusing assertion in page-issues/index.test.js,
where for "insertBannersOrNotice()" it was asserting that the HTML
contain "⧼skin-minerva-issue-learn-more⧽", where the ⧼ character
indicates the message is not found (i.e. an error).

The test had to be written this way in order to pass, because
the skins.minerva.scripts module was not actually loaded, and thus
its templates and messages are not present either. This lack was
filled in by index.js for mw.templates, but not mw.messages.

By adopting private require(), these workarounds can all be removed.

== Motivation ==

In change I3a4024ccf90e505581, I'm working on improving the testrunner
config to enforce uselang=qqx on all tests. This is passing except
for GrowthExperiments and Minerva, both of which have the above
workarounds in place that caused a message to be undefined, and then
kept in the assertion expectation. When using uselang=qqx, values are
returned as (key) instead of ⧼key⧽, which exposes these message
existence errors.

By removing this workaround, the test will simply import the module
in the test as normal, thus the messages will exist, and thus it
will expect (key), and thus it will continue to pass even after
enforcing uselang=qqx.

Bug: T373482
Depends-On: I777f2c12e845a738edeac00e19818d4c939a1ef1
Change-Id: I6348e5ae00776c2c01d91fa90a431b6ffe3da25d
2024-08-29 20:34:16 +00:00
jenkins-bot 105b6fc266 Merge "Add a tag to mw.notify" 2024-08-29 16:58:11 +00:00
Jdrewniak dbe79167e5 Revert "tests: Adopt private require() for skins.minerva.scripts"
This reverts commit 548e94da98.

Reason for revert: The patch was causing the following error on pageload

    Error: Cannot require undefined file includes/Skins/ToggleList/ToggleList.js
    require startup.js:1006

Bug: T373482
Change-Id: I22751109c124795af7d2e0ad6c4104745b2d6632
2024-08-27 20:06:24 +00:00
Fomafix 8a78d01763 Add a tag to mw.notify
This prevent multiple notifications for the same message.

Change-Id: I6487852350497a48e1710fb04d3af01fc5c18116
2024-08-27 13:03:10 +00:00
Timo Tijhof 548e94da98 tests: Adopt private require() for skins.minerva.scripts
Added to MediaWiki core last year with I9fca9fdf9b7623b1.

This fixes a confusing assertion in page-issues/index.test.js,
where for "insertBannersOrNotice()" it was asserting that the HTML
contain "⧼skin-minerva-issue-learn-more⧽", where the ⧼ character
indicates the message is not found (i.e. an error).

The test had to be written this way in order to pass, because
the skins.minerva.scripts module was not actually loaded, and thus
its templates and messages are not present either. This lack was
filled in by index.js for mw.templates, but not mw.messages.

By adopting private require(), these workarounds can all be removed.

== Motivation ==

In change I3a4024ccf90e505581, I'm working on improving the testrunner
config to enforce uselang=qqx on all tests. This is passing except
for GrowthExperiments and Minerva, both of which have the above
workarounds in place that caused a message to be undefined, and then
kept in the assertion expectation. When using uselang=qqx, values are
returned as (key) instead of ⧼key⧽, which exposes these message
existence errors.

By removing this workaround, the test will simply import the module
in the test as normal, thus the messages will exist, and thus it
will expect (key), and thus it will continue to pass even after
enforcing uselang=qqx.

Change-Id: Ib68f45d93a7054ed8bd35fc5644e2852f2f90248
2024-08-23 19:04:36 +00:00
Jdrewniak 83e7a06a52 Prevent dark-mode styles from affecting print media
Prevents dark-mode styles from affecting print media
by adding `@media screen` to dark-mode related styles.

Bug: T371331
Change-Id: Ieeca30d086d8b8705aba96441a576e3d8e127838
2024-08-08 14:27:30 -04:00
Jon Robson 811e770e9c Dark mode: Images should have background
Bug: T370074
Change-Id: I694778f6458ab13266bee4b88622a914f21c6b50
2024-08-08 12:04:08 +00:00
bwang a38fa06b5d Migrate bare division math to parens division
Bug: T369669
Change-Id: I37c84769edbae8bbb843e9be1846394753c126c8
2024-08-02 13:33:00 -05:00
jenkins-bot bb57b22eb3 Merge "Hooks: change wikipedia is made for you warning to a notice message" 2024-08-02 17:19:51 +00:00
libraryupgrader 842a91590a build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.2
  The following rules are failing and were disabled:
  * tests/selenium:
    * implicit-arrow-linebreak
    * no-mixed-spaces-and-tabs
* grunt-banana-checker: 0.11.1 → 0.13.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.2
  The following rules no longer exist and were removed:
  * stylistic/selector-list-comma-newline-after
* braces: 3.0.2 → 3.0.3
  * https://github.com/advisories/GHSA-grv7-fg5c-xmjg

Change-Id: Ia94454c1da778f241085714e1601a0233d547570
2024-08-01 15:27:33 +01:00
Sergio Gimeno 73fe281d50 Hooks: change wikipedia is made for you warning to a notice message
The message box is changed from warning to
notice for the following messages:
 - mobile-frontend-generic-login-new
 - mobile-frontend-watchlist-purpose
 - mobile-frontend-watchlist-signup-action

Bug: T366127
Depends-On: I358ee59a1a0b7a5bb94e66bca9a2437517f40141
Change-Id: Ifa4418cbecda38011a6ee4d09c03db3ded7a9eb9
2024-08-01 13:22:36 +02:00
Ebrahim Byagowi 6a6872264a Use CSS Logical instead to remove uses of mw-content-{ltr,rtl}
It keeps fallback definitions which will work for most of the
cases in older browser as the transformations provided by
CSS Janus.

Bug: T371265
Change-Id: I0df37ca675533cf72c5636747cd40bbb4fb7497a
2024-07-30 23:06:03 +03:30
Ebrahim Byagowi f6165152a2 Make dd, ol and ul spacing values direction aware
This is akin to I404710209d59241991716bb7180bcaabcafffcec which
was for the most of desktop skins but since Minerva doesn't have
any dependency to `elements` and `i18n-all-lists-margins` it
should have it's own implementation of the change.

Bug: T371082
Change-Id: I1b98ced874a1caf049e7e09dbb678105d4d9e4d4
2024-07-26 13:02:10 +03:30
Volker E. 9380b86c2b styles: remove outdated feature phone font size rules
Nowadays even Apple iWatch has a minimum resolution of 352 pixels,
so we can safely remove the outdated feature phone font rules and
save bytes down-the-wire for users.

Bug: T369247
Change-Id: Ib482a32b0ed288ae1ea4e0b9dca5f6fdf74eb845
2024-07-04 01:34:02 +00:00
jenkins-bot 207ef7bd71 Merge "Force light theme in print styles" 2024-07-03 19:49:40 +00:00
jenkins-bot 00e4af30fc Merge "Definition list has no left margin, only definition items do" 2024-07-03 16:24:41 +00:00
Jon Robson 853dcf1917 Force light theme in print styles
Bug: T366362
Change-Id: I9e10577aa2a88e96d111cdd29f9fa7baafff87d8
2024-07-03 16:05:19 +00:00
jenkins-bot 906a68b44c Merge "Do not invert images that have been tagged with no invert classes" 2024-07-01 18:43:52 +00:00