Commit graph

1173 commits

Author SHA1 Message Date
bwang d002532295 Update Echo to use MobileFrontend IconButton.js
Bug: T340262
Depends-on: I186e3d22aa9c2b331a80d35514d578949a4b9e86
Change-Id: I415f5092df5b757576a67b612a7691e9038a696f
2023-07-26 21:05:43 +00:00
Volker E 2e8e31d3c6 build: Update SVGO to v3.0.2 & re-crush icons
svgo         2.8.0  →   3.0.2

Amending to new `cleanupIds` plugin name.
Re-crushing SVGs while at it.

Bug: T339162
Change-Id: I37021bc12b29143a8a05ebbb183547df29aa1f6a
2023-06-14 19:12:11 +00:00
Jon Harald Søby 60748b0b25 Add PLURAL support for "mark all as read" buttons
Pass a relevant number of unread notifications to the messages
'echo-mark-all-as-read' and 'echo-mark-wiki-as-read' each time
they are used, in order to facilitate the use of PLURAL in
the messages. This allows translators to say e.g. "mark both as
read" when there are two unread notifications, for instance.

Bug: T321462
Change-Id: Ida65be2d7f2663d9802f71c7ea1eb588db8cd254
2023-04-29 01:31:14 +02:00
jenkins-bot e0da182083 Merge "styles: Replace 'mediawiki.ui/variables' call with skin variables" 2023-04-19 14:25:17 +00:00
Brandon Fowler a7232395b3 Exit overlay immediately if no transition
Bug: T334667
Change-Id: I45e976ca290d14287158f0558e01cd4e003d9eb3
2023-04-13 11:00:15 -04:00
Fomafix f822514254 Remove .join( '|' ) for API parameters
mw.Api automatically joins parameters which are from type array.

Change-Id: Ie7e22f5fdf296c907a671925efd511f99523c0c7
2023-04-11 19:31:40 +00:00
Volker E 7f6f792a3a styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' `@import`
with new skin-aware 'mediawiki.skin.variables.less' standard.
Also replacing and removing scattered WikimediaUI Base v0.15.0 variables
with new skin variables.

Also
- replacing several static values with new Codex design tokens featuring
  skin variables for following properties:
  - background-color
  - color
  - border-width, border-style, border-color and border shorthand
  - border-radius
  - box-shadow colors
  - outline-width, outline-style, outline-color and outline shorthand
  - opacity
- replacing equal-value Echo variables with new skin variables
- replacing `opacity: 0` with `opacity: 1px solid transparent`, which
  improves accessibility in Windows High Contrast mode

Bump required MediaWiki core version to >= v1.41.0.

Bug: T332541
Co-Authored-by: Volker E. <volker.e@wikimedia.org>
Depends-On: I04f9e48a1cf9dee915cf51e1e12b17ff0a595a06
Change-Id: If3863f07d7c3a8b58808fb03401c1060a92bc2ab
2023-04-04 01:26:11 -07:00
jenkins-bot a0eee370cf Merge "Add notification type for user page edits" 2023-03-31 09:41:35 +00:00
Ed Sanders 91869f5708
Add notification type for user page edits
Creates a notification type to notify users when their
user page is edited.

Co-authored-by: Kunal Mehta <legoktm@debian.org>
Co-authored-by: Ed Sanders <esanders@wikimedia.org>
Bug: T3876
Change-Id: Ibe0092a96d96f6fa9d93991418b723f3e70e1b75
2023-03-31 11:21:48 +02:00
jenkins-bot 174b2a1ea4 Merge "Don't show preferences link to temporary users" 2023-03-30 16:55:26 +00:00
Kosta Harlan c7c9033685 Don't show preferences link to temporary users
Bug: T330509
Change-Id: I8e210d916c77e8914be3a06861fa04cf1153d56c
2023-03-30 16:35:13 +00:00
Umherirrender 03d44330a6 stylelint: Enable selector-pseudo-element-colon-notation
Via stylelint --fix

Change-Id: I14b992b0313f093325c9c6f5109bae9ce26ebc2c
2023-03-30 00:24:47 +02:00
jenkins-bot 543f877684 Merge "Revert "Remove 50% opacity from notification badges when they are all read"" 2023-03-22 22:38:41 +00:00
Novem Linguae a7b56d2388 Revert "Remove 50% opacity from notification badges when they are all read"
This reverts commit 39c6e6f7b6.

Reason for revert: Caused a regression in Vector 2010 where notification icons are black instead of gray.

Bug: T331502
Bug: T329300
Change-Id: I3eb8c847feb67eb0abb08ee13a1071eb01bef9f9
2023-03-22 22:00:01 +00:00
Umherirrender 213f65e19d build: Remove unneeded inline stylelint-disable-next-line
modules/styles/mw.echo.ui.MenuItemWidget.less
 4:1  ✖  Needless disable for "no-descending-specificity"
--report-needless-disables

Change-Id: Ib8467edcd4cfb8f2a11b11872bddeecfdc9e5b04
2023-03-22 21:47:03 +01:00
Ed Sanders 39c6e6f7b6 Remove 50% opacity from notification badges when they are all read
This was originally decided in T115845 and then the decision
was reversed in T329300.

Bug: T329300
Change-Id: Ife3ab7501af00420965282adc0a6ee31990a68b1
2023-03-06 14:41:35 +00:00
jenkins-bot 779ce23d38 Merge "OOUI .addItems() must be called with an array" 2023-02-07 18:30:18 +00:00
jenkins-bot a85ab8b7e8 Merge "Fix opacity of focus styles" 2023-02-06 23:42:54 +00:00
jenkins-bot 1d7657f130 Merge "Improve focus styles" 2023-02-06 23:41:39 +00:00
jenkins-bot b037094122 Merge "Avoid hardcoded width for the popup's footer buttons" 2023-02-06 17:50:03 +00:00
Bartosz Dziewoński ed76ff596f Avoid hardcoded width for the popup's footer buttons
Hardcoded width interferes with OOUI's attempts to make the popup
narrower on narrow screens.

Minerva low resolution styles are now applied to all skins at
mobile/tablet breakpoints

Bug: T287132
Change-Id: Ifffe8c6330385356d35b7950ce9803f3a9f01b6f
2023-02-03 11:58:35 -08:00
jenkins-bot fb088ec581 Merge "styles: Replace deprecated Less mixins with CSS unprefixed property" 2023-02-03 05:47:16 +00:00
Volker E 608b4e7266 styles: Replace deprecated Less mixins with CSS unprefixed property
Also remove obsolete vendor prefixes.

Bug: T306486
Bug: T308351
Change-Id: Ie63d2b9d4c9883c2106b74daa03c6c244b32cc78
2023-02-02 14:26:12 -08:00
Ed Sanders 5289d1e8f2 Fix opacity of focus styles
Ensure buttons have full opacity when focused, as when hovered.

Change-Id: Id16e9e3691b7d9b0ebb03ac78bbe86c80568a00b
2023-02-02 17:06:55 +00:00
Ed Sanders 6b0268a758 Improve focus styles
Ensure there is always a 2px outline, and have that
outline cover the outer border where possible.

Change-Id: I3667d01e112f40663bc370ecd5bd6c3bb71ed219
2023-02-02 16:56:25 +00:00
thiemowmde 9c1031c3fa OOUI .addItems() must be called with an array
Some versions of OOUI also accepted single non-array items. But this
was never official. Let's follow the spec.

Change-Id: Ie14431be802a6c71127c1b418e750ce5c9beb863
2023-01-05 16:32:18 +01:00
jenkins-bot 35d89af670 Merge "Initialize Echo when CentralAuth autologin replaces the user toolbar" 2022-11-21 09:02:02 +00:00
Gergő Tisza b69a2cf57f
Initialize Echo when CentralAuth autologin replaces the user toolbar
Bug: T55134
Change-Id: I2699e84080c907c491b1becdc485fd176f3b2bca
2022-11-19 23:28:23 -08:00
Jon Robson 499684815b Move skinStyle rules to skin
Badge rendering is a responsibility of the skin (since badges
must work with JavaScript disabled). Because of this, we move the
styles to their associated skin (Monobook and Minerva)

Bug: T257143
Depends-On: I1999185d19e171900f2da5acbd39125013d3582c
Depends-On: Ib148e90a3fde42ebcf271432dce3ccfc8985c677
Change-Id: I9319c72183a312cf0f55942ba1f78aa974ce5e84
2022-11-18 16:22:35 -08:00
Fomafix 0bd7114c90 Use shortcut mw.msg( ... ) instead of mw.message( ... ).text()
Change-Id: I3b84e3a19eda44642d5f4993a1e30dda569a4d08
2022-11-05 22:13:42 +00:00
Jon Robson ddc11bfe8e Drop badge styles for Vector
These have been moved to the Vector skin

Bug: T257143
Depends-On: If52986fe56b65479adabe8233b0fc6df164b5376
Change-Id: Ibf11821e863d3089d60cf5c0959c4c5ddc5ce4f2
2022-09-23 10:55:00 -07:00
Jon Robson e9d656e1cd Add icon definitions to Echo badges
This should result in no visual change to Echo, but allows
us to change the Vector implementation here.

Removes all styling when vectorvisualenhancementnext=1
is enabled.

Bug: T257143
Change-Id: Ice602ba246b51252ff0527a531aa4d5d3baee64e
2022-09-23 17:34:13 +00:00
Jon Robson 2e58065ddf Echo should fire onInitialize event after rendering of badge
This allows skins to make modifications to the final output.
This will be used in Vector to make the Echo icon consistent with
other icons.

Bug: T257143
Change-Id: I9fe8c921956ede164d93cb1f42647cf4b80ca976
2022-09-22 08:49:44 -07:00
Volker E 2abf220e58 styles: Remove IE 8-9 special way
`background-color: transparent` is the way to go.

Change-Id: I34598d0e543cda3dd711fca88986a663a3a7519b
2022-09-15 19:20:33 -07:00
jenkins-bot f6f1968429 Merge "Echo mobile: add CSS media query class - bug fix" 2022-08-25 15:07:02 +00:00
Bartosz Dziewoński 54c27e5763 Fix notification dynamic actions outside of the dropdown
* Event handler was not registered for the non-dropdown version
* Clicks would be handled by both the action and by the default link

Also remove returning false to prevent default and stop propagation,
this is not supported by OOUI events and did nothing. Handling a
'click' event always returns false to jQuery (so this was not needed),
handling 'choose' event never does (hence my other fix was needed).

Change-Id: Ia8a21749a8edc20f34b2a3e445278ea6922b9109
2022-08-24 00:28:54 +02:00
Bartosz Dziewoński 84843d3619 Standardize dynamic action notification styling
* Remove custom light grey color on the body, on mobile the
  notifications are shown on dark grey background, making them
  unreadable
* Remove increased font size for the title, it looks weird,
  particularly on mobile

Change-Id: I08651d2eab19904c19072f186cd2a96fb44e93ec
2022-08-23 23:42:48 +02:00
essexigyan 0659331111 Echo mobile: add CSS media query class - bug fix
Bug: T280839
Change-Id: Id2b26aab650fbb48c9fe8310e96dae12b354849e
2022-08-17 00:33:47 +00:00
suecarmol f83acdf5d3 Echo mobile: add CSS media query class
Added a new media query to fix an error in the Special:Notification preferences button.

Bug: T280839
Change-Id: I1a4cdc9111c6ada3c79f6ec1f1fa2e40dc240238
2022-07-20 17:51:03 -05:00
Jon Robson a7dd4a9d5c Drop SkinMinervaReplaceNotificationsBadge hook
This is now dead code that was removed in
Id611cc07aebfb94e50bde8902cbc0627393fa926

Bug: T309748
Change-Id: Ic4f9881301aa313e7c380d602c6742aff1a886db
2022-06-22 15:36:11 +00:00
Jon Robson 6767e52d8c Pass Echo configuration to mobile
When Echo moved to packageFiles it broke the mobile
unread counter behaviour

Follow up to I03f9a3953aa97ead1a29c13a992a02404a6d0b68
which presumably happened when Minerva's Echo code was
in a different code repository.

Bug: T310358
Change-Id: Ife6705d69d248bcd4efde1a996dbcc0353c7f40d
2022-06-13 16:01:05 +00:00
jenkins-bot 8ae621f8d3 Merge "Don't change width of Vector when more than 0 notifications" 2022-05-16 20:04:30 +00:00
Jon Robson 287c59be44 Don't change width of Vector when more than 0 notifications
Bug: T307134
Change-Id: I133162d06166bc2c3cabd58b61fc8437fdb3db1f
2022-05-16 12:18:48 -07:00
Kosta Harlan 0abeb2bfeb
Use watchlist-progressive icon for WatchlistChangePresentationModel
Bug: T203941
Change-Id: I8c252c5a48296fd47f0e30462a9771baf7fd7804
2022-05-11 13:57:09 +02:00
Ed Sanders 2af0c6d816 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I60f34cb3c3c5c12cf1f9f38426a56c76dcf063fd
2022-05-09 14:05:59 +01:00
Jon Robson 5752542981 Prepare for removal of SkinMinervaReplaceNotificationsBadge hook
Bug: T301263
Change-Id: I7b9cf401936be2421d0ad4efe963486404d50e6a
2022-05-06 14:26:16 +00:00
jenkins-bot cfd9dbf9ca Merge "Replace deprecated Less .box-sizing() mixin with standard CSS" 2022-04-26 11:12:58 +00:00
Volker E fe766f04ea Replace deprecated Less .box-sizing() mixin with standard CSS
Also remove 'mediawiki.mixins' includes where unused.

Bug: T306488
Change-Id: Ia9a5a1ce1e47c1de2c2197885237f9355f9cc4f2
2022-04-20 17:14:37 +00:00
lens0021 5943b13b5b
Handle the missing 'all' type as specified in the doc
The text for 'type' in the documentation of the parent describes the
notification type can be 'all', following 'message' and 'alert'. That is
actually used, for instance inside of
mw.echo.Controller.markLocalNotificationsRead() function. The gap
between doc and implementation results in bugs. This resolves the gap.

Bug: T270879
Change-Id: I546aa42e927a05a5426db90153901ae632b97e36
2022-04-20 21:57:12 +09:00
Jon Robson 5350bba546 Drop unused zero class
Not used anywhere.

Change-Id: I848650e4e3497664d712537437d8a10b22d6afb1
2022-04-04 18:20:27 +00:00