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
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
This was originally decided in T115845 and then the decision
was reversed in T329300.
Bug: T329300
Change-Id: Ife3ab7501af00420965282adc0a6ee31990a68b1
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
Ensure there is always a 2px outline, and have that
outline cover the outer border where possible.
Change-Id: I3667d01e112f40663bc370ecd5bd6c3bb71ed219
Some versions of OOUI also accepted single non-array items. But this
was never official. Let's follow the spec.
Change-Id: Ie14431be802a6c71127c1b418e750ce5c9beb863
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
These have been moved to the Vector skin
Bug: T257143
Depends-On: If52986fe56b65479adabe8233b0fc6df164b5376
Change-Id: Ibf11821e863d3089d60cf5c0959c4c5ddc5ce4f2
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
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
* 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
* 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
Added a new media query to fix an error in the Special:Notification preferences button.
Bug: T280839
Change-Id: I1a4cdc9111c6ada3c79f6ec1f1fa2e40dc240238
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
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
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
== 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
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