Commit graph

230 commits

Author SHA1 Message Date
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
jdlrobson 01b0f912f3 Hygiene: More LESS cleanup in ext.echo.overlays.less
Change-Id: I2d2daad00a11a156dc0ac693ea99322c9470cc6f
2014-08-05 11:37:43 -07:00
jdlrobson 430628ccc1 Hygiene: Port all Echo css to less.
No changes.
Makes styling code more readable.

Change-Id: Ie45f2cd3671bee5b88ba92ca2946d6e77cd59508
2014-08-04 11:43:27 -07:00
Legoktm a09d4cbaf5 Revert "New hooks for external integration to notification intiialization"
No usecase has been provided, and additionally the hooks
are not documented. Bartosz also points out that
mw.hook calls are asynchronous and memorized.

This reverts commit 9d3561afaf.

Change-Id: If735b46996fab3def835a54223412ef6d3105395
2014-07-26 01:05:35 +00:00
Erik Bernhardson 9d3561afaf New hooks for external integration to notification intiialization
Adds two new hooks to allow extensions to tie into the notification
loading process.  Between these two hooks and the new isInitialized()
method any extension can run code whenever a notification is displayed.

Change-Id: If351835be5f65ca098e2d235ea8c8e4dc40ae2b4
2014-07-21 16:08:56 -07:00
Thiemo Mättig e205992d0b Remove unused code and fix missing/broken documentation
General code cleanup as reported by the PHPStorm static code
analysis. I hope it's not a problem that I made a lot of very
different (but all very tiny) changes in a single patch. If you
want to merge this but you think it's better to split it into
several patches first, please tell me.

Change-Id: I2e2c4bb47f8d20e038d28e236e2ff813b30504af
2014-06-04 04:54:00 +00:00
Thiemo Mättig 0656e7594a Avoid line break in the "All notifications" footer link
Tested with latest Firefox and Chrome as well as Opera 12.

See bug 57327 for full description, please.

Bug: 57327
Change-Id: Ibf6e7d590754402f4cfafa3a3db55bb0c6aa525e
2014-06-04 04:53:25 +00:00
Juliusz Gonera c9cff5c600 Always show the overlay when badge clicked
The badge is always close to the top of the window (if it's visible), so
this is not necessary. Also, this behavior is definitely not desired
for the upcoming fixed header beta feature (the badge will always be
visible as a part of the fixed header).

Change-Id: I66e8a50b1139f7bcd005cfb3c3576578efe6a653
2014-05-15 23:45:03 +00:00
tinajohnson.1234 19dacca2e2 Added keyboard shortcut (ESC key) to close notifications flyout
Notifications flyout is closed when ESC key is pressed.

Bug: 53588
Change-Id: I220affcc383c943ca9d977bc4014d45904ce06c2
2014-04-06 11:40:10 +05:30
aude 5dfc53c990 Remove usage of wikiGetlink deprecated function
Change-Id: I59ecfdcdf834d265b9a911c37fd9a35fd2588ec7
2014-02-24 12:56:04 +01:00
bsitu 7637e1283d Automatically mark invalid notifications as read upon request
Change-Id: I8f72daf1b49bcb42037c1415f806bab3472d8e39
2014-02-05 16:53:04 -08:00
jenkins-bot a065dea8af Merge "Catch exceptions formatting notifications" 2014-02-05 23:26:28 +00:00
Erik Bernhardson 425a4a09fa Catch exceptions formatting notifications
Provide users a better user experience by catching and logging
errors with Echo notifications.

Bug: 60906
Change-Id: Iee93a05c6eed468af8bbfa60249df0819c49c45b
2014-02-05 13:55:27 -08:00