Commit graph

1202 commits

Author SHA1 Message Date
jenkins-bot fa61b08243 Merge "Remove unused FooterNoticeWidget" 2024-05-16 20:52:15 +00:00
Bartosz Dziewoński 9699c06f1a Remove unused FooterNoticeWidget
Unused since 1eef6eeee3. After 6 years
we can probably say we're not going to need them again ;)

Change-Id: I9bab88cf56a5ecbcf8e1557f1635dd42e29deefb
2024-05-15 22:10:22 +02:00
Novem Linguae 08f8890055 eslint: remove redundant ruleset wikimedia/jsdoc
According to my testing, rulesets wikimedia/client-es6
and wikimedia/server already contain the ruleset
wikimedia/jsdoc. So I don't think it needs to be declared
twice.

Bug: T365047
Change-Id: I5d7fef0c9594cc4c8765877aa6f783543e8a00ed
2024-05-15 17:31:36 +00:00
bwang b5d2cb2b22 Add notheme class to Echo
Bug: T363779
Change-Id: I80f7005b189a51cbc1d526efc64efa76c706cc5b
2024-05-07 13:34:14 -05:00
Siddharth VP e27f4937ff Add API module for sending notifications
Allows users to send notifications to themselves (T306211). For sending
notifications to others, a new permission is created (echo-create),
assigned only to bots by default. For now, only one user can be notified
in one API request.

If the email flag is set in the API params, the notification is also
sent as an email, provided the user hasn't disabled email notifications
for the "api-triggered" category.

This feature is behind a feature flag. Set $wgEchoEnableApiEvents = true
to use.

Adapted from If0267a38be7d454e3d284d30f93c93a828288dd7.
Co-authored-by: TheresNoTime <starling-ctr@wikimedia.org>

Bug: T58362
Bug: T306211
Change-Id: I94642bff5dcb075cb9db862206d59c19edad9fd1
2024-05-04 17:43:39 +03:00
Ed Sanders df8fbfed38 Replace jsduck with jsdoc
Change-Id: I2a1bfedeba66c9ec1b3ee2640a77d5ef8782530c
2024-04-30 15:29:06 +01:00
libraryupgrader 049709a167 build: Updating eslint-config-wikimedia to 0.27.0
Change-Id: I682039a6f58a820ab46ab5d596922264f36509c9
2024-04-17 04:55:13 +00:00
Reedy 2b58f29d8c Fix casing of MediaWiki
Change-Id: If581a54ac1025bb13ff8fce5e8f64b92c71de986
2024-03-12 15:25:19 +00:00
Ed Sanders 2cac61da34 Move var declarations inline
Change-Id: I8734c30880bcb416a4945f6653555dc1189e7733
2024-03-05 22:39:09 +00:00
Ed Sanders 1b5116d668 Use native URL API, instead of deprecated mw.Uri
Change-Id: Ia6bf82de647eb051f2719c13ceff5a2b07a3721f
2024-03-05 22:08:59 +00:00
Jan Drewniak 7f23c77614 Support night mode in Minerva with .skin-invert class
Adds support for the night-mode theme in Minerva by
adding the `.skin-invert` class to the mobile overlay content.

Bug: T356425
Change-Id: I5ccb486d7af798a9e3da83c28246dafb49b72443
2024-02-22 14:02:43 -05:00
Volker E 5255d40496 build: Update 'svgo' to latest v3.2.0
This update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
  relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible

Bug: T354875
Change-Id: Ia2e8e947c7d10fa754885c8d917dc0616708fbaf
2024-01-11 19:07:46 +01:00
jenkins-bot 17ec20e0d6 Merge "Prevent clicks on bundled notif list from activating the bundle link" 2024-01-02 13:00:29 +00:00
jenkins-bot 8641483ac4 Merge "Fix borders of bundled notifications inside a bundle" 2024-01-02 13:00:26 +00:00
Bartosz Dziewoński de94e4ebe0 Prevent clicks on bundled notif list from activating the bundle link
If you click "Expand" on a notification bundle, the list of individual
notifications appears below. The list has a thin band of whitespace
around it (with grey background). Clicking inside that whitespace,
outside of the list items, would activate the bundle's primary link,
even though the cursor state did not show that would happen.

Change-Id: Id8c60503fa45f61df5bfaa07e0184634a5263c61
2023-12-16 02:28:13 +00:00
Bartosz Dziewoński 113da4ec5d Fix borders of bundled notifications inside a bundle
Follow-up to 00d6928144. I simplified
the styles too much :( They worked for cross-wiki notifications, but
not regular bundled notifications. I didn't realize they were styled
differently…

* Add the border to bundled non-cross-wiki notifs
  (this requires changes in SortedListWidget.js to add a wrapper)
* Hide the border until the list loads
* Remove unnecessary margin

Change-Id: I30c5bec11ddb49defa5957f0917f01057a3c21e7
2023-12-16 02:13:09 +00:00
Ed Sanders 2f61c46cf0 build: Update linters
Change-Id: I234e460ce1d1887af17c90cb9536aea76e295ca8
2023-12-04 14:11:35 +00:00
jenkins-bot 70051070e4 Merge "Simplify notification widget border styles" 2023-11-28 23:19:44 +00:00
jenkins-bot cf9ba679be Merge "Fix deprecated code paths" 2023-11-27 12:58:08 +00:00
Bartosz Dziewoński 00d6928144 Simplify notification widget border styles
Change-Id: I86362ffc4649146cb6e25e4493c37731c5915677
2023-11-17 13:42:31 +01:00
Bartosz Dziewoński 24fdeb0170 Fix unnecessary scrollbars on notifications popup
While loading or when there were 0 notifications, the popup displayed
with a scrollbar gutter, in a displeasingly different color.
When there weren't enough notifications to require a scrollbar,
the scrollbar was shown anyway.

These issues were caused by these rules, which don't seem necessary
any more. They were added for T130153 and T159888 (and a mysterious
scrollbar rendering bug), and I can't reproduce any of these bugs.

Bug: T351481
Change-Id: I370166ce31c86ae531080490c455286879999ae5
2023-11-17 13:18:20 +01:00
Ed Sanders 37b9ae3ed8 Remove unused CSS classes.
* user-button removed in I55c18cf72.
* mw-notifications-widget removed in I34e27364.

Change-Id: I802be3c15fd3d09f72094fc36e101ad38864ef41
2023-11-16 10:46:23 +00:00
Jon Robson da2c42b8a5 Fix deprecated code paths
mw.mobileFrontend is deprecated

Bug: T348807
Change-Id: I0790a0973bfb0f2f9daa6b1e3c234a1b6358f8e5
2023-11-14 10:21:46 -08:00
Volker E ab0f2df92a styles: Use new forward-facing breakpoint tokens
Replacing legacy tablet breakpoint variables with new Codex
design system `@max-width-breakpoint-tablet` tokens.

Bug: T331403
Change-Id: I8342b13c5ec6ad99f39a3d2f4ba1f2b0a1cf6386
2023-10-24 23:37:54 -07:00
jenkins-bot 8239b38530 Merge "Decommission Echo* instruments" 2023-08-29 21:47:54 +00:00
Sam Smith f4765cdd25 Decommission Echo* instruments
Completely remove the EchoMail and EchoInteraction instruments,
supporting code, and config variables.  Note well that the
EchoEventLoggingSchemas config included an entry for the
already-decommissioned Echo instrument so remove that too.

Bug: T344167
Change-Id: Ic0c44737d2c4a78ec19e67b8b8cd4e6cfb8e14fa
2023-08-29 11:27:15 +01:00
Jon Robson 75b6465876 Drop dead code
This code has been moved to Minerva and is no longer serving any
purpose. The handlers are replaced with an already standardized
mw.hook for Minerva to subscribe and respond to.

Bug: T342907
Depends-On: I55c18cf723a32f80b93a01dd0687e005162c4e93
Change-Id: I2f923e509d24524a2375ffbe6b3ef336487574bb
2023-08-17 13:05:12 -05:00
Jon Robson c50d129b02 Disable Echo behaviour on Minerva desktop
Bug: T342907
Change-Id: Ibd311593eb7f153ff0dea8aad516759d54cc1cd2
2023-08-08 10:47:19 -07:00
bwang ddaf43c5a0 Update notification badge to not rely on mw-ui-icon
This will essentially all be deleted after I55c18cf723a32f80b93a01dd0687e005162c4e93, but thats fine\

Bug: T343053
Change-Id: Ifb382af388cdc24dc1ecef105ec89c9129194c19
2023-08-02 19:10:34 +00:00
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