Commit graph

823 commits

Author SHA1 Message Date
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
Moh'd Khier Abualruz cd95f34687 Replace codex-search-styles with CodexModule
Enhance MinervaNeue Skin with Codex Integration and Style Refinements. This update to the MinervaNeue skin introduces enhancements aimed at integrating with Codex UI components and the optimisation of skin-specific styles. These changes are in direct response to the objectives set forth in Phabricator task T356678, focusing on modernising the skin's aesthetics and functionality.

Changes:
- Enhanced skin.json to include new 'scripts' and 'styles' configurations, incorporating Codex UI components such as 'CdxButton' and a variety of Minerva-specific styles like 'skins.minerva.base.styles' and 'skins.minerva.content.styles.images'.
- Refined `includes/Skins/SkinMinerva.php` by restructuring the method of loading skin and feature-specific styles. The update simplifies style management, allowing for a more granular approach to style application. This includes separating page-specific styles from feature-specific styles.

Rationale:
The implementation of Codex UI components within the MinervaNeue skin is to leverage modern web design principles, enhancing usability and aesthetic appeal. By refining the skin's style loading mechanism, we aim to at least maintain if not reduce the overhead, improve page load times, and offer a more customisable appearance, ultimately benefiting both end-users and developers.

Bug: T356678
Change-Id: Ia96f58397c23126e940cc9263b30e0da88c90a29
2024-04-03 13:28:02 +00:00
Fomafix 6f30044448 Replace WebRequest::getText and ::getVal by ::getRawVal or ::getCheck
The Unicode and line break normalizations are not needed here.

Change-Id: I4aebc32c938fde8e1b086325d18d72df66ca870f
2024-03-29 12:59:20 +00:00
Fomafix 05eb2ac47d Integrate service 'Minerva.Menu.MainDirector' into SkinMinerva
The service 'Minerva.Menu.MainDirector' is bad because it depends
on the global state.

Change-Id: I170653006356932ecdd909b14c193f42c4a5f511
2024-03-28 17:33:18 +00:00
Fomafix c50069252d Integrate service 'Minerva.Menu.UserMenuDirector' into SkinMinerva
The service 'Minerva.Menu.UserMenuDirector' is bad because it depends
on the global state.

Change-Id: Ife13188745b39844356e7976379582d5f451f5a3
2024-03-28 17:32:42 +00:00
Fomafix 5027a28fc1 Definitions: Remove global state parameter from constructor
Move global state parameter to new method setContext.

Change-Id: I07833f60e2796396c3c35776bd7d788d93eb114b
2024-03-28 17:31:13 +00:00
Fomafix 0dbe920285 Remove unused service UserOptionsLookup from Definitions
Also use typed properties instead of @var types.

And rename $factory to $specialPageFactory.

Change-Id: I7fe5a8ad96e619019c1bbbb9143ad09174a9de5e
2024-03-28 17:30:45 +00:00
Fomafix 86fb2a8d18 Inject service 'Minerva.SkinUserPageHelper'
Change-Id: I91d8066ea860bd4aa5f19f4c326fad032be5b9d0
2024-03-28 17:30:01 +00:00
Fomafix 0adbe80280 Use service 'Minerva.SkinUserPageHelper' in SkinOptions
Change-Id: I014e61c6692adbbe449f1e6aa9c6ae73dbcff925
2024-03-28 17:27:45 +00:00
Fomafix f8b8a83dc5 SkinUserPageHelper: Use alphabetical order of the parameters
Change-Id: I2bce7abfa2740ca7f3fb87968462cdc8eacbde7d
2024-03-28 15:20:36 +00:00
Fomafix 1c26798431 SkinUserPageHelper: Remove global state from constructor
* Move global state parameters to new methods setContext and setTitle.

This change solves the circular dependency error for service
'SkinUserPageHelper'. The service will used in SkinOptions in the
follow-up change I014e61c6692adbbe449f1e6aa9c6ae73dbcff925.

Change-Id: I80342e5168435c5318c378e2ac8a9a3c7a28eb4c
2024-03-28 13:10:48 +00:00
Fomafix 220bf6ff89 Inject service 'Minerva.LanguagesHelper' into SkinMinerva
Change-Id: Ie81195f31194bab819491576681b02660ec057b4
2024-03-25 22:36:07 +00:00
Fomafix f68b218076 LanguagesHelper: Move $out from contructor to doesTitleHasLanguagesOrVariants
Services MUST NOT vary their behaviour on global state, especially not
WebRequest, RequestContext (T218555).

Change-Id: I4b73ef713166d8b254023c1eebbb45c963880a99
2024-03-25 22:34:37 +00:00