Commit graph

342 commits

Author SHA1 Message Date
Pau Giner b6712be9a3 Reduce distance between notification badges
Notification badges are conceptually closer together than the rest of toolbar elements.
So it makes sense to move them closer visually too.

This is just a small CSS adjustment to compensate for the default margin
that items in the menu get. If there is a cleanner way to achieve the same,
feel free to refactor.

Bug: T108190
Change-Id: I06403f67c24f045c125c505dca2101f9eed79594
2015-09-09 11:36:18 -07:00
jenkins-bot 9a2262d694 Merge "Use #pt-notifications-alert to get Special:Notifications link" 2015-09-08 21:13:53 +00:00
jenkins-bot 582017e82f Merge "Add a tooltip to the notification badges" 2015-09-08 21:11:43 +00:00
jenkins-bot 05d350b122 Merge "Show unread notifications first in the popup" 2015-09-08 21:08:26 +00:00
Kunal Mehta aae891d839 Use #pt-notifications-alert to get Special:Notifications link
Users who have never received a message will not have a messages badge.

Bug: T111783
Change-Id: I5e2b9834f4bc2f30948d1799215e29b16cb64c3e
2015-09-08 14:08:14 -07:00
Moriel Schottlender 73e3ed3717 Add a tooltip to the notification badges
Since the nojs "base" version uses the automatic title creation
of the personal tools, the message keys were adjusted accordingly,
and the old unified message was removed.

Bug: T108190
Change-Id: I1f242f530aa68562aa4dc885156586c22c4df618
2015-09-08 14:03:34 -07:00
Moriel Schottlender 7310a6b387 Show unread notifications first in the popup
Change-Id: Ib4947cee84a28a2850a86032528fa75bf472c5fa
2015-09-08 13:57:00 -07:00
Moriel Schottlender 2ec0ccad78 The return of the 'mark all as read' button
For some reason during the readjustment to the model/view the
mark all as read button was not toggled when it should have been.

It is now.

Change-Id: I05c32e9cb02e94b4e3dc3e2bcd9cead0eb802015
2015-09-08 13:46:57 -07:00
jenkins-bot 6e142da08e Merge "Align notification badge higher on the personal navigation bar" 2015-09-08 03:40:51 +00:00
Moriel Schottlender f4fd809e56 Only send api request if the popup is opening
Listen to 'toggle' instead of onAction so we can only send api
requests for notifications if the popup is in the process of opening
and not when the button is clicked to close the popup.

Bug: T111667
Change-Id: I39aea942ff5a87a13043cccdb696ef8952ca61db
2015-09-07 17:11:31 -07:00
Moriel Schottlender 327466a2d3 Align notification badge higher on the personal navigation bar
Bug: T108190
Change-Id: Id25213689c2ec9a6031bd120020c0b5ebde6e14f
2015-09-07 16:32:57 -07:00
jenkins-bot 1502371c2a Merge "Fix the badge icon update" 2015-09-07 19:11:31 +00:00
Moriel Schottlender 36191fc290 Fix the badge icon update
Make sure that when the seen state changes, the badge icon adjusts
in case there are two different icons for seen and unseen states.
Also organize a bit the unseen/unread status in initialization.
And separate and update the icons in the popup head to always fit
the status and icon of the badge.

Bug: T111432
Change-Id: I891a36c6eace9302b370a3efaf5aa6f57192c17f
2015-09-07 12:05:14 -07:00
jenkins-bot 04edd414cf Merge "Specify firstHeading rule for .mw-special-Notifications only" 2015-09-07 05:22:01 +00:00
Moriel Schottlender dbefd3b6f0 Specify firstHeading rule for .mw-special-Notifications only
The rule to make the firstHeading limited in height should only
apply to the design of the Special:Notifications page, and not
everywhere on MW.

Bug: T111628
Change-Id: I6636ed7f4ad0ccc7bbf83ace51dda62d09e09a5c
2015-09-06 22:05:34 -07:00
Moriel Schottlender 311c3aad8f Restore echo.alert styles
Change-Id: I079d59b9d9dfea5b53dc2fb73d0a054ba3d7e270
2015-09-04 16:36:01 -07:00
Moriel Schottlender fc2711ebc4 Create an 'initiallyUnseen' class for initially unseen notifications
This is so that the animation definition remains on the notification even
after it is marked as seen.

Change-Id: Ifd19cd5cd003a4e29d0c42788d51aca985e0b859
2015-09-03 15:37:02 -07:00
Moriel Schottlender ea1f23e04d Don't wait for the API to update seen status of notifications
First update the notifications as seen, then send the api request
for updating the seen time. Update the actual seen time from the
api response so the time is always in sync with server time.

Change-Id: I97717cfda7b665dcbc3add90712069700f44adf6
2015-09-03 15:06:14 -07:00
jenkins-bot 20a380cd9c Merge "Add a border between the popup head and notification list" 2015-09-03 21:34:51 +00:00
Moriel Schottlender 820eaa2726 Add a border between the popup head and notification list
Bug: T111432
Change-Id: Ic10edbafa96ab76416165237228f0f259bd9f5f7
2015-09-03 14:28:56 -07:00
jenkins-bot 61516ebe53 Merge "Separate 'seen time' for alerts and messages" 2015-09-03 21:17:06 +00:00
Moriel Schottlender e650df6644 Separate 'seen time' for alerts and messages
Bug: T111285
Change-Id: I277f94ae705d3323ac8612111d7fd704b36793cb
2015-09-03 13:14:15 -07:00
Moriel Schottlender f6a12f1051 Correct 'primaryLink' to 'primaryUrl' everywhere
Change-Id: Id42940460f7825541f9bc6e65ff864035591f47e
2015-09-02 16:59:55 -07:00
Kunal Mehta 35c4a37918 Use db-replicated objectcache for storing last seen time
So we're not abusing user preferences for the last seen time.
EchoSeenTime is a small wrapper around ObjectCache that handles the
fallback to user preferences during the transition.

All JavaScript code now needs to use mw.config.get('wgEchoSeenTime').

Bug: T95839
Change-Id: Ia45ba5e30eb4564250539d04d5886d2598ebd49a
2015-09-02 22:42:35 +00:00
Moriel Schottlender 1ac72cc01a Split alerts and messages in Echo
Split the notifications into 'alert' and 'message' badget with two
different flyouts. Also clean up styling and module behavior.

** Depends on ooui change Id4bbe14ba0bf6c for footers in popups.
** Depends on ooui change Ie93e4d6ed5637c for fixing a bug in
   inverted icons.

** MobileFrontend must also be updated to support the new modules
   in this patch  I168f485d6e54cb4067

In this change:
* Split notifcations into alert and messages and display those in
  two different badges.
* Create two separate flyout/popups for each category with their
  notifications.
* Create a view-model to control notification state and emit events
  for both the popup and the badge to intercept and react to.
* Clean up module load and distribution:
  * Create an ext.echo.ui module for javascript-ui support and ooui
    widgets.
  * Create an ext.echo.nojs module that unifies all base classes that
    are needed for both nojs and js support, that the js version
    builds upon.
  * Create a separate ext.echo.logger module as a singleton that can
    be called to perform all logging.
* Clean up style uses
  * Move the special page LESS file into nojs module so all styles
    load properly even in nojs mode.
  * Transfer some of the styling from JS to LESS for consistency.
  * Make the 'read more' button load already with the styles it
    needs to look like a button, since its behavior is similar in
    nojs and js vesions, but before its classes were applied only
    by the js, making it inconsistent and also making its appearance
    'jump' from a link to a button.
* Delete and clean up all old and unused files.
* Moved 'Help.png' icon from modules/overlay to modules/icons for
  later use.

Bug: T108190
Change-Id: I55f440ed9f64c46817f620328a6bb522d44c9ca9
2015-09-02 15:36:37 -07:00
Kunal Mehta 686a8ab5a4 Measure how long it takes for the flyout to open
Bug: T56486
Change-Id: I12bfbfb186e8ab2bfe22052402ad4c71b2e6bd81
2015-08-11 16:57:29 -07:00
Kunal Mehta bce9dbab18 Link to localized Special:Notifications in overlay footer
Re-use the localized link from the badge.

Bug: T59350
Change-Id: I4b859a07b253894ac776519971cc130548350321
2015-07-06 17:57:59 -07:00
Legoktm 2257dd2a56 Revert "Pass uselang=user to the API instead of figuring it out client side"
This breaks pages using ?uselang=xx where "xx" is not
the user's language.

This reverts commit 0919b01e75.

Bug: T103935
Change-Id: I219810451b991cef88bac62cf880bfda6f98e930
2015-06-25 17:16:13 -07:00
Kunal Mehta 78dc653c80 Remove dead dismiss code
mw.echo.setUpDismissability was removed in 08fc83b6de, and will
never be called since the class is never set.

Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
2015-06-07 18:30:49 -07:00
Kunal Mehta 70d95fbad0 Use mw.Api.postWithToken to automatically re-try badtoken errors
Bug: T101664
Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
2015-06-07 18:11:48 -07:00
Kunal Mehta 7a196ce358 Remove pre-MW 1.22 compatability code
Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
2015-06-07 17:34:26 -07:00
Kunal Mehta 0919b01e75 Pass uselang=user to the API instead of figuring it out client side
Change-Id: I09add693567af577c14c646d2b6b943716e0522e
2015-06-07 17:30:00 -07:00
Matthias Mullie d150625ce1 Until seentime is recorded, we should treat notifications as unseen
Since we didn't use to save seen time, it is unreliable at first.
I decided to just show them as read then, since we couldn't know
if they had or hadn't been read.
However, it would make more sense to keep them unread until we first
save the time a notifiation is seen: it is in line with the current
behavior (where the badge just stays red, always)

Also fixed a problem where I meant to .get a value but had .set
instead. It wasn't noticable because that function is currently
only called when things have just been seen, so even though it
was wrong, it produced a good result.

Bug: T94634
Change-Id: I7ee447249527feb3914c76cfffd673bbda062b75
2015-05-06 10:53:45 +02:00
Roan Kattouw 518101e495 Actually pass jscs
Removed exemptions from .jscsrc and fixed the code to make jscs still
pass.

Kept the dangling underscores exemption because leading underscores
are (for now) used as a naming convention for private functions in
this repo.

Change-Id: I18964f8469f52c294276527d92cb6bf9f48c2576
2015-05-04 19:28:01 +00:00
Matthias Mullie da07893647 Display red badge based on time of notifications vs last time panel was opened
I tried to stick as close to the existing code as possible.

Special:Notifications is slightly different from the overlay,
however. I made it add .mw-echo-unread class for consistency,
but that JS doesn't record seen time (it only loads older
entries), not does the CSS fadeout apply there (it marks
everything as read as soon as it's displayed, so different
behavior from overlay)

PS: I'm not sure about browser compat for the fadeout. But
even if some obscure browsers don't support this, meh. It's
not an "important" feature that can't be missed.

Bug: T94634
Change-Id: Ibb201823fb52ef8a3d5eaa39b0b724ede8d271d1
2015-05-01 11:39:45 -07:00
Matthew Flaschen 0dbf078f8d Make sure eventId is int for client-side events.
Bug: T95169
Change-Id: Ic15b963a3656f8886532d1b990befe327159d56e
2015-04-15 00:18:38 -04:00
Tina Johnson 0e810f0510 Make links in Echo's notification footer blue on hover
Links on the notification footer, "View edit" / "View changes", needs
to be blue instead of grey to be consistent with the Mediawiki interface.
The link turns blue upon hovering, just the way it is currently set
for other links on notifications like the page title.

Bug: T57367
Change-Id: Ibaaff52b9d4bdfc5beca442e10734dd5cf8886d7
2015-03-14 00:41:11 +05:30
Matthew Flaschen b930dfaf47 Use mw-ui-anchor class
This is now required to actually pick up the MW UI progressive
color, so there's a slight visual change (wrong blue => right blue).

Fixes T72818

Bug: T72818
Change-Id: I719eb20a3940904ab45f8376280e20432a3b2d80
2015-03-02 20:16:31 -05:00
jenkins-bot bf0378e57a Merge "Fixed CPB flyout notification count" 2015-02-18 04:33:41 +00:00
Divya 562168b261 Fixed CPB flyout notification count
Added ext.echo.updateNotificationCount to notify other extensions
about updates to the notification count.

Bug: T67178
Change-Id: I7f4e34f2c1808b249db010018dd1b49a8dde246a
2015-02-18 04:31:34 +00:00
bearND e359b304db Make current Echo overlay tab dark gray and bold
mw-ui-quiet gets dark gray and bold.
This way it is easier to see which is the current tab.

Bug: T71929
Change-Id: Ie7e21cd71a385d216402d393344cf76d3ed45d23
2015-02-02 15:22:59 -07:00
Amir E. Aharoni 91847e96c6 Fix the overlay chevron position for RTL
Bug: T78330
Change-Id: Ie438042bc24b8ace429eec68c8b75c09da56aa95
2015-01-09 17:50:51 +00:00
Amir E. Aharoni 94cb6103c2 Cleanup whitespace in modules/overlay/ext.echo.overlay.less
According to
https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#LESS

Change-Id: I361909fcea67fa5e0e3cbb69711ede91417c4e2e
2015-01-09 19:50:08 +02:00
Timo Tijhof 4fdae24555 overlay: Remove needless specifity in .mw-echo-grey-link selector
Binding it to the element name should rarely be needed as it only
adds complexity with no clear benefit.

Nesting classes should also rarely be necessary as it basically
requires the code will never be embedded in or itself embed something
from another component (otherwise you'd clash with that other component's
class name, and if you don't clash, then it wasn't neccecary to
nest the class in the first place).

If the class is overlay-specfic it should be renamed to something
like '.mw-echo-overlay-grey-link'. Keeping it as-is and applying
directly though, as it doesn't appear overlay-specific.

Change-Id: Ied601058c8e501914113d542f88542c83157d5a0
2015-01-06 22:04:12 +00:00
Roan Kattouw e3c4ddc1ae Don't make the notifications list 5px taller than the screen
The max-height of the notifications list was hardcoded to
the height of the window minus 134 pixels. I don't know
where this value came from, but it doesn't seem to take
borders into account. The correct value appears to be
139 in Chrome and 140 in Firefox, so I changed it to 140.

Also, this really really should not be a hardcoded value.
This 140 value can be measured in JavaScript; that's how I
derived it. Even better, oojs-ui has a mixin called
OO.ui.ClippableElement that automatically does this for you
AND automatically adjusts the height when the window is resized
as well.

Change-Id: I17bc2c5333e5c3d5dd720e6bccf8cbbdbb4abe6c
2014-09-23 15:00:21 -07:00
grunny 3093c7a69f Remove use of deprecated "hover" pseudo-event
The "hover" pseudo-event was deprecated in jQuery 1.8 and removed in
1.9. This is logged as "JQMIGRATE: 'hover' pseudo-event is deprecated,
use 'mouseenter mouseleave'". This fix switches to using the .hover()
method which appears to be the original intent as two functions have
been used which .hover() supports, whereas .on() only accepts one
handler. Now the class change works as expected.

Change-Id: Ib28801293b72f8f344455b5f308876d185abc8bd
2014-09-19 03:02:43 +10:00
Erik Bernhardson 8ee843fab5 Hygiene: Dont quote object property keys
Change-Id: I93d669a26f85b4eb5c5e0e06e314b89894f12385
2014-09-12 16:00:07 -07:00
jdlrobson 4ff74ddd50 Hygiene: Alter how initialisation of the overlay works
Restructure code so MobileFrontend can make use of it
Kill ext.echo.desktop

Change-Id: I984373ba54206d447c54a435dbf60e8f6e814be1
2014-09-12 22:49:51 +00:00
Shahyar c0446f683f Set text colors in overlay to mwui light gray, and increase title font size
Change-Id: I24f796df1abee02557db2f4817ad70c227dd8d8f
2014-09-11 19:13:44 -04:00
jenkins-bot 9e925cf021 Merge "Switch the order of Alerts and Messages tabs" 2014-09-10 22:00:17 +00:00
jenkins-bot 34290fb80a Merge "Localize numbers of alerts and messages" 2014-09-10 16:08:45 +00:00
Matthias Mullie adfb235de0 Switch the order of Alerts and Messages tabs
Change-Id: I864d45336c23331543ff6aaea8ec6512d4fba0c3
2014-09-10 15:31:09 +00:00
jenkins-bot 4156e030c8 Merge "Remove (X) next to Alerts/Messages if there is one section" 2014-09-09 23:28:35 +00:00
jdlrobson 2cacf82efa Restore QUnit tests to reflect alert as default tab
This reverts the tests and amends them after the
application of commit 5da9eac08a.

Luckily nothing appears to be broken.

Change-Id: I67acfe5dc74ef750d5443dd619dbb114623ee233
2014-09-09 13:23:37 -07:00
bsitu 75d5c9b9a3 Remove (X) next to Alerts/Messages if there is one section
Change-Id: Ibf66328e31bfefb3d588196c3f4babfa65bb52f3
Eg: Alerts(X) becomes Alerts
2014-09-09 11:12:38 -07:00
Matthias Mullie b090b749de Messages/Alerts text is tiny in Monobook
Just like all other text elements in the overlay: set the font-size to 13px
Not sure why this was em & rest px. 13px is equivalent to the current 0.8em in
Vector.

Change-Id: I29d67f21cc2af7209469299ab228ebe7dac98af7
2014-09-09 18:01:36 +02:00
bsitu 9c55aa0fc8 Colors are backwards for flyout section link
Also make active section link not clickable

Change-Id: I7f391929382489e8bad5ab56fea9f2ef7b2978b0
2014-09-09 16:31:23 +02:00
jenkins-bot 4aa508b6a8 Merge "Default to alerts tab" 2014-09-08 21:42:29 +00:00
Erik Bernhardson 5da9eac08a Default to alerts tab
The only exception is when there are new message notifications but no new
alert notifications.

Bug: 70461
Change-Id: I06daa3f7d526beeb878eb343c169e01acd49e71f
2014-09-08 13:18:51 -07:00
Amir E. Aharoni ce6b730e74 Localize numbers of alerts and messages
Change-Id: Ifc502afaed3fc04e7addb5383e3ed0c3c4efe439
2014-09-08 16:14:19 +03:00
bsitu d9f697414f mw.echo.overlay.updateCount() no longer exists
If you have an unread notifications not in the initial
load of special page, clicking load more would throw
an error

Bug: 69714
Change-Id: I9af588780b2ab8481ba252ddc21bad0601de7a0b
2014-09-05 21:37:12 +00:00
Erik Bernhardson f5985169cc Allow .mw-echo-title-heading outside special page
This class was only being applied to notification output
on special pages and not in the overlay, move it so it can.

Additionally:
* bolds .mw-echo-title-heading same as the anchors it works with
* clean up a repeated rule against `.mw-echo-title a`

Change-Id: I579252399b39746f5aa2cfc51b5cd3b9b8b2cdb0
2014-09-04 18:59:30 -07:00
jenkins-bot abb7655297 Merge "Add support to retrieve unread + read notifcations for section" 2014-08-20 17:37:51 +00:00
bsitu 8e2de3f02b Add support to retrieve unread + read notifcations for section
Change-Id: Ife3750400315f545f5f3e54ac9847f56c2efe9be
2014-08-19 16:54:48 -07:00
jenkins-bot 715ad180a2 Merge "Hygiene: Mega clean up the Echo footer code" 2014-08-19 20:25:04 +00:00
jenkins-bot 8d5421c9cb Merge "Fix line height/size of notifications" 2014-08-19 18:55:10 +00:00
jdlrobson 75cda20a31 Hygiene: Remove unused directory
Let's not use old unused things lying around... it just confuses
people.

Change-Id: I30cecb58fbdce0129e0385be3680ca4a2c6c36f8
2014-08-18 21:11:19 +00:00
jenkins-bot a3449bfb67 Merge "Hygiene: Stop using id for footer" 2014-08-18 17:27:00 +00:00
jdlrobson 088ba0a152 Hygiene: Mega clean up the Echo footer code
Lots of duplicate unused css. This simplifies it drastically.

Change-Id: Idfcca27840410f0287e30478e7978255234127d0
2014-08-18 17:26:40 +00:00
jdlrobson dc45eb246f Fix line height/size of notifications
Previously too cramped and not in relative font.

Change-Id: Idfc2d24a4896883630aee7c105cf67c8a8005a57
2014-08-15 14:02:17 -07:00
jdlrobson 965a8b8a2f Hygiene: Stop using id for footer
No need. Class works perfectly fine here.

Change-Id: I8188e759ad3eed971d5847b23d49b333d80b509f
2014-08-15 17:43:56 +00:00
S Page af2abe84a5 "put a comment nearby with the resulting keys"
Per https://www.mediawiki.org/wiki/I18n#Using_messages
Comment-only change.

Change-Id: I468a79bee19fc5486b564b1a0ec7eb66c9dfa852
2014-08-14 19:01:45 -07:00
jdlrobson 178ec1b816 Fix size of 'mark all as read' button
Change-Id: I2b760e70e60f001824b66e3652dafefaf7f6a32f
2014-08-14 15:10:32 -07:00
jdlrobson 1c6f5906d0 Hygiene: Kill dead code
Not serving any purpose...

Change-Id: I151e80a79bcaba3d9037fc9f21533a4e9161f60f
2014-08-14 14:29:40 -07:00
jdlrobson 8b381e2081 Hygiene: clean up messy less file
Change-Id: I8c76e92b8a4d79cd26ac7ed54c20bdae54e0b5bd
2014-08-14 14:18:42 -07:00
jdlrobson 5ff3189146 Prevent horizontal scroll bars in Firefox
Use inline block and width to force truncation of the flow topics

Bug: 69563
Change-Id: I62fc95a58dbdf0f21e36e67e1941e4e35585e2d2
2014-08-14 13:21:49 -07:00
jenkins-bot 4b472dd9f2 Merge "E2f: mark all as read behaviour" into two_tabs 2014-08-14 18:48:42 +00:00
jdlrobson 92ee69b92d E2f: mark all as read behaviour
Also adds browser tests for the behaviour of the mark all as read button
to ensure it only clears message notifications.

Dependency:  Ifb7b1b7b7feb4a5af65c79bb16b91a5a9c70166c
Change-Id: I46e1de229e32d705e67cebde678ecea3f3633906
2014-08-13 17:08:16 -07:00
jdlrobson 81610bfb5a Create notification overlay in the body
This removes the need from the super specific selectors.
It also allows us to create multiple notification elements
on a screen.

Change-Id: Ife5291a315915779689943ffc18ac73d77351d0e
2014-08-13 13:24:05 -07:00
jdlrobson 106c2d2215 Create chevron using pseudo elements
IE8+ supports the pseudo element. The world will not explode if
IE6 and 7 do not have the chevron.

This simplifies code by dropping the use of the pokey element

Note: I know we can drop using the image too but I decided not to do
that in this patch.

Change-Id: Ia9ac434461e63bc2cf8554060126995ac65a3531
2014-08-13 13:14:41 -07:00
jdlrobson bee2fe3af1 Fix issue with tab visibility
Danny noticed a bug where if both tabs have unread notifications,
then when opening the overlay and clicking on the alerts tab, the user
would be reverted back to the messages tab.

Test stops this from happening again.

Change-Id: I6bbbbf61251957336de8856201412fa3569ab22d
2014-08-13 10:11:06 -07:00
jdlrobson 24e8a34c50 E2e: Show the correct value of unread messages in the tabs.
Change-Id: I976937cfe184f37abe78904e6f2cdc81f8190e80
2014-08-13 00:39:15 +00:00
bsitu 7f4f6c5228 Truncate text in Echo notifications
Automatically truncate text with ellipsis on single lines of title

Change-Id: I0ef9eeb9f9d3403f79ee9960b075fb7062150a1d
2014-08-12 23:53:52 +00:00
jdlrobson 17d100f735 F11: Show mark as read buttons in notification list items
Change-Id: I1c132a3645188c8da8b04432dd3c1ce1006cca80
2014-08-12 15:02:03 -07:00
jdlrobson 8c61a6a416 E2d: Add the mark as read button to messages view
Don't mark messages as read until they have been acted on.
Show a mark as read button that marks entire list as read.

Change-Id: I4450a66cffd11c67b9a4ba9aac0fe958dc760e15
2014-08-12 14:49:19 -07:00
jdlrobson bb27de169e E2c: Hover behaviour of notifications panel tabs
Note no design was defined so have taken this to mean use
mediawiki ui for consistency purposes.

* Use mw-ui-active and mw-ui-quiet for tabs
* Update tests

Change-Id: If7a51b2286cdfe6e839dacc2476c9a578bc7f1df
2014-08-12 21:06:12 +00:00
jdlrobson 7870b6cac2 E2b: Reflect the count in alerts and messages tabs
Add test coverage.

Change-Id: Ia5658d2b0c230915cda9309a590b416b0aa73bfe
2014-08-12 14:00:41 -07:00
jdlrobson 9882898f92 Notification overlay Messages and Alerts sections
Shift to new API to support 2 tab view
When a new has no messages they will see the old style overlay with
Notifications heading. I have added tests to assure this is the case!

Later patches will:
1) Add the mark as read button only in message view
2) Note currently the tabs do not refresh when notifications is clear.
We need some kind of EventEmitter to make this sort of thing easier.

Change-Id: I62b590e81cd3fe867c4c13959cb43466aacfe2d5
2014-08-12 12:33:06 -07:00
jdlrobson 66dd838ed7 Kill mark as read button
This is being redefined as part of the introduction of notification
tabs.

Change-Id: I2211bf6727f661ca7fcd6023aaddb3f2b5ac53ba
2014-08-12 18:42:57 +00:00
jdlrobson 4470d91e54 Hygiene: Break out _buildNotificationList
Make various properties of the overlay properties of
EchoOverlay to reduce need for function parameters

Change-Id: I70ec0c650d58322aad93d71292a836d7cf7e7474
2014-08-08 15:45:02 -07:00
jdlrobson ccc0e713a0 Hygiene: Introduce EchoOverlay initialisation class
Not as scary as it looks. The change to _buildOverlay simply changes
indenting, and cleans up to reflect new parameter. Tests still pass ;-)

Kill noticationLimit concept
Only expose what's necessary on mw.echo.overlay

Change-Id: I2671a41af8188c14ad4c910396afa0d9000b6051
2014-08-08 14:35:07 -07:00
jdlrobson f4eadb5e0a Ensure override is more specific
is definitely more specific then
So let's make sure the override always works.

Change-Id: I8e1623357185ad7b55ddc9d60ab98984721075ae
2014-08-08 11:30:25 -07:00
jdlrobson df66e80648 Regression: Fix styling of new unread notifications
Change-Id: Icf9f1bc21c084070a21865232cdac5d978be0731
2014-08-08 10:44:18 -07:00
jdlrobson 71a1ec3f6f Reduce specifity of Echo css
The #p-personal only is needed to override the ul padding.
Let's make this explict.

Change-Id: Idf538d2a09ffc4d325d4fb3061564d8dd11b1e60
2014-08-07 21:07:14 +00:00
jdlrobson 1896424e9a Hygiene: use self where possible
Change-Id: I30e9d6ea8b59e168fc5b151f215c3592f475bedf
2014-08-06 13:30:42 -07:00
jdlrobson 0ff4295a88 Hygiene: Move the overlay initialisation code into a separate file
Change-Id: I4dcdf9708b700c57679ff878275c5560a62e3a06
2014-08-06 20:29:35 +00:00
jdlrobson a815733447 Hygiene: Move code for header into _getTitleElement
Change-Id: Ic53933189bf51772a88689794a7633ba8ba0ac2c
2014-08-06 20:29:30 +00:00
jdlrobson f02d3f059d Hygiene: Add _getFooterElement method
Continue to shrink down the size of buildOverlay

Change-Id: I69b339947bfe4d5e73c6d293f0ae5e9e494ec6ca
2014-08-06 20:29:25 +00:00
jdlrobson 9b30d33549 Hygiene: Refactor out mark as read button code
Change-Id: Iad935174925bd1c16e51bbc36c84b48769e9780c
2014-08-06 20:29:01 +00:00
jdlrobson e064126209 Hygiene: Split buildOverlay into smaller functions
Start with a getNotificationLimit and markAllAsRead function

Change-Id: Ice53af40a152f6c3b5a92683c574ef7dc2d01047
2014-08-06 20:28:55 +00:00