Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377 introduced
the notifications content navigation, which allows skins
to choose where they want notifications to be positioned,
rather than requiring them to manually extract them from
the personal tools.
Bug: T266613
Depends-On: Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377
Change-Id: I7badfd9bf9257b2537596e9f2e93248f52e4bd82
These dont work. Timeless provides its own skinStyles for this module:
* Revert "Timeless skinStyles should be additive not replace"
This reverts commit 98d0d296a8.
* Revert "Use skinStyles for deciding where the text-indent should apply"
This reverts commit 8adab78547.
A new implementation in Vector means these are redundant:
* Revert "Item label can now use overflow hidden"
This reverts commit b5dd7baa08.
* Revert "Drop text indent in modern Vector"
This reverts commit 150fc7a16c.
Bug: T264339
Depends-On: I2afc12504d7184583fa8331479125474c68017dc
Change-Id: Ifd0dd5a0479588664b772fb839dbbcd8d7c47320
Sorry I made a mistake in my change and clobbered the existing
skin styles rather than extending.
Without this the notification icons will spill on to a second
line.
Follow up to 8adab78
Bug: T266135
Bug: T265806
Change-Id: Ic733a393636309e1bc4536141214fa420eed3e04
The code previously suggested it was only needed for Monobook and Vector
but it was also being used by timeless as discovered when 150fc7a16c
landed. This follow up applies the text-indent in the skin styles to ensure
it goes where needed.
Bug: T265806
Change-Id: I76a26a0a497f6bf7bb5f53967ea625f7e5d06ff7
Creates a new push-subscription-manager group and an associated
right, manage-all-push-subscriptions. The purpose of this is to
allow privileged accounts to purge expired subscriptions from the
database on behalf of other users. A user with this right will be
permitted to delete any subscription from the DB based on the token
alone. For all other users, deletion requests will be limited to
those associated with the requesting user's central ID.
This right will be granted to a bot account on Metawiki associated
with the Wikimedia push notifications service, and the push
notifications service account will make push subscription delete
requests to the API for subscriptions for which vendor APIs return bad
subscription responses.
Additionally, the providertoken parameter to ApiPushSubscriptionDelete
is updated to allow multiple providertoken values.
Bug: T259148
Change-Id: Ia6c17588ee94e6be74e5e3a75eb33e38f172fc93
Creates a EchoPushMaxSubscriptionsPerUser config setting (default: 0)
that controls the maximum number of subscriptions a user may associate
with the user's central user ID.
The setting is enforced in EchoPush\SubscriptionManager::create().
To allow creating push subscriptions for development, set
$wgEchoPushMaxSubscriptionsPerUser to a positive integer value in
LocalSettings.php:
$wgEchoPushMaxSubscriptionsPerUser = 10;
Bug: T259150
Change-Id: Ib97b6b6cbb8161dd75dad92c54b4fe4fff80c421
Implement RecentChange_saveHook interface and pass Config via hook handler
declaration in extension.json.
Change-Id: I2bc5950eb6fc066b2f2a83ea84b700d02b075de9
Finishes the implementation of the stubbed NotificationServiceClient.
Sends push notification request messages to the endpoint configured in
the EchoPushServiceBaseUrl setting. For example, to send messages to an
instance of mediawiki/services/push-notifications running on the host
machine while running MediaWiki in Docker, add the following line to
LocalSettings.php:
$wgEchoPushServiceBaseUrl = 'http://172.17.0.1:8900/v1/message';
Bug: T252899
Change-Id: Icab7825e9080d6b1a4cfc5e12fed1da221ce4610
Provides a basic push notifier implementation. Since the push service is
not yet in place, all it does for now is log debug output when a
notification is to be sent.
To register the push notifier, add the following configuration to
LocalSettings.php:
$wgEchoNotifiers['push'] = [ 'EchoPush\\PushNotifier', 'notifyWithPush' ];
$wgDefaultNotifyTypeAvailability['push'] = true;
$wgNotifyTypeAvailabilityByCategory['system']['push'] = false;
$wgNotifyTypeAvailabilityByCategory['system-noemail']['push'] = false;
We'll register the notifier in configuration for now, rather than
hard-coding the default in extension.json, in order to have control over
when and where it rolls out (beta vs. prod, as well as which wikis).
Since the push notifier implementation depends on jobs being processed
by the job queue, I also recommend adding the following configuration
setting to ensure that all pending jobs are processed at the end of each
web request:
// ensure all pending jobs are processed when a web request completes
$wgJobRunRate = PHP_INT_MAX;
Bug: T252899
Change-Id: Ie7f222443045d30620ff297b006104ef18a074a8
Adds DB tables for storing push subscriptions, some DB interaction code
for retrieving them within MediaWiki, and a set of API modules for
managing them from the outside world.
When testing this patch, be sure to run maintenance/update.php to create
the new tables, and set $wgEchoEnablePush = true in LocalSettings.php
to enable the API new API module.
N.B. The current DB schema is centered on app push subscriptions. Web
push subscriptions require slightly different handling, since they are
provided by browsers as a JSON blob rather than a token string. How to
handle web push subscriptions is a question we can defer until the time
comes to add web push support.
Subscription data is stored in the echo_push_subscription table, with
provider names normalized into the echo_push_provider table. We expect to
be looking up subscriptions by central user ID, so that column is indexed.
The subscription data also includes a column to store SHA256 digests of
the subscriber tokens. This is for use as a unique key constraint, since
we expect every push token to be univerally unique, and the token values
themselves may be too large to reasonably index in MySQL.
Bug: T252899
Change-Id: I3928761b3fba12e54ff4850e9a05c68ec7772f62
The single line of code it contained is part of mediawiki.base as of
MW 1.35, and the extension only supports MW 1.35+
Bug: T233676
Change-Id: Idcd456bd924e84ea53e1bb090267ef8d1ed35a94
Adding `aria-label` to the filter widget, with `listbox` role assigned
to allow screen readers parse read the content.
Bug: T244543
Change-Id: I72a4045abe9a7c391ee3fe471ed944d96259b79e
Make sure that the system-noemail and system-emailonly categories are
hidden, the way the system category is, by setting their no-dismiss
setting to "all". This should be unnecessary, because e.g.
system-noemail doesn't allow email, so just setting no-dismiss to "web"
should suffice, but
EchoAttributeManager::isCategoryDisplayedInPreferences() isn't smart
enough to see that. Doing it this way is also more future-proof for if
we ever add more notification methods in addition to web and email.
Change-Id: I00641d43a4eb1d3e2d3ea285682cf900733b1855
* Make sure the badge for desktop when initialised points to the
right thing
* Make sure the dialog takes up the full screen and the Clippable bug
does not interfere with the display of the pane
Bug: T241090
Change-Id: I6c5588ee689633cef413ef27449aeeea341d7a97
Allows users to opt out of receiving daily or weekly digests containing notifications
they have already marked as read on the web.
Bug: T169386
Change-Id: Ib47248678f88095492fb6896530be5a9f5bb43ca
Until PHPUnit7, the Stub interface came from phpunit-mock-object, and it
was at PHPUnit\Framework\MockObject\Stub. Then, phpunit-mock-object was
merged into PHPUnit, and:
- The interface above was moved to PHPUnit\Framework\MockObject\Stub\Stub
- The FQSEN above started pointing at a completely different interface
This is a temporary hack to allow upgrading to PHPUnit 8, and MUST be
removed as soon as the upgrade is complete.
The :string typehint is also necessary in PHPUnit8, and it will work
with PHPUnit 6 as well.
Bug: T192167
Change-Id: I07cebd07088bced5c5ddc62936f0098dfa39e151
I need this category to be able to complete T231395,
it doesn't make sense to web-notify user they were renamed
since renaming kills user session, so when they log in,
they already know.
Bug: T231397
Change-Id: Ib49a42969a2134bb89c17f62a7aea7db820374fa
Defaults to MainStash, but can be configured to use a different cache
backend by setting $wgEchoSeenTimeCacheType to a string that keys into
$wgObjectCaches.
Bug: T222851
Change-Id: Ifb935cc8be4618f7794ee79a234fc66d5cc5728a
This code will be enabled when Iba1d7863171268066bf7597182c57a0a2041497f
relinquishes the responsibility for rendering the Echo notification badge
and wiring up of the related JS.
It makes 3 assumptions:
1) Minerva will expose a VERSION property on the skins.minerva.scripts module
to tell Echo it can begin control of the functionality
2) A new hook `SkinMinervaReplaceNotificationsBadge` will run on the server side
allowing Echo extension to render the Notifications badge in Minerva.
3) A new client side hook (echo.mobile) will fire whenever the Echo dialog is opened or
closed.
All code relating to Echo inside MobileFrontend and Minerva is
moved here.
CSS for the modules is kept in Minerva as skinStyles
This code remains dormant until Iba1d7863171268066bf7597182c57a0a2041497f lands.
It pre-registers a "to-be-created" hook SkinMinervaReplaceNotificationsBadge that
substitutes the Minerva badge.
It also watches the export value of skins.minerva.scripts for a VERSION value - when
this appears it will take the signal that it should manage the frontend code.
In the new system the mobile specific code is limited to the mobile version of
Minerva. The desktop version of Echo loads on Minerva desktop - presenting an
opportunity in future to consolidate both implementations to use the same component.
The mobile version of Vector and Timeless for example will load the mobile overlay
(with existing styling issues that we don't need to worry about right now given
we don't officially support skins other than Minerva as mobile)
Testers:
* Check require( 'ext.echo.mobile' )(); inside initMobile
inside ext.echo.init does not fire until
Iba1d7863171268066bf7597182c57a0a2041497f is checked out.
Depends-On: I1a66939d2b596094b419de40b370e79f09c85581
Bug: T221007
Change-Id: I09c27a084100b223662f84de6cbe01bebe1fe774
This module only contains styles specific to Special:Notifications, so
ext.echo.ui shouldn't depend on it.
Change-Id: I14fc0076ab634d3bc5082402a9e069d76cf16d07
It became unused and was deprecated in 1ac72cc01a.
That was almost 4 years ago, back when these definitions were
in PHP instead of JSON.
Change-Id: Icbd5ee8df1fc339ffb2df9f05c35a9dcd545a3d1
As now polling is used to update the notification count on header icons.
If there are any new notifications then a snippet containing the header
part of the notification will appear using mw.notify().
Bug: T226130
Change-Id: Id38c8ebedebd4c68b9cef0635043d6f9304784dd
There's no real reason for these to be in MakeGlobalVariablesScript
because they don't really depend on the request context: they were being
omitted if the user was not logged in, but we can just check the user's
logged-in status in JS instead.
Bug: T221151
Change-Id: I2df6d7e061545d342bc3068dccd5ce2f6e85fe78
Remove wgEchoMaxNotificationCount and wgEchoPollForUpdates from the
startup module and put them in the ext.echo.init module.
Change-Id: I03f9a3953aa97ead1a29c13a992a02404a6d0b68
The hook (SpecialMuteModifyFormFields) is used to append
the option to mute/unmute echo notifications from a specified user.
Special:Mute handles posting and saving the fields, the only
requirement is that the field name is the same as the property
that wants to be modified, in this case 'echo-notifications-blacklist'
Bug: T220163
Depends-On: I2b3eee0802cb086091f35ecce13ae77a8e7d518d
Change-Id: I77b3ccfdce9b501eb8ecd58c0d7bbecb78029a7e
On certain special pages, either notification count in the title is not displayed or is displayed in an improper format.
This was because mediawiki.jqueryMsg is not loaded. This patch adds mediawiki.jqueryMsg as a dependency to ext.echo.init module
Bug: T225259
Change-Id: I6b76742b326d66ca08b4bf5c53ab95c4919249e7
There's no need to laod test classes, phpunit finds them
and it just makes $wgAutoloadClasses in production bigger with no value.
Also it makes moving tests around harder
Change-Id: I59ed7bb55cf6d57bdaf614476cf6db7640b1143b
* Adds notification count(alert+messages) to the title
* The count is updated immediately when notification count changes
* This functionality is feature flagged(wgEchoPollForUpdates)
Bug: T225259
Change-Id: Ic92c50d9885b0e4325b253338023d37adf8d35d0
Due to using ooui, and a lot of the styles being a lot more generic
in general these days for wider skin support, most of the skin
styles still included with Echo are no longer necessary or may even
be actively breaking things.
Remove a bunch of that, including some of the stuff for T226594 etc,
as we now have a more elegant solution in the skin itself.
Bug: T226684
Bug: T226594
Depends-On: I0ed21a78feb1b1298c30b969a1c80a4323e74043
Change-Id: Id3193a07f023eb0abc30fa24afe10da042fea876
Just reuse MonoBook's ui.overlay styles. Both skins are doing the
same thing with this regardless, hence why they have the same
problem without these styles.
Bug: T184295
Change-Id: Ide06d00a55f7f546462af951d97c73a649ebcc0b
Due to using ooui, and a lot of the styles being a lot more generic
in general these days for wider skin support, most of the skin
styles still included with Echo are no longer necessary or may even
be actively breaking things.
For Modern, basically just remove everything; nothing here seems to
apply anymore. Also frees us up to just fix the badge positioning
in the skin itself, and leave future maintenance up to the skin
maintainers, if anyone cares.
Bug: T226684
Change-Id: Id28bbc01b3b344dfeb39be1380a64c1368924289