Commit graph

517 commits

Author SHA1 Message Date
jenkins-bot a767408f02 Merge "Allow mark-as-unread in notifications" 2016-03-11 22:43:58 +00:00
Moriel Schottlender 8657ef5e90 Allow mark-as-unread in notifications
Add a 'mark as unread' to all unread notifications and allow them
to be marked unread. These notifications will no longer be automatically
marked as read when the pages they refer to are visited.

Bug: T73564
Change-Id: I677d3c0399e46fd7c35531df1cc0e61db2d4eb1b
2016-03-11 14:05:10 -08:00
jenkins-bot 14c67d48df Merge "Fix duplicate impression logging" 2016-03-11 22:01:48 +00:00
jenkins-bot 4de459b6b5 Merge "Fix bundled notification width" 2016-03-10 23:50:25 +00:00
Moriel Schottlender f210528a74 Fix bundled notification width
Bug: T129469
Change-Id: Iaabeab59543d3e271ef84926fb7c7d000a2abd04
2016-03-10 15:22:14 -08:00
Roan Kattouw 7f079b7d4f Fix duplicate impression logging
We have a wrapper around logInteraction() called logNotificationImpressions()
that logs impressions uniquely (i.e. logs each notification impression only once),
but in addition to calling that (from NotificationsWidget), we were also manually
calling logInteraction() to log impressions from NotificationBadgeWidget
and NotificationGroupItemWidget. This resulted in two impression events
for every notification, each with different data, one of which is logged
only once and one of which can be logged multiple times.

Remove the manual logImpression() calls and route everything through
logNotificationImpressions(), which is called from only one place:
NotificationsWidget. Add support for logging foreign wikis to
logNotificationImpressions(), as it was previously missing.

This causes us to lose the notification type information in these
events, but that can also be derived after the fact by looking
up the event_id in the echo_event table.

Whether impression logging is even useful is another question,
but it certainly isn't useful if we log duplicate impression
events with different data.

Change-Id: I19b76a4ce796b21e9347dd9392af24918db82e18
2016-03-09 10:21:09 -08:00
Ricordisamoa 4107a4a495 build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass
Change-Id: I264fafad95ddb4a4cc925815a62af83744f122e4
2016-03-07 14:29:15 +01:00
Ricordisamoa 9c83e14c59 build: Enable jscs rule 'requireVarDeclFirst' and make pass
Change-Id: Id1581858e59ea5f49804b6cf753b0c2860fb9855
2016-03-07 11:57:31 +00:00
jenkins-bot 8556b8037e Merge "Remove resolved TODO about adding wiki field to Schema:EditInteraction" 2016-03-04 23:06:07 +00:00
jenkins-bot a8909f44dd Merge "Styling adjustments for notifications" 2016-03-04 22:55:41 +00:00
jenkins-bot ff41a87105 Merge "Add a short abbreviation for timestamps in notifications" 2016-03-04 02:52:22 +00:00
jenkins-bot b06ec6b42a Merge "Mark all as read should not apply to cross-wiki bundles" 2016-03-04 01:02:16 +00:00
jenkins-bot 3fd75c41a4 Merge "Echo API layer" 2016-03-04 01:00:55 +00:00
Roan Kattouw e239d4c256 Use padding instead of margin to separate cross-wiki sections from each other
So that margin collapsing doesn't eat up the extra space we wanted to create.

Bug: T128069
Change-Id: Ib3b96c54c2ace52cf28047a5f9f012fcc56ccb9c
2016-03-03 16:19:45 -08:00
Moriel Schottlender 36866532c6 Mark all as read should not apply to cross-wiki bundles
Skip foreign bundles on 'mark all as read' operation, and mark as
read the items available in the popup.

Bug: T128621
Change-Id: I431b1ea94ab1c4942bd3de38753f113a4e2ae22f
2016-03-04 00:02:50 +00:00
Moriel Schottlender 0834b91f56 Echo API layer
Split and refactor Echo network handling and create a proper API
layer for the UI to use consistently. Split Echo's API methods into
its own module so they can be loaded along with the initialization
script and manage the API requests.

Change-Id: I0526a14bb8cc0d9729a303e24ab6e43259cc86bb
2016-03-03 23:40:12 +00:00
Moriel Schottlender 541335d90f Styling adjustments for notifications
Bug: T125969
Bug: T128444
Change-Id: I3dba4fcddf5262450cce4ba384abfdc3518b7cb8
2016-03-03 23:11:19 +00:00
Catrope f808909c67 Revert "Compress PNGs with zopflipng"
Changed icons to different ones: Generic.png became a heart.

This reverts commit 3f36dfab56.

Change-Id: I5aa4711e254590ba824c86867f705b950a48e2de
2016-03-03 19:57:02 +00:00
Moriel Schottlender 0fc63bde36 Add a short abbreviation for timestamps in notifications
Use 'm' instead of 'minutes', 's' instead of 'seconds', etc, for
shorter timestamp rendering in the notification list.

Bug: T125970
Change-Id: I9479c5406a4bf44ef560bef2c8f204a9f60cafc6
2016-03-03 11:37:05 -08:00
Moriel Schottlender ae04c0e4e6 Allow mark as read for a cross-wiki bundle
Bug: T128562
Change-Id: I14b4885569d9d78072ae76bc9cdefd41741a435b
2016-03-02 16:04:04 -08:00
Roan Kattouw e96bdb6da5 Remove resolved TODO about adding wiki field to Schema:EditInteraction
Change-Id: I80cc41b31b6d49182f7ea11e5cd07192f1710663
2016-03-01 23:32:47 -08:00
jenkins-bot e08d3e604c Merge "ActionMenuPopupWidget: Prevent ClippableElement from overwriting our width hack" 2016-03-01 03:18:34 +00:00
Roan Kattouw a7537e9465 ActionMenuPopupWidget: Prevent ClippableElement from overwriting our width hack
This whole class is a terrible hack, and we should instead implement
a proper facility for what we need in OOUI.

Bug: T128436
Change-Id: I8777a6e36d238dc13c9060b74b7a72c6933082f6
2016-02-29 18:47:43 -08:00
Roan Kattouw dc48dfa022 Follow-up 07c5850b: unbreak "mark as read" menu item
07c5850b changed the widget used for the "mark as read"
menu item from OO.ui.ButtonOptionWidget to mw.echo.ui.MenuItemWidget.
While this makes sense, it also broke its functionality, because
mw.echo.ui.MenuItemWidgets are unselectable so if you click them
the 'choose' event isn't emitted.

However, we also can't make these widgets selectable, because
that breaks the links inside these widgets (the containing MenuSelectWidget
intercepts mouse events and prevents default). So instead,
make mw.echo.ui.MenuItemWidgets only be unselectable if they are
links (have config.url set), so that both use cases work.

Bug: T128432
Change-Id: I8374e3ae61a005ec7d25c2eb95b1391cbb191d60
2016-02-29 18:34:02 -08:00
jenkins-bot 48a08b7343 Merge "build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass" 2016-02-29 22:59:50 +00:00
Stephane Bisson eb873aaa60 Include cross-wiki notifications in unread count
* Client-side only. The backend already counts those.

Bug: T124109
Change-Id: I62e49524bc8cea1ef2d77255e29ff8a919bd1ee7
2016-02-29 16:02:05 -05:00
jenkins-bot bfcf10c3fa Merge "Bidi-isolate notification bodies" 2016-02-29 20:57:18 +00:00
jenkins-bot fd0036e0c1 Merge "Adjust styling of the 'more actions' menu items" 2016-02-29 20:44:42 +00:00
Roan Kattouw 5f0a78b7ec Bidi-isolate notification bodies
Use dir=auto instead of wrapping in <bdi>.
They have the same effect, except that the latter produces
strange-looking truncation behavior with LTR body text in an RTL
interface because text-overflow: ellipsis; is set on the <div>,
not on the <bdi> node.

Bug: T127407
Change-Id: Id58a70f5b88a10c827e61d9e16aae1a81938709a
2016-02-29 12:37:21 -08:00
jenkins-bot a42869d2de Merge "Adjust group bundle styles" 2016-02-29 20:35:40 +00:00
jenkins-bot a1481a83c1 Merge "Transform the notification action bar to css table layout" 2016-02-29 20:28:34 +00:00
Moriel Schottlender b62185bf81 Adjust group bundle styles
Bug: T128069
Change-Id: If1e5d9811f4569e93ab9ba3064699ce6a6d907f7
2016-02-29 20:16:42 +00:00
Moriel Schottlender c91f6c566d Transform the notification action bar to css table layout
* Transform the action bar to table layout even in non-bundle
  notifications.
* Increase the padding on the side for consistency

Bug: T125909
Bug: T125969
Bug: T126686
Change-Id: I26ba5b7a21a1f36774749154d3f95d61254c5ce2
2016-02-29 12:07:05 -08:00
Ricordisamoa be0dff6a89 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I62bd55936f8416caa2e1b917752d91355f7d9e7d
2016-02-29 18:03:29 +01:00
jenkins-bot 322a1d9113 Merge "Revert "Compress PNGs with zopflipng"" 2016-02-28 00:36:48 +00:00
Legoktm 5caa813f4b Revert "Compress PNGs with zopflipng"
This reverts commit 6001f47231.

Change-Id: I83d673e42d27ad7957a8bec878056f6009fad8c7
2016-02-28 00:08:08 +00:00
Moriel Schottlender 07c5850b88 Adjust styling of the 'more actions' menu items
Bug: T126734
Bug: T126740
Change-Id: I48924aba5c06ebf1eeccd2a8977150b366f412a7
2016-02-26 15:21:21 -08:00
Moriel Schottlender 2ac0d2d761 Reorder x-wiki bundles to be after local notifications
Bug: T127422
Change-Id: I81ae2e13612168a598c32f130a625eadc0325c8f
2016-02-26 22:11:06 +00:00
jenkins-bot a87fa83fcd Merge "Reorganize NotificationBadgeWidget.less" 2016-02-25 18:47:48 +00:00
Moriel Schottlender 5a3928e009 Keep group open on click
The toggle-collapse process should be applied only when we click the
actual notification content/body and not the bundle items. This will
make it possible to middle-click (or right-click) a bundled item and
open it in a new window without resulting in collapsing the bundle.

Bug: T127416
Change-Id: Iaa06d5db8a1d5f9032874a800cafb6d5a4268876
2016-02-22 12:32:05 -08:00
Roan Kattouw 583f9bf999 Fix typo: @inherits->@extends
Change-Id: I860adb672b75923a32d6f63cbc397429fbccf05a
2016-02-21 23:17:45 -08:00
Ori Livneh 6001f47231 Compress PNGs with zopflipng
Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.

This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:

  git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
    parallel zopflipng -m -y {} {} \;

Files which zopflipng was not able to compress more efficiently were left unmodified.

Bug: T127608
Change-Id: I4bdef5e1b8e9ba63a3f13c7c475274e89f05ddc6
2016-02-21 01:05:45 +00:00
Ori Livneh 3f36dfab56 Compress PNGs with zopflipng
Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.

This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:

  git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
    parallel zopflipng -m -y {} {} \;

Files which zopflipng was not able to compress more efficiently were left unmodified.

Bug: T127608
Change-Id: I1f01ac23c10d57edb8471f43ba01bf3cc8de5969
2016-02-21 00:12:15 +00:00
Justin Du 3b12d96449 Adjust mark as read icon size
Bug: T124025
Change-Id: I9b6e86e3cf59c8a6fbeb06c894d5d180c9bf467f
2016-02-19 20:02:05 +00:00
Stephane Bisson 74879c39fb Truncate secondary link labels
Bug: T121822
Change-Id: I3e36a6cd4bc8da96879158e1d7b65fd3a1d582fb
2016-02-18 06:55:36 -05:00
Stephane Bisson 683100ab40 Add 'userSpeechBubble' icon
This is used as secondary link icon by
'flow-enabled-on-talkpage' notification.

Bug: T121950
Change-Id: I1bc255627c9d9082a8bcd81758276c2358a784d6
2016-02-16 09:39:38 -08:00
jenkins-bot 4a34710fbe Merge "Increase space between notification header and body" 2016-02-16 04:56:23 +00:00
Stephane Bisson 98d428df71 Increase space between notification header and body
Bug: T125968
Change-Id: Ifec5f819fa687637d7421fb062b7345621a83428
2016-02-15 15:56:59 -05:00
Stephane Bisson f969250b27 Increase contrast between header and body text in notifications
Bug: T125964
Change-Id: Id597f10a624e8b4e92bfc1c1c8c79857f23b598c
2016-02-15 15:45:43 -05:00
jenkins-bot 5019802f29 Merge "Introduce congratulatory notifications for reaching edit thresholds" 2016-02-12 22:19:04 +00:00