Commit graph

437 commits

Author SHA1 Message Date
Roan Kattouw 10c4ff5f50 Reorganize NotificationBadgeWidget.less
Make the footer rules block a sibling of the header and body blocks.

Change-Id: I00f14d8a8a34987da059f7e915ffaa98b8136bf4
2016-01-18 14:32:36 -08:00
Roan Kattouw b80af26409 Set opacity:0.8; on the buttons in the footer of the notification popup too
Bug: T119378
Change-Id: I061d06dc13886618434b7022fc84f59feeaa426e
2016-01-18 14:28:19 -08:00
jenkins-bot a5e2466db4 Merge "Avoid pure black icons in Notification Panel" 2016-01-18 22:08:16 +00:00
jenkins-bot 4c910f87bc Merge "Mark bundles as read except when it is automatic" 2016-01-18 22:06:12 +00:00
Moriel Schottlender 902aec4a38 Mark bundles as read except when it is automatic
Make sure bundles can be marked as read by marking their sub-items
as read in the UI and also in the API.

However, for automatic 'mark as read' action (like the one that happens
when the model is "markReadWhenSeen") make sure to not mark-as-read
the bundles automatically.

Bug: T121930
Change-Id: I9d6bf6904fa3ca6559370e58853d29069f55af9e
2016-01-18 12:07:20 -08:00
James D. Forrester 607c8b76b4 Crush all SVGs with svgo
Change-Id: I5dddfcb7cb9587b277de4253d4708da28f885821
2016-01-15 17:05:17 -08:00
Roan Kattouw 3c543215aa Use globe icon for cross-wiki bundle
Bug: T123757
Change-Id: Ib97c0abb43aacba19e6b8d8a329c836e332927a2
2016-01-15 16:43:14 -08:00
jenkins-bot 51246dc130 Merge "Use 'next' as the default icon for secondary actions" 2016-01-15 20:47:10 +00:00
Roan Kattouw c345bef598 Add icon to "View changes" secondary links
Bug: T121736
Change-Id: I7dda877c26c99392c17702265380f4ea2a6e8049
2016-01-14 22:53:51 -08:00
Roan Kattouw 90c7055439 Use 'next' as the default icon for secondary actions
This ensures we always render an icon, even if there isn't one defined.

Bug: T121957
Change-Id: Iefd3c8778ed8aecb7f8caebeaed98121186602e2
2016-01-14 18:00:01 -08:00
jenkins-bot 7bbd9dc9f5 Merge "Replace review icon" 2016-01-15 01:42:45 +00:00
Justin Du 5205d1ab4d Replace review icon
Bug: T121735
Change-Id: Ia2fc92e168bfafcccd05172de2fbdde3bed0bca6
2016-01-14 17:37:11 -08:00
jenkins-bot 9291cef3a6 Merge "Replace Talk icon with new chat icon" 2016-01-15 01:36:18 +00:00
Justin Du 16297ea72f Replace Talk icon with new chat icon
Bug: T121735
Change-Id: I9ecd019ce494cdbcade258e2f590540a1ca97586
2016-01-14 17:21:45 -08:00
jenkins-bot 33fe9a0038 Merge "Cross-wiki notifications integration" 2016-01-15 01:15:42 +00:00
haritha28 ddc3280c9d Avoid pure black icons in Notification Panel
The pure black icons which drew too much
attention when they are next to a lighter
text is changed by controlling the opacity
of the icons.

Bug: T119378
Change-Id: I2e6c8d47187621607a915e49cfe5380c744efe56
2016-01-14 18:53:28 +05:30
Justin Du 7d2a15d3bc Clarify some notification icons
* edit-user-talk
* mention
* user-rights
* emailuser

Bug: T121735
Change-Id: I72e382b9ff9d19c6acc0df507fdff65732b66450
2016-01-13 14:00:37 -08:00
Roan Kattouw 63eef35026 Cross-wiki notifications integration
Bug: T121829
Change-Id: Ifb52ad5605a56d27e5951479326689242a49430e
2016-01-13 09:47:57 -08:00
jenkins-bot b0fdb27436 Merge "Follow-up 88d6f01c33: postpone greying out notification bodies for now" 2016-01-12 22:46:17 +00:00
Roan Kattouw 1b1fb5b9c7 Follow-up 88d6f01c33: postpone greying out notification bodies for now
We want to wait until we have done T121950.

Change-Id: I46d37e2c4c9fb719e236ae6af4e2b15dbac7b1ba
2016-01-12 14:38:15 -08:00
Stephane Bisson 60ddc76880 Update page-linked notification text
Bug: T121812
Change-Id: Ie875f105230c8364291a918b869b9c26dbdf1e83
2016-01-12 10:11:31 -08:00
jenkins-bot 99222dc95d Merge "Resized notification panel footer to be the same size as header" 2016-01-12 01:21:44 +00:00
jenkins-bot db9b8fe037 Merge "Log cross-wiki & bundle items impressions and add their source wiki" 2016-01-12 01:19:20 +00:00
Moriel Schottlender d123364035 Log cross-wiki & bundle items impressions and add their source wiki
Bug: T120158
Change-Id: Ibcd1923aaff4e1fd6fb1f54eefbc010122caa398
2016-01-11 17:12:38 -08:00
jenkins-bot 4300f3e32b Merge "Follow-up d62649e62c: crush and clean up SVGs" 2016-01-11 22:27:39 +00:00
jenkins-bot edb74b9c63 Merge "Log the expand action of a notification group item" 2016-01-11 22:04:12 +00:00
jenkins-bot ec5107ece9 Merge "Expand group item on click" 2016-01-11 22:00:57 +00:00
jenkins-bot 4233f09bf2 Merge "Only update seenTime in the local API" 2016-01-11 21:57:14 +00:00
mhutti1 033cba15c6 Resized notification panel footer to be the same size as header
Changed footer buttons height to match the headers height.

Bug: T119375
Change-Id: If215f109b74f2a645615fd89b7cbde6b2e6566d3
2015-12-28 13:24:34 +01:00
jenkins-bot 97f64ee855 Merge "Display readable API error message" 2015-12-23 20:18:34 +00:00
Moriel Schottlender 0d8bd17dd9 Log the expand action of a notification group item
Bug: T121945
Change-Id: I171d3e99a5529172177c9ddb9f17429609180321
2015-12-23 11:36:29 -08:00
Moriel Schottlender c387ac2a63 Add space between notification item buttons
Bug: T121955
Change-Id: Ica5123193ee6fc5252e27cdf3214072c6b9c3624
2015-12-23 09:32:22 -08:00
Moriel Schottlender 4b7520af90 Display readable API error message
If an error has occurred while fetching from the API, the
placeholder item should display the API error information.

If the error is specifically a login issue, a specific
error message is displayed.

Also, adjusted the mw.echo.ui.PlaceholderItemWidget to
accept a clickable link; when valid (currently only with
login error) the link is applied so the user can click
the notification and be taken to the login page.
For general notices (like API error or a general 'no
notifications found' message) the link does nothing.

Bug: T121923
Change-Id: I89a43c7c0eb2cf8e63d03704536e0938ab57dd4d
2015-12-22 10:34:01 -08:00
Matthias Mullie 089d922ac7 Use UTC timestamps in flyout
We already output unix timestamp both in user preference timezone as well as
utc, but we only had the user timezone version for TS_MW format.
While we could change the frontend to use the unix timestamp format, I don't see
any reason not to also include the MW format in utc. Frontend can now easily use
that.

Also fixed creation of the moment object. The timestamp was created as UTC, but
the way it got there was wrong: it expects the timezone offset (Z) to be
included in the timestamp, which is not the case (so it just ended up at +0:00,
which was fine, but confusing). I removed the 'Z' and forced it to be
interpreted as utc.

Bug: T121813
Change-Id: I09403615a1ffbde5dd69af9914afdbdd86cbfe4d
2015-12-22 17:07:31 +01:00
jenkins-bot fe9db1b78c Merge "Make notification body text lighter" 2015-12-22 14:50:33 +00:00
Moriel Schottlender a7aae23806 Remove read item from counter after it was actually marked as read
We removed the item first from the 'unread' counter and then told
the API to mark it as read. The API, however, wisely first checks
if there is anything *to* mark as read, but by that point, the
unread count is zero, so it gracefully refuses and returns an
empty resolved promise.

That is clearly not the way to go. Remove the read item from its
smart unread counter only **after** it was sent to the API to be
marked as read.

Note: We shouldn't wait for the API promise to resolve to remove
the item from the counter, but the API should run its preliminary
tests before the item is removed.

Bug: T122087
Change-Id: Ia5fc35c7435db8c4742238897da67681cee23c41
2015-12-21 15:13:29 -08:00
Moriel Schottlender 3828f29160 Only update seenTime in the local API
Do not send an update to 'seenTime' to remote wikis; only update
the items that are in the local API.

Bug: T121928
Change-Id: I291ecdb53364327dbdcb769c0d93512eeed3ab29
2015-12-21 10:49:11 -08:00
Moriel Schottlender 57a746f45f Expand group item on click
Have the group item expand itself not only when clicking the literal
'expand' button, but also when we click the entire item itself, as
if to open the notification item.

Renamed the expanding method so it is not specific for the button
event alone; also renamed the 'toggleExpand' to 'toggleExpanded',
as it toggles the inner 'expanded' state withot the API request
expansion process.

Bug: T121929
Change-Id: Iac23e06d1c17be4e1c5f63663fb0f81261f50070
2015-12-21 08:49:46 -08:00
Roan Kattouw 88d6f01c33 Make notification body text lighter
Use #888 instead of #666 to match secondary link text
(which is #000 with 50% opacity), both in the flyout and
on the special page.

Bonus: use LESS variables for these colors.

Change-Id: Ifc1182a001e9b25f6ff7c213b6fcde3dc2f0acd2
2015-12-18 13:13:22 -08:00
Roan Kattouw 6c6d283c19 Follow-up d62649e62c: crush and clean up SVGs
Change-Id: I98b158f3ef0ea611e8d0211f7599b798c3e09a4c
2015-12-17 14:16:10 -08:00
Justin Du d62649e62c Clarify link and revert icons on notifications
Bug: T121624
Change-Id: I0bd1121226b655f82d6a4d46e8c5547ef4726cc2
2015-12-17 20:04:33 +00:00
Justin Du 889dcc6584 Use the double speech bubble icon in the Messages panel
Bug: T119377
Change-Id: Icc7d751ef307fab9f8914728aac229fa28f1a860
2015-12-16 18:02:48 -06:00
Moriel Schottlender a4659baec5 Add OOUI widgets for cross-wiki bundled notifications
* Add the ability to use bundled expandable
  notification groups
* Display bundled cross-wiki notifications following
  the design

Bug: T115419
Bug: T115423
Bug: T115422
Change-Id: I8c3eba6d627c3f06d51d74fc9774e3fc2d02915d
2015-12-14 17:22:34 -08:00
Kunal Mehta 479d7a2dd9 Add support for cross-wiki notifications to Schema:EchoInteraction
Adds support in the logger code that is unused for now.

Note that I9bf6f4bcd41d8da5 must be deployed before this can be used on
Wikimedia sites.

Bug: T120158
Change-Id: I1968f36e21139975d25231ac25c22a73dea6fd0d
2015-12-10 10:07:20 -08:00
Kunal Mehta 2892108b65 Special:Notifications formatter
I'm not really sure where to stick the primary link. I could wrap the
entire notification in a <a> tag, but all the text becomes ugly (I
suppose we could hack around it with CSS?). For now I just added it
before all the secondary links.

Change-Id: I4f6add9ecfb367660d1a6346825382ad415bdb77
2015-11-25 10:22:04 -08:00
Moriel Schottlender 7d419bd128 Add a global overlay to Echo
This is preparing for nested popups inside the master popup.

Change-Id: I3bb86acd1bf841d5b27018565f5aa8f4a3295d9d
2015-11-23 18:47:57 +00:00
jenkins-bot 7a68a05083 Merge "Prevent link color on hover for the body ("payload") as well as the header" 2015-11-20 23:39:37 +00:00
jenkins-bot acdcdb29f0 Merge "Remove styling for nonexistent mw-echo-title-heading class" 2015-11-20 23:38:58 +00:00
Moriel Schottlender 4bbaf77c2a Change the naming of 'notification option' to 'notification item' widgets
This is in preparation of adding more item models and widget types,
and in preparation of switching the notification widget away from being
a select widget.

Change-Id: I518fb3d80f4f67d677c21ca5593638269acfa544
2015-11-19 16:52:04 -08:00
Moriel Schottlender 24a8bc23ef Add a NetworkHandler as a central API authority to Echo
This is in preparation for dealing with cross-wiki notifications
where we may need several types of operations to extract bundled
notifications from local and external APIs.

Also, renamed files:
* mw.echo.dm.AbstractAPIHandler -> mw.echo.dm.APIHandler
* mw.echo.dm.APIHandler -> mw.echo.dm.LocalAPIHandler
* All API-related handler files moved to their own folder
  for better organization.

Change-Id: Ib730c780ea52c93a6026c5d0b22012b6f39bb50d
2015-11-19 15:25:03 -08:00