Commit graph

443 commits

Author SHA1 Message Date
jenkins-bot a46ac64378 Merge "Inject services in SkinMinerva" 2024-03-01 19:24:58 +00:00
jenkins-bot ff82ad0428 Merge "Inject services in Hooks and MobileFrontendHooks" 2024-03-01 18:58:40 +00:00
Fomafix 4e6c1a87b3 Inject services in SkinMinerva
Change-Id: I17ae52ab9bb251a501d9de38f8a7051118f9622e
2024-02-29 21:34:15 +00:00
Jon Robson 18620a4499 Default to day mode
Bug: T358811
Change-Id: Iadf061b85e3cff4b2e1fc6bda6ff034b5f71b918
2024-02-29 13:30:40 -08:00
Jon Robson 55ea39bb30 Main page should work in night mode
Note: You need to enable wgMinervaApplyKnownTemplateHack in LocalSettings.php
for these styles to work.

Editors can opt out of these rules by using the already popularized
"notheme" class.

Bug: T357722
Change-Id: I32f3968b74bded987bb60e85a902e551727db545
2024-02-28 22:29:08 +00:00
Fomafix 0f8800ac42 Inject services in Hooks and MobileFrontendHooks
Change-Id: I8e0673689c2dbe14a385bbd1fe1725d203386bde
2024-02-27 10:15:03 +00:00
Jon Robson a30b575271 Map color-based skin variables to CSS variables
Additional changes:
* Separate CSSCustomProperties.less from skin.less so that
we can obtain the unmodified original values for the colors

Depends-On: I363a97d33d85a9033da753f2a8fe730d80206639
Depends-On: I148eaca747352ffdc9d1423f20d34bd5a1d0e447
Bug: T356427
Change-Id: I916450c276cabb0c7c871525c50f95fb87f498ad
2024-02-21 00:36:13 +00:00
Jon Robson 8de0d99882 Disable Extension:DarkMode on Minerva
Bug: T357598
Change-Id: I590ebe574c4c23507525a118cd99cbe31af022db
2024-02-15 01:39:43 +00:00
Jon Robson 145db70286 Reset: Drop p and div inside overlays
Required for proper presentation of page issues overlay
and multimedia viewer.

The div rules were unnecessary.

Bug: T205341
Change-Id: I6fea0f2013a11e5248b71619b795d794c8ed18ad
2024-02-14 22:20:43 +00:00
Jon Robson b079031b0a Send a toast notification if night mode is not available
Add a skin-night-mode-page-disabled class to the HTML element when
a page was disabled by the new MinervaNightModeOptions configuration
flag.

Bug: T356653
Change-Id: I7a6582ef8f66e78cc6f07da06bc4d2a3277cfcf0
2024-02-14 01:51:23 +00:00
Jon Robson 967e0b1e1b Restore night mode on history and diff pages
Follow up to I0fa0eab3bfa57cc6864dbdd2d6aeaa5582767c3c
Initially we want to enable night mode on all pages
This config should therefore not apply to any pages initially.

Bug: T355705
Change-Id: I2ca6d4a971d00d163fa82e93ac99959e41c87b91
2024-02-08 14:48:50 -08:00
jenkins-bot bc22880bfe Merge "Allow pages to not appear in night mode" 2024-02-08 21:48:07 +00:00
jenkins-bot 8dbb6d0be6 Allow pages to not appear in night mode
- Add config to skin.json
- Add the function in SkinMinerva.php to check exclusion of pages and namespaces.

Bug: T355705
Change-Id: I0fa0eab3bfa57cc6864dbdd2d6aeaa5582767c3c
2024-02-08 21:28:14 +01:00
jenkins-bot ec453ac037 Merge "Replace reset with SkinModule normalize" 2024-02-07 14:38:30 +00:00
Steph Toyofuku ef46f238a7 Set up user option for night mode
Add a new user option, `minerva-night-mode`, and configure it with a
default value of 2 (automatic based on OS).  Rework the code in
`getHtmlElementAttributes` to set the initial class value according to
the user option, which will be set and saved inside of MobileFrontend

Bug: T355118
Change-Id: I4b0d63a186f490ba10b7655b3af4dcb8b64bd400
2024-02-02 13:28:35 -08:00
Jon Robson 7c9304cbf4 Replace reset with SkinModule normalize
Retain the existing font,
margin and padding values as without
these we would trigger a visual regression.

Visual change: Four minor visual regression with this change
relating to the button in the AMC CTA Drawer and suggested
edits overlay heading. All are acceptable.

Bug: T205341
Change-Id: I6331d88e5b7301fd13249414350a539738cfae53
2024-02-02 18:00:45 +00:00
Steph Toyofuku f614ce6687 Add feature flag for night mode
Adds a config flag, `MinervaNightMode`, and wires it up as a skin option
for enabling/disabling the night mode toggle (sold separately)

Additionally, allow this feature to be enabled via the
`minervanightmode` query param

For now, turning the flag on will result in the class
`skin-nightmode-clientpref-1` being added to the HTML element, but in a
later change this will be updated to switch values based on the
forthcoming client pref

Bug: T355118
Change-Id: I35848ab80ee75d324ceb35d17794e2d3e620cc19
2024-01-31 00:38:51 +00:00
Moh'd Khier Abualruz 41a5ac75c5 Update modules to not use data URIs to reduce bundle size
- Add "useDataURI": false to following modules:
 -- skins.minerva.mainMenu.advanced.icons
 -- skins.minerva.personalMenu.icons
 -- Remove .mw-ui-icon-mf-next-invert old class kept for caching from edit.page.js

Bug: T346162
Change-Id: I362fdc9c68a7483c182e3540cba6501d9b12959d
2023-12-06 00:24:22 +00:00
Fomafix 698a3ea2e3 Use namespaced ResourceLoader classes
The old class names are deprecated since 1.39.

Change-Id: Ie24b28ba27c5ce3c98e57a14117f01f4ca42824f
2023-12-01 13:35:19 +00:00
gerritbot 6419c847e9 Update UserOptionsLookup's FQN
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I5a540772aafd2c4686e02f748b5fc61155920397
2023-11-29 12:41:59 +00:00
Jdlrobson ca28efc9c7 Drop mw.mobileFrontend references
This restores the previously reverted patchset
If5b76245bf60bfa9cf977cdbf37ee0d6bb65f9d9

Changes since original:
* Added Depends-On to MobileFrontend
* Uses OOUI classes for page issues rather than es6 classes - ES6
classes do not support modifications to class prior to running
super so MobileFrontend's View class is not compatible without
significant refactors.

Depends-On: I24ad75adf8519102ca356d64d99d765ab69180cc
Bug: T348807
Change-Id: I4ff82af0251254c846f2caee330af5af738f6029
2023-11-10 01:30:52 +00:00
Jdlrobson 2ee3e27406 Revert "Drop mw.mobileFrontend references"
This reverts commit 19ea6328b0.

Reason for revert: Breaks page issues and image overlay. I
will break this up into smaller less risky patches.

Change-Id: If5b76245bf60bfa9cf977cdbf37ee0d6bb65f9d9
2023-11-03 19:26:16 +00:00
Jon Robson 19ea6328b0 Drop mw.mobileFrontend references
Bug: T348807
Change-Id: Ib71b43005e5788d0e29917a165281faa84926414
2023-10-31 21:54:26 +00:00
Jon Robson db8e3b09af Document messages and add hours and minute units
Follow up to I5a4a2588da3d701be87690038c2c9b2bc1aa0365

Change-Id: I6ea2b98bd3d03e586cc58307d3f2f0f1119059e3
2023-10-30 23:37:12 +00:00
jenkins-bot 3a4b1f1082 Merge "Style the desktop diff and history page of Minerva to look like mobile pages" 2023-10-30 14:53:32 +00:00
Jon Robson 0c8caebfc6 Generate section edit links via SkinMustache
Bug: T346944
Depends-On: Ief6a6ee03ada8207fc5c60ea438412fa2d529022
Change-Id: I9f768706c0a0f14f14ee4b3812288218bef36018
2023-10-23 23:17:43 +00:00
Jon Robson a3f03245fd Style the desktop diff and history page of Minerva to look like mobile pages
Depends-On: Ie8ac1aab6d2fe5f4575a6891c36efe497458e093
Bug: T305113
Bug: T240624
Change-Id: I5a4a2588da3d701be87690038c2c9b2bc1aa0365
2023-10-20 18:35:10 +00:00
Jdlrobson a90cc7ba4c Revert "icons: Register 'flag' in the wikimedia icons group"
This reverts commit 2696ced732.

Reason for revert: Icons should be defined by the extension
providing them. The icon is already incorrectly defined in
that extension but can easily be corrected.

Depends-On: Iff3aa23604442011062a67a8e165fc4a1b5b2d47
Change-Id: I22a114d41e2cadb97d46c299709496cd04299cf6
2023-10-10 16:17:26 +00:00
Kosta Harlan 2696ced732
icons: Register 'flag' in the wikimedia icons group
Why:

- The recently-introduced "Report" menu item in Extension:ReportIncident
  needs a flag icon

What:

- Register the "flag" icon in the wikimedia icons group

Bug: T348455
Change-Id: I4caa3a84583349a19603a2ad86471d79671f4b6a
2023-10-09 17:19:39 +02:00
Jon Robson 05231bb254 Support extension of page actions via hook and addPortletLink
This adds support for:
mw.util.addPortletLink('p-views', '#', 'text', 'fooz',null,
  null,'#page-actions-overflow' )

and adding multiple edit icons via hooks.

Depends-On: I655097769620301143140ded1cde4c7a16879ef4
Depends-On: I401805224c0f387ac85b52b50c1f298b83c03a91
Bug: T346944
Change-Id: I3c9d59f49f1b939981a7b2b450448db6736d5958
2023-10-04 22:15:47 +00:00
bwang 47b2744609 Clean up icon selectors from cached HTML
Bug: T344022
Change-Id: I170d86b52345b94a81e74f03b82aef7b522bbb39
2023-09-12 08:45:58 -07:00
Jon Robson 658f1c3439 Fix Echo badges on desktop Minerva, remove module
Bug: T345785
Change-Id: I2913c60d609a11fa74d90e858bf112627553aa13
2023-09-11 14:35:40 -05:00
jenkins-bot 5a6016b708 Merge "Remove old :before icon selectors and update selectors to not use minerva and wikimedia prefixes" 2023-09-07 18:46:41 +00:00
James D. Forrester 44e6f875c5 build: Update MediaWiki requirement to 1.41
All skins in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I320ccbc07409ab9c2858fd1410ec91cda797b464
2023-09-06 22:46:16 +00:00
bwang 269bd5bdaf Remove old :before icon selectors and update selectors to not use minerva and wikimedia prefixes
Bug: T344022
Change-Id: I573d7b36513cd0b74f62621cc246f719bcb94256
2023-09-06 13:53:22 -05:00
jenkins-bot 286920543a Merge "Enable clientPrefs inline script" 2023-09-05 16:39:23 +00:00
Jon Robson 952789bc17 Switch Minerva button template to use Codex and remove mw-ui-button
- Removes 'mw-ui-icon-with-label-desktop' as that is now the default behavior for icon only buttons in Minerva
- Removes icon flushing classes, use codex mixins instead

80 Visual changes relating to minor icon/button subpixel changes in the heading, edit section links, and page actions

Bug: T319260
Change-Id: I503b643d33e43196483af4b5f9dd312237322ac8
2023-08-24 15:57:01 -05:00
Jan Drewniak dda29e3799 Enable clientPrefs inline script
Bug: T342277
Change-Id: Ibe468efb33f6fdd37e7e6b8848be5bd6357b78cd
2023-08-21 15:13:38 -04:00
Umherirrender 7701ce2641 Use HookHandlers for MobileFrontend hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T315823
Change-Id: I9422f0cf7d5c14db544ea67c564d34e9eca3813b
2023-08-15 17:02:31 +02:00
jenkins-bot 94b339d905 Merge "Remove user page from menu for temp users" 2023-08-10 21:45:47 +00:00
bwang 97bec652bd Remove user page from menu for temp users
Bug: T340152
Depends-on: Ic99c9cf2c8e7ea9a6520b4c9b6e5b69d358cbd58
Change-Id: I01405d534672b0dc265610d3b35f55f96507ba8a
2023-08-10 17:01:06 +00:00
Jon Robson 963fcb23a9 Prepare icon module selectors for Codex markup change
Bug: T342908
Change-Id: Ic41c4602ce1ae584210d3d105e823a74c9d49e65
2023-08-09 23:44:36 +00:00
bwang 659e5c03c8 Update remaining page issue icon selectors
Change-Id: If440e1273cc075888b907b0fd475c3c7a0bebd3d
2023-08-04 14:07:19 -05:00
bwang 465e66aad5 Update page issues to use new MF icon class
Bug: T343053
Change-Id: I917a4ac4d0a8af5162959f4514bc184670582b50
2023-08-04 16:50:26 +00:00
Jon Robson d7fe495de6 Add temporary user icon
Bug: T340789
Change-Id: I304e8e419095a0acd7175e6eb79ecedda9b57e87
2023-07-21 18:23:55 +00:00
Saint Johann a30edb1451 Do not hide placeholders in UserLogin form in Minerva skin
Some of the other styles in this file should probably also be revisited, but that is out of scope for the task.

Bug: T285398
Bug: T341360
Change-Id: I80d915d2aedc57bcb634816d761d09853cd3b715
2023-07-10 20:45:56 +00:00
MusikAnimal a44b577531 extension.json: add qrCode icon to overflow.icons
Bug: T339839
Bug: T242467
Depends-On: Ia845a593cef68e4456d50c6ef213bf9255507eef
Change-Id: I453fe5ec3c92605837459ebc308a118d1389856e
2023-07-06 18:59:00 +00:00
Jan Drewniak bc7fcdc437 Remove "interface-temp-user-banner" option
In MediaWiki core change Ie2631221b0a07dd3bf55e970805d30fbb3cac190
the interface-temp-user-banner option is removed.

Bug: T339379
Change-Id: Icf622c4be910f5d14de95355efa02c05930179bf
2023-06-29 19:11:47 -04:00
Jon Robson 8c9e09b446 Remove mediawiki.ui.anchor dependency
Module is deprecated. MobileFrontend now updated to use Codex
link component.

Depends-On: I1d165ac37c8becbf0f044a4fc101ade373762b32
Bug: T235961
Change-Id: Id88f19efe65e89e6b955e2f306c05f56e141edf7
2023-06-23 19:29:41 +00:00
jenkins-bot edc0af19a4 Merge "Update personal tools for temp users, add icon for temp users" 2023-06-20 19:13:10 +00:00