Commit graph

896 commits

Author SHA1 Message Date
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
Roan Kattouw d834f023f3 Align the cross-wiki icon with the other notification icons
Bug: T147221
Change-Id: Ic88e7c4755f2efa6cc43b1acc16e3b7a1ae8572e
2016-10-11 10:39:58 -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
Moriel Schottlender f449c68780 Add confirmation popup widget
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
2016-08-31 14:47:59 -07:00
jenkins-bot 4c82613936 Merge "Fix sidebar counts Special:Notifications in monobook" 2016-08-31 02:41:05 +00:00
jenkins-bot 8c03fbb0e4 Merge "Adjust Special:Notifications width for small screens" 2016-08-31 02:41:03 +00:00
jenkins-bot ac62a9361c Merge "Fix line-height for notification item text" 2016-08-31 02:41:02 +00:00
Moriel Schottlender a4aa79fa50 Add the best CSS rule to notifications: word-break: break-word;
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
2016-08-30 17:23:32 -07:00
Moriel Schottlender 311150a92d Adjust Special:Notifications width for small screens
Bug: T141949
Change-Id: Id0987ea9e7929777c887ceea6757ec00b3bf18ae
2016-08-30 15:29:22 -07:00
Moriel Schottlender 6e0076410c Fix sidebar counts Special:Notifications in monobook
Bug: T143845
Change-Id: Idf5922876f55aca6ed5d6800d0ff5066306c5fb1
2016-08-30 15:23:32 -07:00
Moriel Schottlender 07dde93247 Fix line-height for notification item text
Bug: T140523
Change-Id: I6a1a174ed70324da50970ecfb35ebba21ea703dd
2016-08-30 15:12:07 -07:00
jenkins-bot 76ea1746f9 Merge "Display a message when API fail due to session end" 2016-08-29 23:46:59 +00:00
Roan Kattouw 191a3309eb Fix font size for notifications dotdotdot menu in Monobook
Change-Id: Ie75ad192204a652885a82b0021340410b69864f4
2016-08-29 15:22:44 -07:00
Roan Kattouw 68a344d59a Override white background on hover for links in Monobook
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
2016-08-29 14:41:54 -07:00
Moriel Schottlender 4eab01b3b4 Display a message when API fail due to session end
Bug: T144231
Change-Id: I3ced44de097ba5b17d9edb91d4e3c527a5f18f03
2016-08-29 12:56:56 -07:00
Matthew Flaschen 299b66f937 Dynamic actions: Reuse label/description for those fields
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
2016-08-25 22:00:25 -04:00
jenkins-bot 4e99a5095f Merge "Add dynamic secondary actions to notification items" 2016-08-23 17:43:08 +00:00
Moriel Schottlender 480ce92bd8 Add dynamic secondary actions to notification items
Allow extensions to add dynamic actions that perform some
API request and display a confirmation message.

Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
2016-08-22 16:04:48 -07:00
jenkins-bot d51d1ebc23 Merge "Make Monobook use the same badge color scheme as Vector" 2016-08-19 21:58:30 +00:00
jenkins-bot 3fe453cd78 Merge "Make dotdotdot menu not be extremely wide" 2016-08-19 21:58:29 +00:00
Roan Kattouw b9b1363ca6 Make dotdotdot menu not be extremely wide
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
2016-08-19 14:48:29 -07:00
Roan Kattouw 383f424576 Move the badges down a bit in Monobook
So that they don't touch the top of the screen.

Change-Id: I0ebfce76522540c879cc1440ea333143ce1855d9
2016-08-19 14:33:48 -07:00
jenkins-bot 50ce51fdf0 Merge "Tweak badge styles" 2016-08-19 21:14:49 +00:00
Moriel Schottlender 0b28b4c67a Mobile action menu should stick to bottom of screen
Just like we do in the mobile popup, the menu should be accessible
in mobile clicks/taps by being "stuck" at the bottom of the screen.

Bug: T142013
Change-Id: I730216e717c2a02ad98bbcc28f66b13c1cbe29ed
2016-08-18 13:12:22 -07:00
jenkins-bot 8f7edc6901 Merge "Revert "Dim the title of current wiki if it has 0 notifications"" 2016-08-17 23:01:15 +00:00
Catrope 0e52416fcb Revert "Dim the title of current wiki if it has 0 notifications"
We decided we didn't want this behavior after all.

This reverts commit eadaac1c84.

Bug: T139646
Change-Id: Ib71f8000a59e66968c0fa161e3ab59b9ebdb3b1a
2016-08-17 22:51:28 +00:00
Roan Kattouw f9ac794133 Make Monobook use the same badge color scheme as Vector
In the unseen notifications case, Monobook used badges with
black text on a light red/blue, even though the text
is white on grey in the non-unseen case. Change the unseen style
to white on dark red/blue like Vector, and also make the colors
exactly the same as Vector.

Change-Id: I9d2d1a2614ac1130e027fb952c9288588d25d495
2016-08-16 17:38:46 -07:00
Roan Kattouw 3cbddb546b Make excerpts in bundles not italic, but still grey
Bug: T141034
Change-Id: I34c376a97e222257ae660149e0fb8172128eb8c0
2016-08-16 11:48:01 -07:00
Moriel Schottlender 879ff56756 Log the mark entire cross-wiki bundle as read action
Bug: T127955
Change-Id: Iddff3592915c1f7d71622c1137abc725985fb3c2
2016-08-15 17:18:27 -07:00
Moriel Schottlender 951f146b54 Emit sortChange only for read/unread actions
Do not emit sortChange for toggleSeen, because every sortChange
creates a fake widget with a flipped 'read' state. There is no
reason to emit the sortChange event in toggleSeen anyways so it
is safer when only emitted in togglRead.

Also, make sure the controller always updates the correct seenTime
from the API when fetching local notifications. This was done for
the special page method but was overlooked for the fetching of local
notifications. For the most part, it shouldn't be affecting too much
because the SeenTimeModel is initialized with wgEchoSeenTime (which
is local) but updating the controller with the API response is the
safe thing to do, and will also cover cases where a tab was open,
notifications were seen in a different tab, and now the popup was
reopened in a "stale" tab again.

Bug: T143067
Change-Id: Ie261e32db28926d04fe14f7badd9d287ddc52749
2016-08-15 16:53:09 -07:00
Roan Kattouw a4caed52cd Make footer notice link blue in Monobook
We have to override a CSS rule that tries to make all <a>s blue,
but not override it so powerfully that the real link in the footer
notice isn't blue.

Change-Id: I5a91419aab7cf6d6fe10c8e707168b52c2451cd8
2016-08-15 11:13:01 -07:00
Roan Kattouw 7b71d734e1 Tweak badge styles
Bug: T141923
Bug: T142454
Change-Id: Id82681369ffcb41b18ea408fc8bdc7fdd7d65ec6
2016-08-15 11:12:24 -07:00
WMDE-Fisch 272cb9a960 Bundle mention success and failure notifications
Adds common bundling including messages and icons.
Bundling relates to revision now.
Changed order how notifications are generated. Now errors will
show first, since they are generated last.

Bug: T140224
Change-Id: I1069aeb5523db8710da4e8e21065bf447d031e3c
2016-08-13 08:08:12 +00:00
jenkins-bot 6886c18c03 Merge "Revert "Hack around browser bug in IE breaking badge alignment in Monobook"" 2016-08-11 23:27:25 +00:00
Catrope 092c4c64fb Revert "Hack around browser bug in IE breaking badge alignment in Monobook"
Seems to be fixed by different changes, and now this change
is causing trouble, moving the badges up off-screen.

This reverts commit 0b7f8712a9.

Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
2016-08-11 23:15:15 +00:00
jenkins-bot ccab1d8351 Merge "Log 'mark all read' button click actions" 2016-08-11 20:58:31 +00:00
jenkins-bot 7ee4ffd1f4 Merge "Reduce the amount of space between the badges a bit" 2016-08-08 20:52:45 +00:00
jenkins-bot 515d38fb85 Merge "Follow-up de795bdbc5: actually hide badge number in Monobook" 2016-08-08 18:39:36 +00:00
jenkins-bot 96f11311b7 Merge "Don't truncate bundled item content in mobile view" 2016-08-06 04:58:18 +00:00
jenkins-bot 65d4368860 Merge "Round timestamps to the day when displaying date titles in Special:Notifications" 2016-08-06 04:49:21 +00:00
Roan Kattouw 68479f7442 Reduce the amount of space between the badges a bit
What this really does is:
* Change the forced width of the <a> to the width of the icon
  (rather than 1.25x the width of the icon)
* Change the alignment of the :before from 40% to 50% so it
  stays in the middle (1.25*40=50)

Change-Id: I0399a20fc84e59fcbcf69da509a4d8bfa9b54a08
2016-08-05 18:01:48 -07:00
Roan Kattouw a27d748f6a Follow-up de795bdbc5: actually hide badge number in Monobook
The color: transparent; hack was being overridden by a color rule
that's only in effect after the popup is opened.

Change-Id: I2f415619603ccadb625ed2482c25fde78765fee4
2016-08-06 01:00:33 +00:00
Moriel Schottlender adab7f087b Fix top position of badges in monobook
Change-Id: Ie2638445d020baf1be79ac1689b446ac1abc2f63
2016-08-05 16:00:49 -07:00
jenkins-bot 181c0b9557 Merge "Enable local bundles on mobile" 2016-08-05 22:00:35 +00:00
jenkins-bot c9f48a80bb Merge "mw.echo.badge: Use 'color: transparent' rather than 'font-size: 0' to hide text" 2016-08-05 21:58:02 +00:00
jenkins-bot af3d0a4b0f Merge "mw.echo.badge: Use 'background-image' rather than 'content'" 2016-08-05 21:58:00 +00:00
jenkins-bot e86a21e1eb Merge "Hack around browser bug in IE breaking badge alignment in Monobook" 2016-08-05 21:53:03 +00:00
Bartosz Dziewoński de795bdbc5 mw.echo.badge: Use 'color: transparent' rather than 'font-size: 0' to hide text
It's a lot easier to set 'color' back to the desired value than 'font-size'.

As an amusing side-effect, the hidden text will appear when selected, and
it will be possible to copy it.

Change-Id: I7a7ef8e60f514743c9cb65bcef3ba4e869f5b7b7
2016-08-05 21:41:41 +00:00
Bartosz Dziewoński 3656c74fd1 mw.echo.badge: Use 'background-image' rather than 'content'
I think everything works the same. Some older browsers (IE 10-11,
Opera 12) have funny issues with SVGs in 'content'.

.mw-echo-notifications-badge now has 'height: 24px', as it must be
at least as high as the background to display it. We no longer need
.oo-ui-popupWidget to have 'margin-top: 7px', that was a workaround
for the badge having smaller dimensions in CSS than in reality.

This also allows us to significantly reduce the amount of Monobook-
specific CSS, because we now use the background-image approach for
all skins.

Bug: T142042
Bug: T142248
Change-Id: Iaa22202dbd5b5eb7a9b1ef47d068e80764ed982f
2016-08-05 14:34:08 -07:00
Moriel Schottlender b02a6e8b26 Log 'mark all read' button click actions
The actions logged:

* Popup: Mark all notifications in the popup as read
  - Event ID is omitted
  - Context 'flyout'
* Special page: Mark all notifications in current wiki
  as read
  - Event ID is omitted
  - Context 'archive'

Bug: T127955
Change-Id: Id7c091f9e0cf0dd3745d33e335ab44706581d7f3
2016-08-05 13:33:47 -07:00
jenkins-bot 23dcba0419 Merge "Don't use a smaller font size for the badge numbers in Monobook" 2016-08-04 23:17:56 +00:00
jenkins-bot ddc4738687 Merge "Remove allTalkRead listener for the messages popup" 2016-08-04 23:14:01 +00:00
Roan Kattouw 300c64ae1f Don't use a smaller font size for the badge numbers in Monobook
Bug: T142149
Change-Id: I1456581625f405512f448c2793c194c5ba199302
2016-08-04 16:04:25 -07:00
Moriel Schottlender df83d1d6dd Skip redundant bundle-id expansion when marking entire xwiki bundle read
When we mark an entire bundle as read, we don't care if it was opened
before or not - we call the API for the list of sources and their items
and build a list of IDs to mark as read in the remote source.

Then, we make sure that bundleIDs are expanded, added to that list.

Previously, we then sent those IDs to 'markCrossWikiItemsRead'
which marked the item IDs in the remote wikis as read.
markCrossWikiItemsRead is also expanding item bundle
IDs (correctly, because we also use it when we mark individual
xwiki items, and they should be expanded)

However, in cases where we mark individual xwiki items, the
model list is already filled, so markCrossWikiItemsRead trusts
the models to deliver the sub items (and then expand on their
IDs properly)

In the case of marking an entire xwiki bundle as read without
opening it first, however, that operation is not only redundant,
it produces a problem where the models were not yet filled
(because the xwiki bundle wasn't opened) and so we get empty
array of IDs, and the API has nothing to mark as read.

The solution is simple in this case - skip this method for working
with an entire bundle. It's both a redundant operation and the
wrong model to check. Send the information directly to the API
instead.

Bug: T142143
Change-Id: I4ed3bbc5c83290ed5791060b124840b1c3b12a75
2016-08-04 22:46:42 +00:00
Roan Kattouw 16d239c516 Remove allTalkRead listener for the messages popup
This fixes a bug where changing the read status of any notification
in the messages popup would remove the "You have new messages"
banner even though there are still unread talk page notifications
in the alerts popup.

Change-Id: Ic6b3d2c9fa764be2da8f9bd9b0d10311857f8509
2016-08-04 13:58:47 -07:00
Moriel Schottlender 9468ff0e1d Don't truncate bundled item content in mobile view
Bug: T140523
Change-Id: I8223d5596825bdd80c3c961576b46c7f2d4654cd
2016-08-04 13:03:35 -07:00