Commit graph

1607 commits

Author SHA1 Message Date
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
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
jenkins-bot 4235ff0efd Merge "Wrap tables with JS" 2024-05-24 22:46:24 +00:00
bwang e42b235669 Wrap tables with JS
Depends-on: Ia271a57776e6f38384c5855727ab82fd7af83241
Bug: T330527
Change-Id: I756f8e1bcd86867bee52962a0d1c2dbb34ca75eb
2024-05-24 15:49:54 -05:00
Jon Robson 48b0eeac2f Icons should not repeat at larger font sizes
Bug: T365731
Change-Id: I539f906e06bb2dc133885092dbacb851fd774c23
2024-05-24 20:32:46 +00:00
ksarabia 17a71f3c82 Adds invert exception for dropdown
* Adds a filter invert rule for toggle

Bug: T365035
Change-Id: Id04e3937ff1ef3982563003346fda07348ae26ea
2024-05-24 11:55:20 -05:00
Jdrewniak 607e6b39c5 Revert "Add exclusion behaviour for "width" option in Appearance menu"
This reverts commit ff5a61e9c6.

Reason for revert: The behaviour introduced in this patch needs some more consideration.

Bug: T364015
Change-Id: Ieab4ca4084df4f1b5c942fe81c7fb99b058e0623
2024-05-23 23:51:46 +00:00
Moh'd Khier Abualruz 4d97e0a4fb fix(vector): Set popup notification color to inverted
Updates `CSSCustomProperties.less` to include `.oo-ui-popupWidget-popup` in
`@OOUIOverrideSelectors` for inverted color inheritance.

Bug: T364798
Change-Id: I6c3ac79d24f6af71a9171153e346494fb97acd3f
2024-05-22 16:53:26 +02:00
Jon Robson 70fbd6f0c2 Small font size is not applying to excluded pages
Bug: T364887
Change-Id: Ib24beb3a383599dcc3ad64e01992ead908e3bef3
2024-05-21 23:41:35 +00:00
Jon Robson f4befc068d [Visual change] Limits two row header to mobile devices
I accidentally enabled this on tablet breakpoint.

Follow up to e3d2ab5031
The Pixel UI report should only surface changes on mobile - all
of these are improvements as it means the whole UI is visible in
the viewport.

Bug: T361573
Change-Id: I8aa5699a8fe959c1595d74c03f19c14856f6470f
2024-05-21 11:52:10 -07:00
jenkins-bot 0f9ad1ba67 Merge "Support Vector 2022 at > 320px" 2024-05-21 14:23:09 +00:00
jenkins-bot 685a02f8a6 Merge "watchstar: use mw.util.isInfinity() instead of comparing to 'infinity'" 2024-05-20 23:48:09 +00:00
MusikAnimal c06d62a531 watchstar: use mw.util.isInfinity() instead of comparing to 'infinity'
Bug: T353389
Bug: T353483
Change-Id: I580deb0ba47e4c13643524ddd4d57f1a8e0a35ae
2024-05-20 16:27:42 -07:00
Ed Sanders 54b750af14 vector-popup-notification: Use 14px font size instead of 16px
Vector still uses 14px almost everywhere, so use it here
as well.

Bug: T360335
Change-Id: Icf4891375a62480ffbb4808a357935aa6d6fdc58
2024-05-20 13:59:31 -07:00
Volker E dd5b98515d styles: Replace deprecated breakpoints
The values have slightly changed:
- Tablet breakpoint is decreased by 80px,
  pushing lesser devices into a mobile only experience but
  should make barely a difference to vast majority of our users.
- Biggest difference is in `min-width-breakpoint-desktop`,
  which is increased by 120px in comparison to
  `@width-breakpoint-desktop: 1000px`

Bug: T349793
Depends-On: I3afba8c51f60de9271054499bfa3ffbcc1a9d779
Change-Id: I56b93d5241d6a029dcb6814de02d18ac9f38ee5d
2024-05-18 02:28:18 +00:00
Jon Robson e3d2ab5031 Support Vector 2022 at > 320px
In preparation for enabling responsive Vector on Wikifunctions,
we lower the support threshold to 320px for Vector.

Minor adjustments are made to the header to make it use two
lines at lower resolutions.

Fixes to tables to make them responsive will be made shortly as
part of T330527 which will complete the responsive behaviour.

Bug: T361573
Change-Id: Idbac393ab6ee60100ba0fd6df4b224cc45949bfd
2024-05-17 23:31:37 +00:00
jenkins-bot b33513e20b Merge "Override default sublist styles" 2024-05-17 21:08:51 +00:00
jenkins-bot c570ec099d Merge "Optimize styles" 2024-05-17 18:30:33 +00:00
Jan Drewniak ff5a61e9c6 Add exclusion behaviour for "width" option in Appearance menu
- Adds the notice "This page is always wide" and disables
  the inputs for the "width" options in the Appearance menu
  when pages are excluded via configuration ( `$wgVectorMaxWidthOptions`).
- Changes layout behaviour so that pages in the
  $wgVectorMaxWidthOptions['exlcude'] configuration
  stretch the entire viewport width.
- Stops the width settings in the Appearance menu from
  being hidden on smaller resolutions.

Bug: T364015
Change-Id: Idee294adf3b309e03834276ea75e4ae43b0cffcb
2024-05-17 17:58:19 +00:00
Jon Robson 1d17b4624f Optimize styles
1) Icon optimizations
* Load styles for expand icon in
JavaScript since it relates to table of contents and that is only
enabled with JavaScript
* Drop vector-icon--x-small class since it only applies to this icon
* Remove some FIXMEs to an issue that has already been fixed
upstream

2) Move styles that do not need to be render blocking to skins.vector.js
* Move sticky header to skins.vector.js since it doesn't work without
JavaScript
* Move popupNotification to skins.vector.js since this is never server
side rendered.

Change-Id: I98e6c0826b514aaefcf88f66275bba37125129b1
2024-05-17 16:26:16 +00:00
bwang ff894e3682 Override default sublist styles
Bug: T364865
Change-Id: I179c059992b2ae614b984b8023774306764ccb57
2024-05-17 15:46:41 +00:00
bwang f13bc5ed80 Remove list-style-image used by ul elements
Bug: T364865
Change-Id: Id365e946e8c71f4812cbb9e4b00618fb73572554
2024-05-15 15:01:40 +00:00
Jan Drewniak 0d1de4773d [Follow-up] Override VE overlays in night-mode
Follow-up to 26d39ec, change VE overlay selector
from `.ve-ui-overlay-global` to `.ve-ui-overlay`.

Bug: T363861
Change-Id: Ie531ce6d03d81fbce374f7e17c785d4bb076bfda
2024-05-14 14:30:56 -04:00
Jan Drewniak 26d39ecafa Override VE overlays in night-mode
Creates a Less variable `@OOUIOverrideSelectors` which can serve
as a list of selectors that we want to treat the same as the `.notheme`
class (as an alternative to adding the `.notheme` class across repos).

Adds only one selector to this variable, `.ve-ui-overlay-global`
in order to force VE overlays to appear in light-mode while night-mode is
enabled.

This is a temporary measure until T363849 is resolved.

Bug: T363861
Change-Id: I3e3a209f1a9bd9130fc61915b9b2ff7134405e59
2024-05-13 21:58:20 +00:00
jenkins-bot 277135ef58 Merge "Fix red link color in dark mode" 2024-05-08 14:53:37 +00:00
bwang 337d608a56 Fix red link color in dark mode
Bug: T363778
Change-Id: Iae4fe2d793b8efbb10b54144ce4093c3e2112da2
2024-05-08 14:31:43 +00:00