Commit graph

849 commits

Author SHA1 Message Date
Kavitha Muthu 22389cf69b Add shadow to the notifications top toolbar
Bug: T140964
Change-Id: I5d795bc9c6601d874dfd58010399832b2727b811
2016-11-03 17:08:55 -07:00
Roan Kattouw c5d3fe3159 Clean up and simplify icon SVGs
Using svgo and some manual fixes

Change-Id: Ifb2ca82da7e95e2f0deccbec0e01eeefaae43236
2016-11-02 00:52:34 +00:00
jenkins-bot aead4d1ae9 Merge "Follow overhauled color palette" 2016-11-01 22:49:16 +00:00
Volker E 33655c75e7 Follow overhauled color palette
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
2016-11-01 22:31:28 +00:00
Pau Giner 1e24c5798a Updating icon colors to latest palette
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
2016-11-01 22:00:24 +00:00
jenkins-bot 84ad297d8e Merge "(re)Add JavaScript hooks to Notifications" 2016-10-14 22:36:37 +00:00
Moriel Schottlender e9264022a7 (re)Add JavaScript hooks to Notifications
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
2016-10-14 17:25:25 -05:00
Kavitha Muthu cc2189f009 Remove notifications bottom controls
Bug: T140964
Change-Id: I5c1a07161ab75de0537c002785da89ebeadc508a
2016-10-13 14:16:46 -07:00
jenkins-bot 7441dcc3d2 Merge "ToggleReadCircleButtonWidget: Make circle perfectly round and align color" 2016-10-07 21:06:34 +00:00
Volker E 675d454bad build: Extend stylelint to further rules
Extending stylelint to include further general rules
and remove obsolete .csslintrc file.

Change-Id: I6957cc3731c39f495e985c9dbd40363102e2e6f0
2016-10-05 14:52:29 -07:00
Volker E 6d2e560c1e Introduce stylelint
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
2016-10-04 18:15:02 -07:00
Roan Kattouw 4e5d2a8aa6 Use colors for pressed/selected options in the Special:Notifications sidebar
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
2016-10-04 17:21:26 -07:00
jenkins-bot f107dbd371 Merge "Reintroduce highlighted and selected background colors in the Special:Notifications sidebar" 2016-10-04 22:45:11 +00:00
jenkins-bot 717b53dbe4 Merge "Make notifications top toolbar controls sticky" 2016-10-04 22:37:27 +00:00
Volker E c4ea2c4af8 Reintroduce highlighted and selected background colors in the Special:Notifications sidebar
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
2016-10-04 22:34:22 +00:00
Kavitha Muthu eed48aa7fe Make notifications top toolbar controls sticky
Bug: T140964
Change-Id: I483c91344918f602da3280b9f8ad7e966bf55596
2016-10-04 22:27:49 +00:00
Touhid Arastu 50384e2f30 i18n: Native digits on CrossWikiNotificationItemWidget
Change-Id: I982319c81405917461297e96e47030953d5070d4
2016-10-04 13:49:57 +03:30
Volker E 819545ed7e Add box-sizing mixin
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
2016-10-03 13:21:54 -07:00
Volker E a1ae72a03c ToggleReadCircleButtonWidget: Make circle perfectly round and align color
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
2016-10-03 19:19:38 +00:00
Moriel Schottlender 7b4bb11c2a Add proper QUnit tests
Change-Id: I7a4abf068a32d9cf65eb464eb036f72f319c54ff
2016-09-29 15:28:30 -07:00
Moriel Schottlender 2875e3e5dd UnreadNotificationCounter should always normalize the count
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
2016-09-23 16:22:56 -07:00
jenkins-bot f40f1aa36c Merge "Convert 'seenTime' to a global property" 2016-09-20 23:22:26 +00:00
jenkins-bot 21cd011dda Merge "Make sure bundledNotifications is an array" 2016-09-20 00:13:56 +00:00
Moriel Schottlender f47c554e1c Make sure bundledNotifications is an array
- 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
2016-09-19 23:08:14 +00:00
Moriel Schottlender 1575e2bb7a Convert 'seenTime' to a global property
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
2016-09-19 14:37:31 -07:00
Moriel Schottlender 58c53af1d1 Remove primary link from the bundle of page linked notification
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
2016-09-19 14:16:43 -07:00
Catrope bba984c002 Revert "Make seen/unseen badge more consistent across wikis"
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
2016-09-13 14:21:32 -07:00
jenkins-bot 4063a26c0e Merge "Allow for count cap display in Special:Notifications sidebar" 2016-09-13 17:26:36 +00:00
jenkins-bot 1159a14b1f Merge "Generalize getCappedNotificationCount and move to counter" 2016-09-13 16:07:18 +00:00
Moriel Schottlender fcc2e1ddfc Allow for count cap display in Special:Notifications sidebar
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
2016-09-12 16:35:38 -07:00
Moriel Schottlender dbd2f4ccf7 Generalize getCappedNotificationCount and move to counter
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
2016-09-12 15:32:52 -07:00
Moriel Schottlender 5e8377b2f6 Make sure to use mw.language.convertNumber on displayed counts
In the special page, the counts should always display with
mw.language.convertNumber.

Change-Id: I9acafff9a35f2d3a1eb83ad003e57491905cb233
2016-09-12 22:02:13 +00:00
jenkins-bot c01b053025 Merge "Remove js-truncation of descriptions in Special:Notifications desktop" 2016-09-10 02:49:02 +00:00
Moriel Schottlender 42832ad04a Use echo-badge-count message for cross-wiki counts in Special:Notifications
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
2016-09-09 13:11:34 -07:00
Moriel Schottlender a834420533 Remove js-truncation of descriptions in Special:Notifications desktop
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
2016-09-09 12:44:03 -07:00
Moriel Schottlender 00e0b9f45d Make seen/unseen badge more consistent across wikis
- 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
2016-09-08 12:40:15 -07:00
jenkins-bot 39720f926b Merge "Break more rules in break-word so long words can wrap in notifications" 2016-09-08 00:06:47 +00:00
Moriel Schottlender ed453c1026 Hide separator when bundled item is expanded
Bug: T142260
Change-Id: I5ea12d426c29a4b82bdfa5453d14841800b7a108
2016-09-07 16:44:03 -07:00
Moriel Schottlender 22d83568f7 Break more rules in break-word so long words can wrap in notifications
Change-Id: Ib0cde96438175f2bc136bd89d4a2717785cecba0
2016-09-07 16:32:37 -07:00
Moriel Schottlender 93f4f2a460 Add method to get local unread notifications in the manager
Bug: T141404
Change-Id: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
2016-09-06 13:07:57 -07:00
jenkins-bot 32e8a8c845 Merge "Add confirmation popup widget" 2016-09-02 23:28:09 +00:00
jenkins-bot 4ca6513039 Merge "Hide xwiki widget separator when widget is expanded" 2016-09-02 19:56:22 +00:00
Ed Sanders 44140295ce Remove apparently unused PNG files
The repo is now PNG-free.

Change-Id: Ia76505473fc99365781735a19ece4d028eaec528
2016-09-02 12:28:28 -07:00
Moriel Schottlender df38f142ef Followup I3daae156d: Don't truncate body text for small screens
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
2016-09-02 11:27:56 -07:00
jenkins-bot 05d05d2c56 Merge "Fix notification page width responsiveness issues" 2016-09-02 17:22:00 +00:00
Ed Sanders b54576564b Fix notification page width responsiveness issues
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
2016-09-01 18:02:06 -07:00
Ed Sanders 0271cdd52d Remove unused CSS and icon for old preferences button
Change-Id: I0ba1d1322c4c53fe7fefd92be85fd595198a63c9
2016-09-01 17:30:50 -07:00
Ed Sanders b0f5a46964 Convert 'generic' icon to SVG
Change-Id: I3a364720161ede8045c5a3f7cf51923966266c56
2016-09-01 17:24:30 -07:00
Moriel Schottlender 4047f2f2c1 Hide xwiki widget separator when widget is expanded
Bug: T142260
Change-Id: I24fbd6bd2eba3c7b2d16cb1e46130cfd4a981fb3
2016-09-01 14:30:49 -07:00
Moriel Schottlender 97a7d44190 Clean up Special:Notifications output
Transform the php output to OOUI widgets.

Bug: T129172
Change-Id: I65cb5f2a016fc2a3c33a0b1cd2f3f88ed963ab02
2016-09-01 13:38:06 -07:00