Commit graph

51 commits

Author SHA1 Message Date
bsitu 4bf88aa741 Hygiene: Add abstract model and mapper for notification
* Shared function can be put in the abstract class and this also enforces some interface methods 

* Initialize a default dbFactory when it's not passed to the mapper

Change-Id: I1033dafaa90a1f683fbe9ad69bed04f4844e357b
2014-08-13 00:11:15 +00:00
jdlrobson 0dc45e6c4a Regression: Fix styling on Special:Notifications
addModuleStyles ignores JavaScript in module.

Change-Id: I6c20a6ff05fbd52d30dea7d7633fb6f4b36b377b
2014-08-05 17:08:10 -07:00
bsitu 267a56398e Introduce AttributeManager class
This is a precursor to splitting notifications into
alert and message sections.

Change-Id: Ic685f7026ab9b41407b51317780bbfadd05bf9f1
2014-07-31 11:41:00 -07:00
bsitu d3d99772b9 Replace EchoBackend with mappers and gateway
* Get rid of EchoBackend by separating responsibilities into smaller objects

* Move main fetchNotification logic from API to a more appropriate place

* Add more unit testing coverage

Change-Id: I42f4d7566543332588431c21c220c0d64d026b70
2014-07-31 10:29:52 -07:00
bsitu 7637e1283d Automatically mark invalid notifications as read upon request
Change-Id: I8f72daf1b49bcb42037c1415f806bab3472d8e39
2014-02-05 16:53:04 -08: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
Kunal Mehta 833e67b797 Replace usage of SpecialPage::getTitle with getPageTitle
Was deprecated in 1.23, see Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40

Change-Id: I2c8f52b54c64e70de1aafb397ecc475affbc7cbc
2013-12-26 22:53:54 -08:00
Kunal Mehta f31c605360 Replace wfMessage calls with $this->msg
Change-Id: I600af0721c15828d0a11b36438231b09e4148728
2013-10-19 00:58:38 -07:00
Matthew Flaschen 8f1c4299c6 Set returnto when linking anon to signup or login
Change-Id: I6bbd867f91e5cb03320b412197fdabb19adb6bcd
2013-09-03 18:05:57 -04:00
kaldari e8df780d9a Remove the feedback link from the flyout - no longer needed
Change-Id: I0531fdd126c3030097b5485b1140c66fc6306ae0
2013-07-06 00:48:29 +00:00
Bsitu 490b5ef737 Revert "Render dates as headings"
This reverts commit c2bb2a8fb4.

Change-Id: I1f6f71c0e7b397c3adf1629b78d52154cfbdfc20
2013-07-02 22:08:06 +00:00
jrobson c2bb2a8fb4 Render dates as headings
Not doing this leads to unnecessary styling in mobile and is more
semantically correct

Bug: 49269

Change-Id: Icbb390b6c807118c1b775aa4f962de06b5f7c091
2013-07-01 21:20:29 +00:00
bsitu 12fa60fa23 Some more adjustment to timestamp in user timezone
* The timestamp used for loading more should always use UTC timestamp since
  that's the format saved in the database

Change-Id: I249725a6972b95dddd9074ffe08343b1a805c111
2013-06-13 11:32:06 -07:00
bsitu 6ffc1cac4b Add clickthrough eventlogging to Echo
Change-Id: I3d05d1aeca92f9a0265a522cc5027ae18394c5b4
2013-06-11 10:46:41 -07:00
Derk-Jan Hartman c638d44190 Echo: Better support for non-default skins, as well as no Javascript
This provides some rudimentary styling support to make Echo usable
with the Modern skin.
It also fixes the Notifications special page so it is styled
correctly in Modern, CologneBlue, or with Javascript turned off.
Also some more tweaks for Monobook skin.
Retiring the 'feedback' link from the special page, per PM.

Bug: 47932
Change-Id: I633a93a78f5a78d0642a3a059fa6f7208f99cec4
2013-06-07 11:36:19 -07:00
bsitu 71f250e0c6 (bug 47912) Visiting talk page should mark talk notif as read
This needs some more manual testing and adding unit testing

Change-Id: Iadfe3cf7927d5318f89ba17f067000f9399060af
2013-05-29 20:43:57 -07:00
bsitu a70208e8fe (bug 48054) Echo API should use a standard continue parameter
Change-Id: I1d5333db4a4d58a1ecfa8dfe562cda5a35093f8b
2013-05-03 18:15:46 -07:00
Matthew Flaschen d3b67e2122 Change icons to use img tags, allowing easier customization:
* Icon can be defined using a path or a URL
* Extensions don't need custom CSS, but add icon through BeforeCreateEchoEvent
* Sites set their notification icon in LocalSettings.php or equivalent

Bug: 46585
Change-Id: Ifc02b653d07de19229dfb2604305e32f3bd595fe
2013-04-29 06:05:40 +00:00
kaldari 74fdc01fe6 Adding Help link to Echo archive page
Also fixing feedback link for Safari and Chrome

Change-Id: Icc9f2c66f983e95c1564f6981e952d1d99160111
2013-04-15 16:27:27 -07:00
kaldari ac9425aa8f Mostly reverting change Ifb9a287e since it isn't rendering correctly
For Chrome and Safari

Change-Id: I954a33a1a218d2b6f3996a78d9c244ca6b57042a
2013-04-11 13:02:06 -07:00
jenkins-bot b342f475fa Merge "(bug 46678) Adding feedback link. Temporarily removing Learn more link." 2013-04-11 17:27:07 +00:00
kaldari 7effc4808f (bug 46678) Adding feedback link. Temporarily removing Learn more link.
Change-Id: Ifb9a287e2dc11067efac48bdbf700fe7997d19f0
2013-04-11 10:23:47 -07:00
kaldari 4ee07f2a2e Making 'More...' link in archive more prominent per Vibha
Change-Id: Ibbed21c5efd7ce1f6893c92a7f98ba60a63e98ab
2013-04-09 15:52:35 -07:00
bsitu 6a3624b0e4 Add web bundling function to Echo notification
* add web bundling feature
* unify event_timestamp with notification_timestamp
* remove echo_subscription
* update article_link to page_link notification with new logic
* remove duplicated function from MWDbEchoEmailBatch since it's defined in parent class

Change-Id: I2fa91c44edb020209b468fe13f894d9db3732e69
2013-04-04 10:53:46 -07:00
bsitu 5c701f80ef Add getCategory() method to event object
Since every event is tied to a category, it's better for event object to have it as a member method

Change-Id: I911415284486bb11d13d91366340c5c330317c34
2013-03-18 16:30:39 -07:00
Kaldari fcb5d99b37 Fixing dismiss functionality for new checkmatrix system and categories
Change-Id: I3b64c4853587d4d2d8f04fc97c9b3ddb15b520ed
2013-03-07 15:11:46 -08:00
Bsitu 5d99d1a258 Merge "(bug 44814) Don't double-escape the date header on Special:Notifications" 2013-02-14 18:14:19 +00:00
Krenair 24eadab910 (bug 44814) Don't double-escape the date header on Special:Notifications
Change-Id: Ib1b9c645c4a7c779fc0a1051e3baf4e8e210743e
2013-02-13 23:05:22 +00:00
Kaldari af06e26de6 Adding dismiss functionality to special page
Includes new web preferences for Echo

Also adding ability to set dismissability per notification type

Still need to arrange subscription options into a friendly format

Still need to add dismiss functionality to flyout

Change-Id: I484a24b424e69be3640e63b76f82735edae6f13a
2013-02-12 11:33:50 -08:00
Kaldari a5dbc1e000 Merge "(bug 43441) Show preferences icon on Special:Notifications without label except as title" 2013-01-02 05:49:36 +00:00
Krenair 7d13364507 (bug 43441) Show preferences icon on Special:Notifications without label except as title
Change-Id: I2bf4b5ba444157464c7c9070411b663485af8935
2013-01-01 21:48:44 -08:00
Kaldari 69e4d5f9a2 More formatting tweaks per Vibha
Change-Id: Id8c536fabe2151031eeafba697c16e0141710741
2013-01-01 01:28:11 +00:00
bsitu af8b434f11 Various fixes to the special page
1. EchoNotificationController::resetNotificationCount() does not reset count, it has misleading name (should fix the name in another patch)
2. Prevent multiple concurrent API calls resulting from multiple clicks on more link within very short amount of time

Change-Id: I4aeeadddd4fed833c2ae4308c1a0e94e6644f5e7
2012-12-14 17:52:04 -08:00
Kaldari 65255f7c6b Formatting for Special:Notifications
Change-Id: I891542bf8b6a883e7ff9f78d2b33ddd61c345aa7
2012-12-13 14:08:20 -08:00
Krenair a5c23033e9 (bug 42975) Reset notification count when visiting Special:Notifications
Change-Id: Iaf3f4f5be575c36c4459e252bc83f414eb07e381
2012-12-12 19:56:48 +00:00
bsitu ad14fdbc57 Modification to all notification page
patch set 1:
	* Consolidate notification retrieval in API and Special page
	* Add load more function to special page with records as old as 7 days ago
	* Add support for browsers with javascript disabled

patch set 2:
	* Remove trailing whitespaces

patch set 3:
	* Fix some i18n issue
	* Fix variable names and some exta whitespace
	* Load core css files on special page rendering

Change-Id: Ic69e430b5eb196e5223a2bb6b1d447ef257d559b
2012-12-10 13:51:26 -08:00
bsitu cd349b11ac (bug 41866) Fix invalid notification in the flyout and page
1. Skip invalid notification events
2. Add formatting to notifcation count, for example, if the count is over 99, we just show 99+

patch set 2:
	* fix trailing whitespace
patch set 3:
	* remove extra whitespace and indentation
patch set 4:
	* change function name from gatherValidEchoEvent() to gatherValidEchoEvents()
	* add more descriptive documentation

Change-Id: I81a135c24f64fa1aace4dd2631e9b88bbe22d3d0
2012-12-03 11:41:16 -08:00
Kaldari 1c2a76ae22 Adding comments and fixing some incorrect comments
Change-Id: Iab1be6ad8700630f2cf3f97b5d5edd542f1c85ec
2012-11-26 18:20:53 -08:00
Siebrand Mazeland 950f74eba8 Follow-up I2c10cb69: Auto-formatted using IDE.
Change-Id: Iedeaca3c31195a5cf7df8dd38d6332cfabffcc67
2012-08-31 23:50:46 +02:00
Krenair 9559105b59 Use whitespace between function parameters and the brackets.
Change-Id: I2c10cb69f1f1726b63d25579c6a35c882cc1fe7e
2012-08-30 17:04:39 +01:00
Andrew Garrett 1d47038e62 Echo: Make it possible to specify exactly which events are active with $wgEchoEnabledEvents
Change-Id: Iecf77f1e0dd80a209ef9be013fb2adf44e69a604
2012-08-01 12:11:52 -07:00
Catrope da5280b1d4 Merge "Update code/documentation" 2012-08-01 17:54:50 +00:00
Reedy 0238982af0 Update code/documentation
Add FIXME

Update some code to new standards

Change-Id: I4240f651ca85001eabaf91eed0c896741b01a76d
2012-08-01 10:54:17 -07:00
Andrew Garrett 3ede5a482a Add escaping for paranoia
Change-Id: I53fde56d67d5515deb4e296c14cc84d7a5cb1036
2012-08-01 10:53:20 -07:00
Andrew Garrett 0699d8f402 Formatting updates for Echo.
First implementation of "two line" formatting.
Messages have a title and optional content.

Distinguishing writing on "your talk page" from another talk page in messages.

Change-Id: I9051e4bfb66d1c25c1bf68ec092b52fd90544336
2012-08-01 10:37:17 -07:00
Krenair 7d6fb20bd7 Some code formatting, wfMsg and deglobalisation changes.
Change-Id: I77715b2c152cf557d2ba3e96a8969847a0957840
2012-07-26 18:51:57 +01:00
Andrew Garrett acd4ee2102 Make Echo use pretty timestamps
Change-Id: I1b061840c720ece80c1301f8ee38da9c80f7d100
2012-07-16 17:05:29 -07:00
Andrew Garrett 7b47e5d09d Echo overlay enhancements
Add a title and a link to Special:Notifications to the notifications overlay.
Also add a message to Special:Notifications and the overlay if a user has no notifications

Change-Id: I28407d3ea82039b160170f51ab987418e14be2af
2012-06-08 15:55:01 +10:00
Andrew Garrett 46b3024b4a Echo: Defer notifications using the Job Queue
In future it may be necessary to break them down an extra level.

Change-Id: I65e5a285e7d5797636e118c5e3e78b94df9af3d4
2012-06-08 15:30:09 +10:00
Andrew Garrett 5c841cafe3 Add an "overlay" to personal links showing new notifications.
Change-Id: I1a350e5d051bd0e776e5043f0ba189a576ac7ee7
TODO: Add date/time stamp to notifications as shown in overlay
2012-06-01 21:02:30 +10:00