Commit graph

835 commits

Author SHA1 Message Date
pcoombe d55077774e Change donation link utm_key to wmf_key
An increasing number of browsers strip utm_ parameters from URLs,
making it impossible for us to tell where a donation comes from. We
are gradually migrating donate links to use wmf_ parameters instead.

Bug: T367361
Change-Id: I98c0b96b84250e94d62424a05ce2f0fea92fef22
2024-11-21 21:05:53 +00:00
Jon Robson e76d536733 Drop message box styling modules from page load
The skins.minerva.messageBox.styles module is loaded on pages with
old revisions, but this message box is already being styled by another
module added by core.

Skins are not responsible for styling Codex. This is the responsibility
of the code that adds the message box to the page.

In addition to this we were loading another set of styles for message boxes
on skins.minerva.codex.styles

Bug: T375287
Change-Id: I0cf5dc6baf2e447b4944f04365addd614d59cfbe
2024-11-07 09:33:56 -08: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
jenkins-bot e6fbd13fcc Merge "Revert "Use array instead of string for class list"" 2024-10-30 17:26:35 +00:00
Ammarpad 7ca5240292 Revert "Use array instead of string for class list"
This reverts commit c12f61709b.

Reason for revert: Does not work and broke the train

Bug: T378531
Change-Id: I3a91169276b8ebffbdf409aac4e3731298047196
2024-10-30 12:30:08 +00:00
Reedy ae6dc84fed Use explicit nullable type on parameter arguments
Bug: T376276
Change-Id: I646483668294133240d43a34ce74b6ca1060f848
2024-10-28 22:23:56 +00:00
jenkins-bot ecd660e0f7 Merge "Use array instead of string for class list" 2024-10-28 18:20:07 +00:00
Ammarpad 6a655ccb2b main menu: show login link (for anon) on private wikis
Bug: T376975
Change-Id: I6e40fa531b98a00fc4bb69446d45db3a26258c06
2024-10-28 16:34:22 +00:00
Fomafix 9e4d83ec4f Use '' instead of false for parameter $className
SingleMenuEntry expects string|array for the parameter $className.
Currently the ltrim converts a false to a ''.

Change-Id: Icac8d41c01331cf7550e3592ee0366bdc561b547
2024-10-22 09:36:35 +00:00
Fomafix c12f61709b Use array instead of string for class list
This change avoids manual handling of the class separator spaces.
The rendered HTML doesn't contain multiple spaces in sequence anymore.

Change-Id: I1614281c704558fe2536951975a860ee406d9079
2024-10-21 21:28:20 +00:00
Umherirrender 8ade6611aa Use namespaced classes
Changes to the use statements done automatically via script

Change-Id: I17aa533bb81078ec68f67e81e44f9a66477b61ab
2024-10-20 09:28:03 +02: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
jenkins-bot 1f218c4511 Merge "Fixes markup for logout link" 2024-10-16 21:12:32 +00:00
Jon Robson 710d1f7cd4 Fixes markup for logout link
With AMC disabled, the logout link does not have the class
menu__item--logout - this breaks the behaviour of the logout
function which has JavaScript that manages a confirmation
workflow.

The issue is a typo - class is mapped to classes in
SingleMenuEntryItem::getComponents

Change-Id: I891ed700edadfad80888120c6e0666b6e7589377
2024-10-16 10:40:33 -07:00
Jdlrobson 43ed38c2bc Revert "Fix missing wikibase link in Minerva sidebar"
This reverts commit 0585dea9f9.

Reason for revert: Moved logic for wikibase link into Wikibase repo (see 1079302)

Change-Id: I780baa6cd17f8b52ae4bae88e6686c22760f410d
2024-10-11 11:58:51 +00:00
Jon Robson 3bf80a62ef Fixes Watchstar display when clicked
Bug: T376359
Change-Id: Iaeda67b6ef063596a9c4ba43084aa6bc2472e0e7
2024-10-04 19:52:18 +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
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
joelyrookewmde 0585dea9f9 Fix missing wikibase link in Minerva sidebar
Bug: T66315
Change-Id: I01b5fa5be48d3521d57267084b420dcdcbba92f9
2024-09-10 16:21:45 +02:00
Joely Rooke WMDE 783ccd21df Revert "Fix missing wikibase link in Minerva sidebar"
This reverts commit e1b61ec3c5.

Reason for revert: On wmf.21 that caused: PHP Notice: Undefined index: id

Change-Id: I048d1fd3f192cf306839d71f189bd02f9c8e1ca9
2024-09-05 14:48:46 +00:00
joelyrookewmde e1b61ec3c5 Fix missing wikibase link in Minerva sidebar
Bug: T66315
Change-Id: I51c394193ea37ade37c662edd69ac0df4171c1d9
2024-09-04 15:15:02 +02: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
GergesShamon a5c5b42590 use text() instead of escaped() for msg recentchanges
Bug: T352626
Change-Id: I82762ba62eb65e44babc4d30a203c64ceb56b117
2024-07-09 15:37:27 +03:00
jenkins-bot 91fd8a977b Merge "Improve Minerva drop-shadows in dark-mode" 2024-06-12 16:02:29 +00:00
Jan Drewniak 98eaa00cd5 Improve Minerva drop-shadows in dark-mode
Converts several drop-shadows to use standard Codex values:
- `.search-box .search` uses `@box-shadow-drop-small`
- `.drawer, .toast` uses `@box-shadow-drop-xx-large`
- `.toggle-list__list--drop-down` uses `@border-color-base`

Bug: T364425
Change-Id: Id00e525655d3a7138aa65f424fd6ab2ff82290c8
2024-06-12 04:05:30 +00:00
Steph Toyofuku 6f98cc6460 (Almost) no more CSS variables in minerva
Remove direct usage of CSS variables in Minerva, and replace them with
codex design tokens again.  Document this decision in the original ADR

Note: there are still a small number of CSS variables in use, including
most notably the --color-link-red fix, which broke when I removed it,
but this change takes care of all the ones that could be easily replaced

Bug: T363743
Change-Id: I7d3a9dceb908167078987de1733774c8bd4bea2f
2024-06-11 11:44:47 -07:00
jenkins-bot cc89a4e182 Merge "Migrate service 'Minerva.Menu.PageActionsDirector' into new class PageActions" 2024-06-08 16:20:04 +00:00
jenkins-bot f5d03a0860 Merge "Skip getContext() and use methods from ContextSource" 2024-06-04 20:13:41 +00:00
Fomafix 4e4caef154 Migrate service 'Minerva.Menu.PageActionsDirector' into new class PageActions
The service 'Minerva.Menu.PageActionsDirector' is bad because it depends
on the global state.

Create a new service 'Minerva.Menu.PageActions' and inject this.

Change-Id: Ie84d02ef29d3b7809f490a1593cb2f3cef60b3a3
2024-06-04 20:10:41 +00:00
jenkins-bot 4eb77c4801 Merge "SkinUserPageHelper: Reset fetchedData on setTile" 2024-06-04 20:07:26 +00:00
Fomafix ad1fa7fbb7 SkinUserPageHelper: Reset fetchedData on setTile
This change restores the special toolbar behavior on user talk pages
lost in I80342e5168435c5318c378e2ac8a9a3c7a28eb4c.

Also add a test case that checks the cache on multiple setTitle calls.

Bug: T366645
Change-Id: Ifb481c546f2f77bd502cd9390d371a6e82bd5e69
2024-06-04 19:42:35 +00:00
Fomafix 5f47deaef0 Skip getContext() and use methods from ContextSource
Change-Id: Idd4805e8f49a1b896b9be83c843b59d12136abb9
2024-06-01 14:54:25 +00:00
Fomafix 8acf6771d8 Use $featuresManager instead of $featureManager
This is consistent to the service name 'MobileFrontend.FeaturesManager'.

Change-Id: I31897c60ad2f85c62202efb80db855f96693aee6
2024-05-31 18:18:48 +00:00
Bartosz Dziewoński 5b48e1665a Allow collapsible content in Minerva
Too many projects including notably English Wikipedia are now
enabling this code via gadget, which will make addressing this
problem more difficult in future, by providing an unpredictable
development/testing environment
it would be better if this reflected production, even with the fat
finger problem.

Bug: T323639
Bug: T111565
Change-Id: I81aa514a211710d0eec45329e3e3c7ee331da6ea
2024-05-30 12:49:14 -07:00
Fomafix 342beaeb18 Update namespace of PHP classes
Change-Id: Ia8a8d643a8e96372ecc7e481c0e3d50a31ccd4e8
2024-05-21 15:08:47 +00:00
jenkins-bot 837ca8b506 Merge "Use PHP types (2)" 2024-05-14 22:16:20 +00:00
Steph Toyofuku b7e54644b7 Make language selector disabled state accessible contrast
Remove the opacity filter and indicate a disabled state using the
disabled color for both text and the icon.  Add a new disabled icon
variant to accomplish this

Also fixes a small issue where the toast notification was unreadable in
night mode due to using --color-inverted.  Switch this to
--color-inverted-fixed, which was added for this purpose

Visual change for the language selector button, when there are no other
languages available

Bug: T361693
Change-Id: Id2f80028d967bf644673f651bb89718fa8723d22
2024-05-13 22:13:33 +00:00
Fomafix ff00805c5f Use PHP types (2)
* Add type hints where possible.
* Add initialization values to properties where needed.
* Remove @var block if redundant to type declaration.
* Use single line /** @var type $var */ instead of multi line.

Change-Id: I35236c5c1a2abb49e8ea2da090df3d655206195f
2024-05-08 19:08:30 +00:00
Fomafix f1b2416fbf Use PHP types
* Add type hints where possible.
* Add initialization values to properties where needed.
* Remove @var block if redundant to type declaration.
* Use single line /** @var type $var */ instead of multi line.
* Add improvements to avoid Phan warnings.

Change-Id: I8e391700dcbfbbcc88cceb589dc3a36fb8e3b357
2024-05-08 07:38:21 +00:00
Fomafix e85265ada5 Improve PHP class references
* Declare class names from other namespaces in the `use` block.
* Use Foo::class instead of 'Foo' to reference a class name.

Change-Id: I5a1aba6b0cc8842d71b6b6df0a0b67e16e5b6453
2024-05-07 18:30:43 +00:00
Fomafix dd424cb9cc Remove ResourceLoaderSkinModule
Since 95c4454cf9 the class
ResourceLoaderSkinModule doesn't do anything.

Change-Id: I2d870278485d40c1b47c910d4fc34bafc58fc66c
2024-05-04 20:43:25 +00:00
Jon Robson 120a0c7c3d Show history link on diff page for anonymous users
Note: This will not show on main page for now, that will be
handled in a follow up as it is a little more complicated.

Bug: T361526
Change-Id: Ib2eb38f93f5f03304a6164e313b2298b425af01e
2024-05-01 12:16:31 +00:00
jenkins-bot f1d455893b Merge "Wrap sitenotices in core" 2024-04-30 07:03:26 +00:00
Jon Robson f0a72a6837 Wrap sitenotices in core
Depends-On: Ib48b1f54c326a0363841b2f592d8fd4cf7312b9b
Bug: T361966
Change-Id: I28255d9630d2d69ace28fde1954f2a5811feae2a
2024-04-29 18:04:39 +00:00
Jon Robson 25cfc8e38a Class page-Main_page is now defined in core
We need this class in Vector 2022 and other skins so this is
now upstreamed to core.

Depends-On: I4b77356364f7d7670139d9a1860b3e228b4dcf21
Bug: T363281
Change-Id: I948d7d3ade90583b91e7e19946b6b2354c349829
2024-04-25 23:18:16 +00:00
bwang 95c4454cf9 Remove MinervaKnownTemplateHacks
Bug: T362727
Change-Id: Iccb2e15df25f35d625d88ec4e39a16f97f84b505
2024-04-22 17:33:01 +00:00
Jon Robson 530b7fd900 Main menu should link to EditWatchlist by default for users that haven't edited
This moves poorly documented logic from MobileFrontend to Minerva.

Bug: T362338
Change-Id: I7d73044ad26b089c7225a4a5be6772398946b9f8
2024-04-17 23:31:31 +00:00
Fomafix 3bae52817b Fix HTML errors reported by Firefox view-source
* Add missing spaces between attributes.
* Remove duplicate attributes.
* Remove unnecessary spaces and newlines.

Change-Id: Ia688234712f24f20cb1b45496f4736a98e69b00f
2024-04-15 22:51:21 +00:00
jenkins-bot 1f0a94241c Merge "Replace WebRequest::getText and ::getVal by ::getRawVal or ::getCheck" 2024-04-09 22:36:34 +00:00