Replacing colors with ones from the overhauled WCAG 2.0 level AA
compliant color palette https://phabricator.wikimedia.org/M82
Applying Less variables where possible for better flexibility
in future design maintenance.
Also introducing some variables from WikimediaUI Base.
Bug: T147365
Depends-on: I16bdfbdada252ee27d5a0de11e0930347315b699
Change-Id: Ic05ed15b44d86752c686d80efc4f2ed2a1e71b41
Echo icons updated to the new color palette
https://phabricator.wikimedia.org/M82
Also setting color value hex codes to lowercase for uniformity
across products.
Bug: T147365
Change-Id: I16bdfbdada252ee27d5a0de11e0930347315b699
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
Introducing stylelint with configuration rules compliant to
Wikimedia CSS Coding Standards 'stylelint-config-wikimedia', nullifying
some for now and making majority pass.
Change-Id: I2c4acee41c9b56d9b00e2a2c5b7ab0ab5de454ce
Unfortunately there's no generic support for using colors for icons in
OOUI yet, so we have to copy what OutlineOptionWidget does and
override setPressed()/setSelected() to add/clear the progressive flag.
Also reintroducing colors for text which are aligned with icons on
the different states and use transitions.
Change-Id: I07cf4011d28c1db4eefb451367e29c271b5efaeb
After Id1312fee5bb of OOjs UI got merged, we have to reintroduce
`highlighted` and `selected` states background color manually as
it caused issues on simple OptionWidgets.
Change-Id: I3fe7a4d2577bd1bc0fd258bc977b3539e268a84e
Replacing standard `box-sizing` with MediaWiki's Less mixin, which also
features prefixed properties for older browsers like Firefox 28 and below.
Change-Id: Iafb88b192045fb7df6bbe6954a166a198d04c5cf
Due to pixel rounding errors when relying on `em` as base size unit,
the circle isn't always perfectly round and as a result /not/ a circle.
Adding `min-width` and `min-height` ensures the intended layout similar
to Ie61e7303e446 in OOjs UI's ToggleSwitchWidget.
Also aligning `:hover` unread color to OOjs UI progressive button's
`:hover`.
Bug: T141504
Change-Id: Idf130947e8e61a68819e3ac9ba3cb1e105e65370
Whether we estimate or not, the actual stored count should always be
normalized within the range of 0-cap. Estimation should always skip if
the current count is at the cap; in that case, the count can only be
changed when we get the value from the API through setCount() (used
when the value is known, rather than estimated.)
Change-Id: Ie8b81a4433e8254ee0e90f59e5b25d727158eecf
- 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