Added the following Javascript hooks:
* ext.echo.notifications.beforeRender: Firing before a group of
notification widgets are rendered, whether in the popup, in
the special page, or in a cross-wiki bundle (which requires
async loading)
* ext.echo.badge.countChange: Fired when the badge count changes
with the notification type, count and the label count for
display purposes.
* ext.echo.popup.onInitialize: Fired when the popup is opened and
after notifications were fetched, with the context of the popup
notification type.
* ext.echo.special.onInitialize: Fired when the special page is
ready and notifications were fetched. Note that it will be fired
whenever the special page is updated with notifications list,
as well, like when changing filter, remote wiki or pagination.
The hooks were also documented in hooks.txt
Bug: T146296
Change-Id: Ie3dc97f97e8d1f90b67f62fcdc65dd29cb379aad
- Make sure that even if internal values of the array are null,
the end-result is a valid array (with sequential keys)
- Verify that the API sent the UI an actual array, and if not,
output an error to the console.
Bug: T145825
Change-Id: Ibdf17c58fe88e3e2547dde62cd4d3d06e089cbc8
This transforms seenTime concept to a global property for all wikis
and sources, and updates the global seen time on opening the popup.
Bug: T134855
Change-Id: I67bcc4b346237317c7a9204dd43cd0e9ee02792f
Also, make sure that the bundle follows the same behavior as the
xwiki bundle, where if it does not have a primary link, the 'click'
event triggers the 'expand' action.
Bug: T145902
Change-Id: I456bf76a7bd531ffcad5462708f37cd54d8af99d
Has bugs, and will likely cause deployment problems.
This'll need to be reverted in wmf.19 at least
until we fix it up.
This reverts commit 00e0b9f45d.
Change-Id: Ia9d220ebcb607f96dee6bc856755305ed8501fcc
Some of the counts are capped (wiki counts) and some are not (page
counts) - so we are adding a config option ('isCapped') to the
widget to make sure that capped numbers appear with the proper
i18n message ('99+' in English) and non-capped numbers appear
as-is.
Bug: T144707
Change-Id: I7332e7f5108621d0bd403edefe4feacca44b1f88
This follows the generalization we made in the back-end and allows
us to always use the same method to get capped notification count
in the display.
Bug: T144707
Change-Id: I4d7f406b05a195972dca0d2088bde2ff739d313d
These numbers are already "capped" for display as 99+ after they pass
100, so we should use this message for proper display.
Individual page number counts are not capped (they are accurate) so
they can remain the same.
Bug: T144707
Change-Id: Iecb877c11e2f372d58f4fc926119dbf3b316e825
In order for the special page to be responsive, the descriptions can't
be truncated in the JS. If they are, they take a bigger portion
of the screen, sometimes going out of its confines.
The popup should still truncate descriptions.
Change-Id: I533f29c00482f6cfbb7b1c9c7417715e3c5809bf
- Add a 'hasUnseen' data to the xwiki bundle so the badge can
consider its value when changing its color even without the
bundle being opened.
- Check and store seenTimes from all sources that the xwiki
has in a new JS object that the SeenTimeModel can store
Bug: T134855
Change-Id: Ifdcee88b4378cdc7acb4ae5c0cbc60b76339757e
We already took away the truncation of header text, the body should
follow for narrow screens and wrap, instead of using the ellipses
truncation.
Change-Id: I3504599044e1c94ccec55c420d455b9370dae474
Have the page hide the sidebar at 982px, when there is
not enough room for both (and when vector switches down to SD).
Make inbox responsive when resizing.
Change-Id: I3daae156d1ebb0619090d466caa5138d0d98e937
Mainly used for mobile actions, and should be appended to the
overlay - this widget assumes it should appear and then fade out
with some confirmation message.
Also moved 'doubleCheck' icon to the ooui definitions, including
an inverted icon that is necessary for this widget.
Bug: T141404
Change-Id: I67a44962eaee6b7bd8cac26dcb5277177fa5d224
Add word-break: break-word; so we make sure even long names or titles
without spaces are broken/wrapped where they need to.
Bug: T142662
Change-Id: I166e834495972ec49eb98e301ab9be85f40f5a5e
p-personal links have a white background on hover, and links
inside the notifications popup were inheriting that CSS rule.
Bug: T144063
Change-Id: I3868e418ab8cce8e5ff6f7cc10e042907cb1e8df
This is necessary to preserve backwards compatibility for the API, and
this also fixes the no-JS special page.
Also, fix additional warnings.
Change-Id: Id603b4ab22c69097d5559a756bec72a6ba785661
Allow extensions to add dynamic actions that perform some
API request and display a confirmation message.
Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
Work around new styles introduced in oojs-ui in I77cd5212c.
Bonus: remove useless styles targeting the dotdotdot popup
in NotificationItemWidget.less: it's not even a popupWidget
any more and it's located in an overlay anyway, so these
styles didn't do anything.
Change-Id: Ifb16b7bb0b01c1eb2551ba4c173042cc759e9b02