Commit graph

1631 commits

Author SHA1 Message Date
Jdrewniak 7b35e6b1e8 Create dark mode launch banner for Vector 2022
Creates a dark mode launch banner, (copied from the MinervaNue skin) to
announce the launch of dark-mode for Vector 2022.

The banner itself is not invoked anywhere by default, but will be
invoked through CentralNotice as a banner as part of a launch campaign.

To invoke the banner manually, execute the following in the dev console:

```
mw.loader.using( 'skins.vector.DarkModeLaunchBanner', function( require ) {
    require( 'skins.vector.DarkModeLaunchBanner')();
} );
```

Bug: T370303
Change-Id: I1ca4aab8c302ef418bc1d12dde0d80c96c3b8d4f
2024-07-22 16:13:56 -04:00
Jdrewniak a8d047b319 Increase specificity in dark-mode feedback link styles
Prevents dark-mode feedback link from turning blue
when clicked, caused by styles in the
`.mixin-vector-dropdown-menu-item()` mixin

Additionally, decreases the size of the heart icon
beside the dark-mode feedback link.

Bug: T367871
Change-Id: I348dbafcc3d3d3519da77dc6799818fdd743bba2
2024-07-16 11:27:49 -04:00
Steph Toyofuku b8e9eaf6ed Show night mode gadget disable message on the correct section
Currently, this selector is not specific enough, and so if there is an
additional client pref that is disabled on the page, we'll put the night
mode gadget message in the wrong spot.  Target the skin-theme section
correctly this time, and add a test to ensure this is fixed properly

Bug: T369846
Change-Id: I3495aa9ebf3be510f62a8f19440968fe444be892
2024-07-11 11:44:56 -07:00
jenkins-bot 50c05dca2b Merge "Follow-up to f115016 - Add beta tag & feedback link to Appearance menu" 2024-07-03 23:29:26 +00:00
Jdrewniak 9b93a64fdf Follow-up to f115016 - Add beta tag & feedback link to Appearance menu
Addresses edge-cases for feedback link for dark-mode.
- Feedback link should not be visible if dark-mode gadget is enabled.
- Feedback link should not be visible if page is excluded from dark mode.

Additionally, turns feedback link green after click
and prevents further clicks on link (without removing link,
since removing the link changes the margins on the text)
and adds heart icon beside success message.

Bug: T367871
Change-Id: Idff14ffa7e8f497ec38250cf10252e998c234057
2024-07-03 18:40:39 -04:00
Bartosz Dziewoński ce55e8d8e0 Compatibility with new heading HTML (table of contents)
Bug: T13555
Bug: T358452
Change-Id: Idafd8e242acbff20d4fed9f5606ebe480d1eb8a5
2024-07-03 20:54:48 +00:00
jenkins-bot c0de5ce248 Merge "Force light theme in print styles, remove unnecessary css variables" 2024-07-03 19:49:06 +00:00
Jdrewniak f1150164e1 Add beta tag & feedback link to Appearance menu
Adds the word "(beta)" beside the Color options in
the Appearance menu, as well as a link for user
feedback related to dark-mode issues.

Re-orders the "Color" options to come last in the
Appearance menu.

Bug: T367871
Depends-On: Iac6316cf7010b5ea92672e9ad6f09e8ee57e066b
Change-Id: I46f7554b4bcdcfae0e4ef2e849d52774242e3497
2024-07-02 22:29:07 +00:00
bwang 59e2611f94 Force light theme in print styles, remove unnecessary css variables
Bug: T366362
Change-Id: I5e8f7c0c88793e1c3ebebf1d67df4c5c05eb0174
2024-07-02 16:02:55 -05:00
Jon Robson 0ef145af08 Add mw-no-invert and oo-ui-image-invert to OOUI icon exclusion list
This is used on Special:Block and the OOUI search widget for links

Bug: T368483
Change-Id: Iaae45a12029c26e4d2c793f4040c90df65495c02
2024-06-26 20:22:57 +00:00
Amir Sarabadani c413509dcb Footer: Add styles for buttons
What:
Add styles for the footer buttons that reduces the padding from 15px to
8px on each side and adds an explicit background color.

Why:
This makes it follow the design spec outlines in T256190#9770626 and
fixes showing the buttons in the dark mode T256190#9900443

Bug: T256190
Change-Id: Iae144d554b5023fd3589ea29ae2d3c57c17e679f
2024-06-25 16:43:41 +02:00
Jdrewniak add9bfc3fc Remove OOUI overrides
This is in order to enable dark mode in echo and VisualEditor

Depends-On: Ibdfeb69c7c6f9dbf0e237c04c7f0f38a8306629a
Bug: T366322
Bug: T366737
Change-Id: I01cdde979b2ddf64d54013466a3fe51a493860cc
2024-06-20 10:33:04 -08:00
Jon Robson 92307893fa Client preferences should user new user preference API
Follow up to Ic40da2af8ea46bd42cbebbdbceda2431bd8600ae

Bug: T341278
Change-Id: Iaaf75d9c91d594d826b556fc7d04965a3a3bd3a9
2024-06-18 12:26:16 -08:00
Jon Robson 0f594e0af7 Make all frontend stored preferences global
Additional change:
* Delete some unused messages

Bug: T341278
Depends-On: I254d7d883771dbd394ba97799d731012f7aaaefc
Change-Id: Ic40da2af8ea46bd42cbebbdbceda2431bd8600ae
2024-06-18 16:37:53 +00:00
bwang c8074d2355 Fix codex link styles overriding other link styles
Bug: T367844
Change-Id: I4a5514278f045118ebdd9ee72432087a1f84d83c
2024-06-18 10:57:44 -05:00
bwang 75fce0d5bc Remove external link variables, and replace content-links modules with Codex
Change-Id: I55d062de1624b77bc5214942368a3fbd545635df
2024-06-17 14:35:33 -05:00
Jon Robson cd44419c95 Use codex link styles in Vector, remove old link color variables
Visual changes: blue and red link colors have been updated to match codex, including hover/focus/active state colors

Bug: T366515
Change-Id: I16411a7ea47ae26c7e67a71f83e0521962c8ce61
2024-06-17 14:23:50 -05:00
jenkins-bot bbc7078df5 Merge "[Optimization] Remove bottom dock styles from critical path" 2024-06-17 16:13:27 +00:00
Jon Robson 426ff06241 [Optimization] Remove bottom dock styles from critical path
These require JavaScript to work, so hide it by default and then
style it once JavaScript has loaded.

Change-Id: I34ded9f279600945ab18dd7ecfd69d22e141a324
2024-06-14 22:56:52 +00:00
Jan Drewniak d8705f98bf Followup to 71c532e Separate out indicator and icon selectors
@OOUIIndicatorSelectors was accidentally added to
the selector that prevents double inversion.

Bug: T365764
Change-Id: Idc3e2ac9ef50270512b9786db4f525a9ba4754a3
2024-06-14 21:21:29 +00:00
Jon Robson 71c532e542 Separate out indicator and icon selectors
Follow up to I584491c280d93f18a48d8c90c4d8a6628f1a672f

Since these selectors are nested, this was generating unexpected
selectors, meaning the invert wasn't applying correctly to indicators.

This is evident on Special:Search

Bug: T365764
Change-Id: I40f8a8ad6598d145a6284c831e0cef944c5d7e75
2024-06-13 23:10:10 +00:00
jenkins-bot 74d5cd5cfc Merge "build: Updating stylelint-config-wikimedia to 0.17.1" 2024-06-13 12:22:06 +00:00
Volker E 7e6e3bcedb styles: Apply inversion on certain OOUI icons and indicators
In order for most OOUI black icons and indicators to be inverted
correctly, we need to apply the inversion to a limited number of
elements by a general class.
Applying here to keep OOUI library MediaWiki agnostic.

Bug: T365764
Depends-On: I792e89a8253a426b8c723486b96cb87bf9e1d85d
Change-Id: I584491c280d93f18a48d8c90c4d8a6628f1a672f
2024-06-12 15:31:01 +00:00
Steph Toyofuku 799c2be819 Remove not selector and target OOUI icons for inversion only
A number of icons using the vector-icon class that have been converted
to codex are being double inverted by this rule.  Instead, switch it to
enumerate the full list of OOUI icons and invert them, so that
subsequent codex migrations can be easier as well

Also bumps the bundle size to account for the increase in bytes

Visual change for the table of contents arrows being fixed, ideally not
for anything else

Bug: T365951
Bug: T365580
Change-Id: Ia389e73c72432eb5f7a2df4ff9b48593751bc184
2024-06-11 16:51:14 -07:00
VolkerE 695e355f95 Reapply "styles: Replace deprecated breakpoints"
This reverts the revert commit 4da9b57dcf
and adds updated hardcoded values.
Note that we're also planning a better maintainable solution
with JS constants as Codex library output in T366622

Reason for revert: Working CSS changes now including hardcoded values

Given the issue described in T367103 with max width breakpoints,
these are left hardcoded at their new values with a FIXME to update
these later.

VISUAL CHANGES: there are 3 visual changes with Pixel with this change
- all 3 apply to legacy Vector and look like false positives.

Bug: T349793
Change-Id: I7d151c4ba608cabebe9375b960c0c18b3992954f
2024-06-10 23:09:26 +00:00
libraryupgrader 5763df6bf4 build: Updating stylelint-config-wikimedia to 0.17.1
Change-Id: I7c1411a3aac14cf6fb4fdbb762b0de22b348b73f
2024-06-10 14:00:06 -04:00
jenkins-bot 7a2a013dfe Merge "Revert "styles: Replace deprecated breakpoints"" 2024-06-07 22:24:50 +00:00
Jdrewniak 4da9b57dcf Revert "styles: Replace deprecated breakpoints"
This reverts commit dd5b98515d.

Reason for revert: There are some hard-coded values in JS that reference these breakpoint, and need to be updated along with this change.

Change-Id: I4a16959d98c12ea1ca8b5b848f9cea0b9cea66f5
2024-06-07 21:05:50 +00:00
bwang 711f67ce00 Avoid wrapping floated tables using computed styles
Bug: T366314
Change-Id: I71657b7f1f26bcf52f5ade5b7668955a1f4df24b
2024-06-07 16:49:30 +00:00
jenkins-bot 873eb668b0 Merge "build: Update eslint-config-wikimedia to 0.28.0 and autofix" 2024-06-06 21:12:56 +00:00
jenkins-bot 2d2a1acdee Merge "styles: Replace deprecated breakpoints" 2024-06-06 19:46:07 +00:00
jenkins-bot abbee9416c Merge "Follow-up to Id04e39 "Adds invert exception for dropdown"" 2024-06-06 18:51:23 +00:00
jenkins-bot 60c61e681e Merge "Add skin-invert-image class" 2024-06-06 16:38:45 +00:00
bwang b24cb0518c Add skin-invert-image class
Bug: T365102
Change-Id: I5961d945b1aaeae1bff1d86c50118fc02dfb77b2
2024-06-06 10:58:57 -05:00
Ed Sanders 7e7486c4a5 build: Update eslint-config-wikimedia to 0.28.0 and autofix
Change-Id: I350941a711d2304fc968b3ba1f1e0afa5878578e
2024-06-06 16:22:05 +01:00
Jan Drewniak 8fb8731c04 Follow-up to Id04e39 "Adds invert exception for dropdown"
Adds hue-rotate( 180deg ) to the
.mixin-vector-arrowed-dropdown-toggle() mixin so that
the language icon doesn't appear with an orange
chevron in dark-mode.

Bug: T366337
Change-Id: If8f07e5924a31d761ac0af7efe0d982886bf6984
2024-06-06 15:17:13 +00:00
jenkins-bot a7dcf88b06 Merge "VisualEditor toolbar should use notheme" 2024-06-05 22:44:08 +00:00
jenkins-bot e1a73d9956 Merge "Make paragraph spacing 0.5em top and 1em bottom by default, handle adjacent inline elements manually" 2024-06-05 19:42:38 +00:00
bwang 716aad56af Add width exclusion notice
Bug: T366216
Change-Id: If50e9adcec6f2fa139e793b3a8108f3b4dd689ca
2024-06-05 19:15:11 +00:00
Jon Robson 8bb2e7d0ae VisualEditor toolbar should use notheme
For now, let's exclude VisualEditor's toolbar from the night theme.
This should result in no visual change, but will make sure it and
its associated icons are not impacted by the roll out of OOUI.

Bug: T365764
Change-Id: Id626a75dbdeddc8809e4ea75eba3c0fd6d2b08fe
2024-06-05 18:13:21 +00:00
bwang 225a02ff20 Make paragraph spacing 0.5em top and 1em bottom by default, handle adjacent inline elements manually
Bug: T366389
Change-Id: If83c7af5ccd4147bcf9b45436c905efac865b98a
2024-06-05 16:02:13 +00:00
Steph Toyofuku 84be3de748 Minor fixes to gadget disable logic
Two small changes per comments on
https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1036766:
* remove both night mode classes in a single function call
* slightly rework alterDisableLink logic to account for the possibility
that the message is empty when we check it

Bug: T365083
Change-Id: I1633df85e768b7da2f1f542fb793089f34bcc6b7
2024-05-30 16:48:55 -07:00
jenkins-bot 66bc7dbca7 Merge "Minor code change to literal" 2024-05-30 23:04:38 +00:00
jenkins-bot 3fb0bb484b Merge "Disable night mode if gadget detected" 2024-05-30 22:53:51 +00:00
Jon Robson deedcbcdb1 Minor code change to literal
Satisfy typescripts needs
Literals are evaluated faster and what we use more consistently.
With typescript, since keys and values can be any value, we need
to declare explictly the expected types of the values via a
@type command.

Note Object is also a constructor, if you use `new Object()` you
would get the same typescript error.

Follow up to I9583ee7ebf8c810ddd504193d568034c954d28f2

Bug: T365083
Change-Id: Ibfda8ea1bcf2ecb6b280302197af33e4c4065d95
2024-05-30 15:38:04 -07:00
Steph Toyofuku 4a0c2cb684 Disable night mode if gadget detected
While our implementation of night mode is in beta, we want to respect
the existing night mode gadget and disable night mode in favor of the
gadget, providing a notice with an option to disable the gadget and
reload the page

Additionally, raise the max bundle size to account for the additional
code added

Note: the tests still aren't exactly where I'd like them to be, but
hopefully they raise confidence a little bit with reviewing this patch

Additional changes:
* Upgrade to latest version of TypeScript types and remove several
@ts-ignore statements

Bug: T365083
Change-Id: I9583ee7ebf8c810ddd504193d568034c954d28f2
2024-05-30 20:23:38 +00:00
Bernard Wang 503559a05c Restrict table logic to nonfloated wikitables
Bug: T330527
Change-Id: I386a88481210f459d2174ff69e0f84d40fc9e3bd
2024-05-30 11:52:20 -05:00
Jon Robson dba9e16be2 Limit table wrapping to configuration flag
We want to limit this behaviour on initial roll out to certain
wikis.

Bug: T330527
Change-Id: If73f6f3d182cc386ebf0e750206afdb05fd3d863
2024-05-29 15:35:45 -07:00
Jon Robson caa650a881 Limit responsive tables to .wikitables
Bug: T330527
Change-Id: I61280270c6257ceaf5a6d74bb01be37063474bc7
2024-05-28 16:27:16 -07:00
Volker E 783d67e077 Replace border-color-portal-heading with Codex border-color-subtle
Replacing Vector specific variable with standard token that is meant
for exactly the applied use cases.
Note, I've left `border-color-subtle-transparent` because of that
extra engineering leg. I assume it was meant for animating the property,
which is not there. It seems better to me to replace this variable too
with `border-color-transparent`.

Change-Id: If264e04e576f044b98ec0d61b085f65af0110b6d
2024-05-28 14:29:20 -05:00