Commit graph

6821 commits

Author SHA1 Message Date
Translation updater bot dc7dfd6b30 Localisation updates from https://translatewiki.net.
Change-Id: I07a6a4078ff434de59be35e483984f6044ca6c26
2022-04-01 08:26:41 +02:00
jenkins-bot 9c14f7b821 Merge "MarkRead: Remove redundant setAction()" 2022-03-31 12:41:51 +00:00
Translation updater bot f2e177fb88 Localisation updates from https://translatewiki.net.
Change-Id: If826da93fcdd5429f363c5c49750629d5f05d0ce
2022-03-31 08:35:44 +02:00
Translation updater bot 94e5406860 Localisation updates from https://translatewiki.net.
Change-Id: I735a0a18800c1d9bde0428115c4085117119982f
2022-03-29 08:05:40 +02:00
jenkins-bot 61d1a2d5d4 Merge "Set all icons used in EchoNotificationIcons to 30x30" 2022-03-28 22:36:19 +00:00
Translation updater bot 70c1c4e83d Localisation updates from https://translatewiki.net.
Change-Id: I52e3aa1e280066686bfd1d185373447dc4e9373d
2022-03-28 08:20:52 +02:00
Func 8e13fddf35 MarkRead: Remove redundant setAction()
Using setTitle() should be enough.

Change-Id: I1ec8f2db0bd6781ac13b558da031c1809dcbc459
2022-03-27 21:03:43 +08:00
Ed Sanders 73d563cad9 Tweak primary button action styles in emails
Make buttons match the style guide a bit more closely:
* Use bold text
* Add border-radius
* Tweak padding

Change-Id: Idc929f2b7846c71c9a3011376402aaee65b32dcf
2022-03-26 23:29:18 +00:00
Ed Sanders 2c8c9e5b82 Split email CSS over multiple lines
Change-Id: I539f91b98ca833158b851b9ce826286c02141a8f
2022-03-26 23:29:15 +00:00
Ed Sanders e7ac2a8966 Set all icons used in EchoNotificationIcons to 30x30
This will cause them to be rasterized as the correct size
when used in emails. When used on the web (as SVGs) they have
their dimensions set by CSS.

Bug: T275936
Change-Id: Id7b76cf13bf9ebb88776d9c7eebc3944732ae743
2022-03-25 13:18:07 +00:00
Translation updater bot d2266fdfb3 Localisation updates from https://translatewiki.net.
Change-Id: I11ec4c025beb4fb899d149af539a2009b9e709b4
2022-03-25 08:34:48 +01:00
Translation updater bot 1dc0241c63 Localisation updates from https://translatewiki.net.
Change-Id: I186a3bc3886d477093ec5df23f17ab7583eeed66
2022-03-24 08:34:19 +01:00
Umherirrender 592e53a925 Call IDatabase::timestamp before inserting notification_read_timestamp
This is needed for proper cross-RDBMS support

This reapply a change from I46206e0b3a687dff3168a81cf0020e669133e876,
reverted with I1c8c409b7820512b3e31246a7f3d8c1cf4db209c.

Bug: T244898
Change-Id: I8b1387aff18d88088a993bc099165e9882658ac0
2022-03-23 22:09:19 +01:00
Translation updater bot d4a714aa95 Localisation updates from https://translatewiki.net.
Change-Id: Iae70b466a1978c0146962270153bdf775490a64d
2022-03-23 08:25:15 +01:00
jenkins-bot 3ce93e3368 Merge "Revert "Call IDatabase::timestamp before inserting rows"" 2022-03-21 14:02:39 +00:00
Hashar 9433b83f2d Revert "Call IDatabase::timestamp before inserting rows"
This reverts commit 4eb8fa23e4.

Reason for revert:

 Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp:
 The timestamp cannot be represented in the specified format

Bug: T304307
Change-Id: I1c8c409b7820512b3e31246a7f3d8c1cf4db209c
2022-03-21 13:28:37 +00:00
Translation updater bot d422a4845f Localisation updates from https://translatewiki.net.
Change-Id: Ic760b7006be3055c55108c58b4fcb77a6423585b
2022-03-21 08:14:39 +01:00
jenkins-bot 0acd3fea47 Merge "Call IDatabase::timestamp before inserting rows" 2022-03-18 13:56:59 +00:00
Translation updater bot 1ecdb3d52d Localisation updates from https://translatewiki.net.
Change-Id: I8ba194eb5aee9a1b145a46f208a7f1ae182d6976
2022-03-16 08:07:33 +01:00
Amir Sarabadani ea21714241 Remove mocking of numRows
Deprecated and to be deleted

Bug: T286694
Change-Id: Id678f8366e7a9c18696083b2e331d2dce7d8a8eb
2022-03-15 17:36:29 +00:00
Translation updater bot 8d35823643 Localisation updates from https://translatewiki.net.
Change-Id: I356e6e3ca52f392bc5924e74e64b310f3d4ea294
2022-03-15 08:25:12 +01:00
Translation updater bot 2e6eaa17f8 Localisation updates from https://translatewiki.net.
Change-Id: Iaf5c3b204a0f82fd011cba114a69b9995e5c9d33
2022-03-14 08:13:53 +01:00
jenkins-bot 011cb2dec5 Merge "Make some DiscussionParser methods public instead of private for reusability" 2022-03-11 12:21:29 +00:00
Translation updater bot 3ee930d28c Localisation updates from https://translatewiki.net.
Change-Id: Idbf662d50920a1f69f75c5ef85f9a941dbef45d9
2022-03-11 08:32:31 +01:00
Translation updater bot 928006b561 Localisation updates from https://translatewiki.net.
Change-Id: I8c11715aa3884f01856abcc6fe88c315da846dd2
2022-03-08 09:01:35 +01:00
Translation updater bot 68039f9358 Localisation updates from https://translatewiki.net.
Change-Id: I245fee8f2b968c8a299f66994d38c25818a8eba8
2022-03-07 08:10:55 +01:00
Reedy 0efcb843dd Use namespaced EventLogging class
Change-Id: I42affe2633f39a3be02a78e4a6b5dd32b23ff7bd
2022-03-06 16:11:17 +00:00
jenkins-bot 586e1291bf Merge "Clicking Echo badge should close ULS dialog" 2022-03-05 06:09:41 +00:00
Jon Robson 0c074ec91a Clicking Echo badge should close ULS dialog
Bug: T295796
Change-Id: I3a7f33cad4e08ce22b6e640901c965d764c9156b
2022-03-04 22:47:23 +00:00
jenkins-bot 6961fa957c Merge "tests: Remove overlayManager from NotificationBadge params" 2022-03-04 15:45:38 +00:00
Kosta Harlan 4e125c5095 tests: Remove overlayManager from NotificationBadge params
Doesn't seem to be used anymore

Change-Id: I18f2709f000ca7469432a4c4bb919adfa0b3e829
2022-03-04 15:23:13 +00:00
Amir Sarabadani c48b69bdd7 Change use of deprecated getLazyConnectionRef
Bug: T255493
Change-Id: Ic9aa81f70e17a85949beabe9087a7cadcf6b7f7e
2022-03-03 13:23:45 +01:00
Timo Tijhof 5a76489be0 tests: Fix QUnit warnings and resolve complex test_NotificationBadge
== Problem 1 ==

As of I09c27a084100b223,  tests/qunit/index.js or equiv was used to
load test files asynchronously from a using() callback. This was
untracked by RL or QUnit, and thus sometimes ended up finishing after
the test runner was already done executing all tests. In CI this
means the tests are sometimes never loaded and the browser (or Node)
process already killed before they even have a chance to arrive.

Prior to QUnit 2.17, this was no way of detecting this. As of
QUnit 2.17 (core upgraded last week) when running tests manually
the following helpful warnings appear in the console:

> [warning] Unexpected test after runEnd.
> [warning] This is unstable and will fail in QUnit 3.0.
> test	@	qunit.js
> tests/qunit/model/test_mw.echo.dm.SeenTimeModel.js
> require

There were about 1072 instances of this warning, all from Echo.

Fix this problem by removing the async callbacks and specifying the
two modules as normal dependencies instead.

== Problem 2 ==

Class NotificationBadge was being loaded in a strange way out of
bound. This was a violation of module boundaries and should not be
needed other than for a temporary hack or other tech debt. More
generally when a test uses `packageFiles` this is a likely sign of
tech debt or misunderstandings.

Instead, depend on `ext.echo.mobile` and export/import the class
as normal.

After this, the test module can use `scripts` instead.

== Problem 3 ==

The `ext.echo.mobile` uses a Mustache template which the test
was also duplicating a reference to. This is no longer needed now.

Due to the `qunit/index.js` file carefully splitting the operations
between template assignment and file loading, I wondered whether
it was meaning to replace or mock it with something else, but it
simply refers to the same file and only does this because it wasn't
using the module directly. This is now resolved.

If you do need to mock in the future, this can simply be done
by assigning `NotificationBadge.prototype.template` from a
beforeEach() callback in the test suite, or by supporting it
property as a constructor option in NotificationBadge.js and
assigning `this.template` there, which is supported by the
mobile `View` class already it seems and would follow DI patterns
more effectively.

== Problem 4 ==

Most of the Echo tests were ignored sometimes and executed other
times.

The test for `ext.echo.mobile` in particular though was never
executed in CI specifically because:

> Undefined module: 'mobile.startup'

This became a hard error with this patch, which is fixed by
the CI config change with Ie9dabe3269c56fa76db8e51.

Bug: T299780
Change-Id: Ie4a87f3b8085fd6ae53ec586c1782cc266d5288a
2022-03-02 12:52:06 +00:00
Timo Tijhof 1ae60e5977 ext.echo.mobile: Name init function as such for clarity
It is common for internal files to export a single value, e.g.
when a file exports a single class or other special value.

However, this is uncommon for a module's overall export.

* It can create the misunderstanding that the init code is immediately
  executed, when it is in fact delayed.

* This leads to the obscure `require()()` statement that is easy to
  misunderstand.

* The least-effort way to expand this is by adding a statement
  like `module.exports.Foo = Foo` after `module.exports = init`
  which has the sublte behaviour that 1) it only works in this
  order, not reversed as then Foo would be de-referenced by the
  second assignment, and 2) it has the subtle effect of attaching
  Foo to the `init` function as `init.Foo` which is non-obvious,
  and 3) makes the init function unsafe to pass around, wrap,
  stub or otherwise treat as a regular function.

Remedy by naming it as "init" on a regular module export object.

Change-Id: I51065e00f9dcaec075578a46df4de32c7a427df3
2022-03-01 23:11:40 +00:00
Ed Sanders f1602001fd build: Update eslint-config-wikimedia to 0.22.1
Change-Id: Ia9c0532178719f3ff3feee43736893abd0c5e123
2022-02-28 13:59:20 +00:00
Ed Sanders 7fcb7534a9 build: Update stylelint-config-wikimedia to 0.12.2
Change-Id: I4ce41646b338555c51c3269c699c712790af096a
2022-02-28 13:59:02 +00:00
Translation updater bot 0a0fbe6b06 Localisation updates from https://translatewiki.net.
Change-Id: I212a618708a887e9e23c1d4af0582db25cecdcce
2022-02-28 14:28:39 +01:00
Volker E c5c27568a5 build: Update 'svgo' to latest v2.8.0
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.

Change-Id: I63c72634eb2bb7063d71c8c21679f6f2091a4f1f
2022-02-27 02:12:20 -08:00
Translation updater bot 78aaaeb230 Localisation updates from https://translatewiki.net.
Change-Id: I613067d508e635c03fcd39b5d77685dad462d424
2022-02-25 09:43:27 +01:00
Translation updater bot 30bd57d813 Localisation updates from https://translatewiki.net.
Change-Id: I73dd8591db1ad3e1ab5c3236b9c02097c92c22a7
2022-02-23 08:18:53 +01:00
Translation updater bot d0d91056fe Localisation updates from https://translatewiki.net.
Change-Id: I1e85b78e369ba2f79257368ec19d83f23a521eca
2022-02-22 08:11:36 +01:00
Translation updater bot d2744a11e9 Localisation updates from https://translatewiki.net.
Change-Id: I1cd2ce8d43da03ca836e47afec646506f5910ae9
2022-02-21 08:15:39 +01:00
Jack Phoenix 9ed8612642 Make some DiscussionParser methods public instead of private for reusability
Comments has been duplicating these methods for quite some time for no real reason other than that they're private here.
Duplicating these methods appears to be necessary if and when working with extensions where users can be @mentioned but which are
not implemented as ContentHandler subclasses or otherwise related to regular wikitext pages.

Change-Id: I9c097bab9c5eed8f2399c86897b1f8968126c765
2022-02-17 14:21:09 +02:00
Translation updater bot 2f6892fab0 Localisation updates from https://translatewiki.net.
Change-Id: Id0357ab97aec9b123eb53c3538dd77244f56815a
2022-02-17 08:11:42 +01:00
Translation updater bot cd76478258 Localisation updates from https://translatewiki.net.
Change-Id: I9f035377ac5381823268e417afdfbb5f90311966
2022-02-16 08:12:59 +01:00
Translation updater bot df6939dae4 Localisation updates from https://translatewiki.net.
Change-Id: If89090083e591e2ac87ad5a2abad38a13ef9e63f
2022-02-15 08:17:14 +01:00
Translation updater bot b607b7e71e Localisation updates from https://translatewiki.net.
Change-Id: I5eb35eca1f023c2601e698e486bd73848fd707ec
2022-02-14 08:14:11 +01:00
Umherirrender 4eb8fa23e4 Call IDatabase::timestamp before inserting rows
This is needed for proper cross-RDBMS support

Bug: T244898
Change-Id: I46206e0b3a687dff3168a81cf0020e669133e876
2022-02-11 23:22:17 +00:00
Umherirrender 6af1473ca6 Replace deprecated wfReadOnly()
Bug: T283978
Change-Id: I5c796a0473599c71848b6079874bc7a969ee6f88
2022-02-11 23:39:06 +01:00
Umherirrender ffeee975a4 Replace deprecated User::newFromIdentity with UserFactory
Moved the factory deeper into the code right before the one usage it
still needed a full user object

Narrow done method arguments from User to UserIdentity
and use the identity directly

Change-Id: Ic118f23ef504c7fda892480df61ea68c10915f78
2022-02-11 20:35:49 +00:00