Commit graph

5199 commits

Author SHA1 Message Date
Roan Kattouw d378e4e3b9 Use packageFiles instead of startup module for config vars
Remove wgEchoMaxNotificationCount and wgEchoPollForUpdates from the
startup module and put them in the ext.echo.init module.

Change-Id: I03f9a3953aa97ead1a29c13a992a02404a6d0b68
2019-07-18 15:29:27 -07:00
Dayllan Maza b3df45dc34 Add option to mute/unmute notifications on Special:Mute
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
2019-07-18 15:47:24 +00:00
Translation updater bot 64eb55c290 Localisation updates from https://translatewiki.net.
Change-Id: I0027444ddbda96a92c9cb35cf07da8383381428b
2019-07-18 08:53:14 +02:00
Roan Kattouw e6e7541531 MentionInSummaryPresentationModel: Fix PHP error
RevisionRecord::getComment() can return null. When it does, accessing
->text on it fails.

Bug: T226681
Change-Id: I069cd5d5bef51a3e2b8f4e7b50d478cf47f65e00
2019-07-15 17:06:15 -07:00
jenkins-bot c2a61e22fc Merge "Move unit tests, round II" 2019-07-15 21:01:30 +00:00
jenkins-bot d22bcaddc4 Merge "Change polling rate when document not visible" 2019-07-15 19:00:10 +00:00
Amir Sarabadani 7a27d13a7b Move unit tests, round II
Change-Id: I4a419ae44a73ece55f2519dddc1aac4bedebc9e4
2019-07-15 18:10:01 +02:00
Translation updater bot e5d185c96d Localisation updates from https://translatewiki.net.
Change-Id: I1df3bf4bcebd840d770966bcfa638ae34e63dfcf
2019-07-15 08:34:09 +02:00
libraryupgrader 4bf8a6736a build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 24.0.0 → 26.0.0

npm:
* set-value: 2.0.0 → 2.0.1
  * https://npmjs.com/advisories/1012
  * CVE-2019-10747
* union-value: 1.0.0 → 1.0.1
  * https://npmjs.com/advisories/1012
  * CVE-2019-10747
* mixin-deep: 1.3.1 → 1.3.2
  * https://npmjs.com/advisories/1013
  * CVE-2019-10746

Change-Id: I6d3efdf65c207b98447565e2df6f0698aaa8ea6b
2019-07-14 10:57:49 +00:00
shivanshbindal9 795b87d55b Change polling rate when document not visible
We currently poll for the count of notifications after some fixed amount of time even when the user is not using it.
There is no need to poll at same rate in that case and we can poll at slower rate.
The rate now is decreased by 5 times.

Bug: T227501
Change-Id: Id53a88e0d5659edb0dac77dd3e346e2d88e95f94
2019-07-13 17:11:08 +05:30
Amir Sarabadani 1c93cba790 Move unit tests to the new structure
Change-Id: I02e2a33149eee859ec10ab7f8265609b0f17d1cc
2019-07-12 18:22:52 +02:00
Translation updater bot ba607772dc Localisation updates from https://translatewiki.net.
Change-Id: I956a55722aa78ab32e62282bf7288fbf6a7c0f7c
2019-07-12 08:43:20 +02:00
jenkins-bot eca3df8519 Merge "Add mediawiki.jqueryMsg as a dependency to ext.echo.init" 2019-07-11 22:11:40 +00:00
jenkins-bot c6a693a0dc Merge "build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1" 2019-07-11 14:41:47 +00:00
James D. Forrester 1b2c8eebfc build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1
Bonus: unset loop variable after mutable foreach.

Change-Id: I652fe65e4691a92175569a72f081f4553c4459c5
2019-07-11 13:40:37 +00:00
shivanshbindal9 d6e740ac86 Add mediawiki.jqueryMsg as a dependency to ext.echo.init
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
2019-07-11 12:03:36 +00:00
Amir Sarabadani 67246b9873 Stop autoloading test classes
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
2019-07-10 17:38:35 +02:00
Translation updater bot d1eac9bf06 Localisation updates from https://translatewiki.net.
Change-Id: Ie4dc154af2606e3ea1da5e4162b983efa7e62457
2019-07-07 22:39:06 +02:00
ephemeralwaves 05f3e66a9d Selenium: Fix failing test by only running tests tagged @daily
Changed `selenium-daily` npm script to only run tests tagged `@daily`
and removed `it.skip` on tests failing in beta cluster.

Bug:T227009
Change-Id: Id2edbfd941df098d326fa30ed9dc9f68e228f021
2019-07-05 10:58:19 +00:00
Translation updater bot cecd9e3fa4 Localisation updates from https://translatewiki.net.
Change-Id: I13b87616d176a6b0d6164dde80c9143f934e798a
2019-07-03 22:44:10 +02:00
jenkins-bot e5cd928e13 Merge "Add visual cue to indicate change in notification count" 2019-07-02 00:19:37 +00:00
shivanshbindal9 1a035e1287 Add visual cue to indicate change in notification count
* 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
2019-07-01 14:31:36 -07:00
jenkins-bot ca4e1fbba8 Merge "Use {{formatnum:}} for 99+ in default echo-badge-count message" 2019-07-01 18:39:04 +00:00
Željko Filipin e76e9f9b5c Selenium: Fix failing Jenkins job by disabling failing tests
Bug: T227009
Change-Id: I5d2fcc1e6f50e73375c834e1167726273c82025c
2019-07-01 17:49:29 +02:00
Translation updater bot 3d5483d4c2 Localisation updates from https://translatewiki.net.
Change-Id: Ie8af8fa0ecbcc7c7e70bed10d45d6f417da378c3
2019-06-30 22:37:35 +02:00
Isarra 0c0c0e596f MonoBook: Remove outdated skin styles and clean up some
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
2019-06-28 03:18:24 +00:00
Isarra 15600e27b0 Modern: Make the text less bloody tiny
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
2019-06-28 02:46:41 +00:00
Isarra 28dd2e0413 Modern: Remove outdated skin styles
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
2019-06-28 02:40:10 +00:00
Roan Kattouw c8e6ff49c0 Use {{formatnum:}} for 99+ in default echo-badge-count message
As it stands currently, every language that uses different numerals than
English does has to override the echo-badge-count message to provide
their own version of "99+". If a language doesn't do that, numbers up to
99 will display using the correct numerals, but "99+" will be displayed
verbatim. Some affected languages have overridden this message, but most
haven't.

Instead, use "{{formatnum:99}}+" in the English message. This is a no-op
in English and other languages that use the same numerals as English,
but automatically converts the number 99 in languages that use different
numerals. This way the only languages that need to override the message
are ones that use a different symbol than "+" for expressing "or more".

Change-Id: I247260ed9bbb40cff88e5ab873072269221b0ad4
2019-06-27 10:34:52 -07:00
Roan Kattouw d3653c649a Follow-up ea856105f2: fix horizontal scrollbars in Monobook
A positive text-indent causes horizontal scrollbars, so just hide the
screenreader text by making it transparent, and accept that we're going
to have the hover tooltip issue (T161302) in Monobook.

Bug: T226594
Change-Id: I6cb9ec146c2b469cbfb1fdc57937794d237e46db
2019-06-26 15:48:58 -07:00
jenkins-bot 1c3cb04618 Merge "NotificationBadgeWidget: Don't double-convert numbers" 2019-06-25 21:24:14 +00:00
Roan Kattouw d95b4bfaac NotificationBadgeWidget: Don't double-convert numbers
We shouldn't run numbers through convertNumber() twice.

Change-Id: If0ab0cad48761eaa1753f65e9d1557d84ec31961
2019-06-25 14:11:26 -07:00
Roan Kattouw ea856105f2 Fix badge icons in Monobook
In c86a1a5cf, the structure of the badge was changed, and the hack for
hiding the screenreader text in the badge was updated accordingly.
However, the Monobook styles were not updated, and this caused the badge
icons to be positioned off-screen.

Update the Monobook styles for the new badge structure, and use a
different hack for hiding the screenreader text because the one used for
other skins doesn't work in Monobook.

Bug: T226503
Change-Id: I190d2719addfbe50a7108193848bf23eef54bccf
2019-06-25 13:41:58 -07:00
Translation updater bot 506aa9d425 Localisation updates from https://translatewiki.net.
Change-Id: I4b5cd9e558def3547aad28169fd832cb6bcdf68b
2019-06-24 08:38:15 +02:00
jenkins-bot c2669ba0b3 Merge "Selenium: Test that checks for user mention alerts" 2019-06-19 10:42:06 +00:00
ephemeralwaves dd4539b522 Selenium: Test that checks for user mention alerts
Check that a user gets an alert when their username is mentioned by another user.

Bug: T224894
Change-Id: I303e10a40d1092e4b9f81deef0f1ac2af6f7a435
2019-06-19 10:23:22 +00:00
jenkins-bot a32d18d73e Merge "Make Notification count update without page reload" 2019-06-18 23:39:41 +00:00
shivanshbindal9 43bff91c68 Make Notification count update without page reload
* MVC is used to change the count of notifications on header icons.
* The Widgets are loaded after 60secs or icon click, whichever occurs first.

Bug: T219222
Change-Id: I2d034a76d5c3abe55894dd1dd10e28713344c5bb
2019-06-18 04:49:59 +05:30
Translation updater bot 6204787c6f Localisation updates from https://translatewiki.net.
Change-Id: Ia81fc65f5a49653f2379e7b7dfcd2f23eb8e0602
2019-06-17 22:33:45 +02:00
Translation updater bot 698cf06e63 Localisation updates from https://translatewiki.net.
Change-Id: I3651155f13400c433ec273f8b55481ad7ade5768
2019-06-16 22:35:46 +02:00
Derick Alangi f402ecd31f Echo: Fix case mismatch for function/method calls
PHP doesn't care much about the name (in terms of case sensitivity)
but I think we should make sure the names of the method should be as
they're in their definition.

Change-Id: I6e38d8be64efaec4200471f2d3007275d7ddecec
2019-06-11 22:46:24 +01:00
jenkins-bot a334ab5d34 Merge "tests: Remove local override for editPage()" 2019-06-11 00:09:13 +00:00
jenkins-bot 92d4d578a1 Merge "Localisation updates from https://translatewiki.net." 2019-06-10 20:58:39 +00:00
Translation updater bot 3c067d044e Localisation updates from https://translatewiki.net.
Change-Id: Iab8c0fde92f482f05ed09301f2bf3a0f008e7840
2019-06-10 22:54:32 +02:00
jenkins-bot 912923b742 Merge "Provide visual focus feedback for notification badges" 2019-06-10 20:52:43 +00:00
Max Semenik 538be81712 tests: Remove local override for editPage()
As far as I can see, it doesn't do anything different from the
parent class.

Bug: T225327
Change-Id: Id52ebd2faa179de39111221e55435e2e6e13aa05
2019-06-10 13:17:09 -07:00
manoj 0db743477d Provide visual focus feedback for notification badges
Provide visual feedback when focus is set on notification badges.
Also removing outdated `-moz-outline-style` property, which is applied
only in Firefox <= 3.6.

Bug: T186553
Change-Id: Ia523be0f74beb8fc52f8f04a9a7f59d88c7d2082
2019-06-10 12:31:45 -07:00
libraryupgrader 9572ab4c6a build: Updating mediawiki/mediawiki-phan-config to 0.6.1
Change-Id: Ibeb795b33383c04fe51040d29284ffa5ef4d10bf
2019-06-10 07:04:22 +00:00
libraryupgrader 9a030c4bfe build: Updating npm dependencies for security issues
* Updated grunt to 1.0.4, addressing:
  * https://npmjs.com/advisories/788
  * https://npmjs.com/advisories/813
* Updated stylelint-config-wikimedia to 0.6.0, addressing:
  * https://npmjs.com/advisories/786

Committed package-lock.json (T179229) too.

Change-Id: I9a58f8acade9bd129474785831e8c8174896982c
2019-06-08 05:43:44 +00:00
Translation updater bot 70a56e2814 Localisation updates from https://translatewiki.net.
Change-Id: I991c1141ec1c7cccfbf3c46b42687425ba98eaa4
2019-06-06 22:48:23 +02:00