Commit graph

482 commits

Author SHA1 Message Date
MusikAnimal 03948a7a04 Explicitly set font size in VisualEditor + CodeMirror 6
This only effects Minerva desktop users of VE + CodeMirror.

Bug: T357482
Change-Id: I2569517ba2ce67d3d6ac486ddbfb9a3ce99d8c8c
2024-08-20 17:30:30 -04:00
Jon Robson 1a4a16062c Temporary fix for enabling Mobile VisualEditor in night mode
Bug: T366832
Change-Id: If03069339261e380dc49defedccb01830d162483
2024-06-20 16:36:51 -04:00
jenkins-bot fbd928018d Merge "Indicate support for new heading HTML" 2024-06-10 19:14:51 +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
Bartosz Dziewoński 64fae83264 Indicate support for new heading HTML
Add `"supportsMwHeading": true` to the skin definition,
so that MediaWiki 1.43+ will output new heading markup
when using this skin.
https://www.mediawiki.org/wiki/Heading_HTML_changes

The required CSS changes were already made in commit
97aed1ad86.

Bug: T365736
Change-Id: I6f050ac65e131fa946754f6d6cfe42c77175cbb2
2024-06-03 15:20:01 +00:00
jenkins-bot 565f89e376 Merge "Create dark-mode launch banner component" 2024-05-24 20:22:56 +00:00
Jan Drewniak 903fbda3b0 Create dark-mode launch banner component
Creates a launch banner component for dark-mode
using the CSS-only Codex Dialog component.

This banner is currently not loaded on any page,
but can be invoked using mw.loader:

    mw.loader.using( 'skins.minerva.DarkModeLaunchBanner', r => r( 'skins.minerva.DarkModeLaunchBanner')() );

Bug: T361047
Change-Id: I3cfa9517a387df636534a3940e09289e4d7a1e5b
2024-05-24 14:56:49 -04:00
Jon Robson 508989ac45 [Config] Reflect production defaults for night mode
Night mode is currently enabled on AMC on all wikis so let's
match that locally for development.

Change-Id: I5d86d8ae27f4a7bccfdd6106ac20affba3e8e216
2024-05-17 16:11:53 -07:00
Jon Robson 23e5dfbb84 Minerva should no longer support non-Codex message boxes
Bug: T360668
Depends-On: I79cb792cf74ac4c722a94d98948e46f0d2a9ea03
Change-Id: I1cefc5437e17a98221e04ed87d55db62f0e69e38
2024-05-15 20:52:53 +00:00
Func 1bac80cd59 styles: Stop using SkinModule in skins.minerva.mainPage.styles
Follow-up to commit 95c4454 and dd424cb.

This has become a plain style module since 95c4454 and doesn't need to
use SkinModule anymore.

Also, cleaned up the unused import of the less variables.
 * mainPage: apparently never used, dated back to 2cc9516
 * userpage: unused since 196fb20

Bug: T360988
Change-Id: I49304c64cd2bbc5f791164127a5169e60a43058a
2024-05-15 14:49:37 +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
Jon Robson 84408db01c skins.minerva.mainPage.styles should not load feature styles
This is pulling down unnecessary styles that apply to the page unexpectedly.
The only reason this needs to be a Minerva/SkinModule is to support the
@wgMinervaApplyKnownTemplateHacks config variable

Follow up to I32f3968b74bded987bb60e85a902e551727db545

Bug: T360988
Change-Id: I285d0d35f46e1519d33752300262e652003011a2
2024-05-12 14:41:17 +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
Bartosz Dziewoński 690c6aafe8 Remove old styles for CAPTCHA on Special:CreateAccount
I think they custom design is no longer needed now that the form uses
Codex, and some of the rules are applying incorrectly now and causing
bad rendering.

Depends-On: I3dd4509e8fbe43c8c3fee405d81e1e6efe5ee296
Bug: T364214
Change-Id: I994c1dc6492c39964b21f0ab2e8a0e0ca848cc7a
2024-05-04 13:05:03 +02:00
Amir E. Aharoni dd7ae1aa8d Delete an unused message
Bug: T364205
Change-Id: Id09f5d0537861230084783fb5958401b35aae38a
2024-05-04 11:51:17 +03:00
Eric Gardner 3e32517f45 Update Minerva to get Codex CSS vars from default files
As of Codex 1.5.0, all files relating to the "experimental"
build have been removed. Instead, the default Codex design tokens
refer to CSS variables for color-related values, and new files
like theme-wikimedia-ui-root.css have been provided as part of the
new distribution.

Bug: T363006
Change-Id: I1a3c5194013f8f4523098458db45ce867fdfd8c9
Depends-On: I1f54bf4f144eaec6ed317c04bd0c851c2f01b42c
2024-05-01 00:00:42 +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
jenkins-bot ccc02cc1b4 Merge "feature(Minerva): Standardises terminology to 'Dark Mode'" 2024-04-26 16:23:04 +00:00
Moh'd Khier Abualruz ac73f998e7 feature(Minerva): Standardises terminology to 'Dark Mode'
This update standardises the terminology from 'Night Mode' to
'Dark Mode' across interface messages. This change aligns with common
terminology used in the industry.

Changes:
- `i18n/qqq.json`: Updated the term in the description of
  `skin-minerva-night-mode-unavailable` to 'Dark Mode'.
- `skin.json`: Revised the description under the dark mode configuration
  section to use 'Dark Mode' instead of 'Night Mode', ensuring clarity
  and uniformity in our settings documentation.

Additional Context:
- This patch is not as critical as the Vector patch

Bug: T361157
Change-Id: Ib6261b329f4cb5c466893c22b225d97e627f4aee
2024-04-24 23:00:06 +00:00
bwang 95c4454cf9 Remove MinervaKnownTemplateHacks
Bug: T362727
Change-Id: Iccb2e15df25f35d625d88ec4e39a16f97f84b505
2024-04-22 17:33:01 +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 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 86fb2a8d18 Inject service 'Minerva.SkinUserPageHelper'
Change-Id: I91d8066ea860bd4aa5f19f4c326fad032be5b9d0
2024-03-28 17:30:01 +00:00
jenkins-bot e46e0bbf6f Merge "Inject service 'Minerva.LanguagesHelper' into SkinMinerva" 2024-03-28 02:31:21 +00:00
jenkins-bot 045da4ce5b Merge "Inject service 'Minerva.Permissions' into SkinMinerva" 2024-03-28 02:24:15 +00:00
jenkins-bot 3bfc204f85 Merge "Inject service 'Minerva.SkinOptions' into SkinMinerva" 2024-03-28 02:20:24 +00:00
Fomafix 220bf6ff89 Inject service 'Minerva.LanguagesHelper' into SkinMinerva
Change-Id: Ie81195f31194bab819491576681b02660ec057b4
2024-03-25 22:36:07 +00:00
Fomafix 57d1f15d64 Inject service 'Minerva.Permissions' into SkinMinerva
Change-Id: Ie68691d7030ea622f2bc232fea2df49b70484e19
2024-03-25 21:44:13 +00:00
Fomafix 999f04c366 Inject service 'Minerva.SkinOptions' into SkinMinerva
Change-Id: Ia7e7660c55e16731366bdf6332d5237188e9bbb1
2024-03-25 13:17:32 +00:00
Jon Robson 8f8fd6a1e4 Minerva should use content-tables ResourceLoaderSkinModule feature
The styles in Minerva are identical to the preset in core with the
own exception being padding. Therefore use the upstream styles
and retain only the override.

Bug: T357998
Depends-On: I206e91dac7e14d80a5ffc6b533255b54dafca29a
Change-Id: I3eb07a03b3b4e2a7544e5b07de6af9f67a1c965f
2024-03-21 22:49:14 +00:00
jenkins-bot 978702f3be Merge "Revert "The new class should be present alongside the old class for all page views"" 2024-03-20 16:15:18 +00:00
Jdlrobson b6ffc85cd4 Revert "The new class should be present alongside the old class for all page views"
This reverts commit bca9223bb1.

Reason for revert: This is now longer needed following the work
in Ia253de68f94236e7fe2219b736dd6084c64ce838.

Bug: T359983
Change-Id: Ibd3013169f26531a0cd879c143692e7030709808
2024-03-19 23:23:54 +00:00
Moh'd Khier Abualruz 5d6b866890 Rename the skin night mode classes to more readable classes
The classes:
- skin-night-mode-clientpref-0
- skin-night-mode-clientpref-1
- skin-night-mode-clientpref-2
is being replaced with
- skin-theme-clientpref-day
- skin-theme-clientpref-night
- skin-theme-clientpref-os
- Moved $forceNightMode to be a text parameter (dat|night|os)
- Keep adding the old classes to the html element, to give the ability of gradual deployment

The preference is renamed from minerva-night-mode to minerva-theme (a follow up to consider
migrating existing values will follow).

The query string minervanightmode continues to behave the same but now
accepts other values such as day, night and os.

Bug: T359983
Change-Id: Ia253de68f94236e7fe2219b736dd6084c64ce838
2024-03-19 23:12:59 +00:00
Jon Robson bca9223bb1 The new class should be present alongside the old class for all page views
Bug: T359983
Change-Id: Id0bcb3c9b0d37aef84886fe2efb907f8ebd1cfd9
2024-03-18 21:43:44 +00:00
Fomafix 3fc7f0d542 Inject service Minerva.SkinOptions into Hooks and MobileFrontendHooks
Change-Id: Id343ae4cb8d1a73cfb647bfe440f2909e3835037
2024-03-12 19:44:53 +00:00
Fomafix b9eca74ff0 Use "optional_services" in skin.json
Change-Id: Idab8a934e4c8f547d018907cb427effcab1d0f3f
2024-03-12 19:44:06 +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
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