Commit graph

2240 commits

Author SHA1 Message Date
Moriel Schottlender a37e764d3d Align popup footer buttons to take 50% width each
The alignment of the buttons was done haphazadly before, using
padding. This should be done better; we should calculate the buttons
width to be 50% of the width of the popup.

Since the popup accepts a width config, we know what its value is,
and can calculate the proper width. The width was added to the
variables.less file for continued use.

* Added popupWidth config variable to the badge widget
* Added OO.ui.ButtonGroupWidget to place the buttons in for
  consistency and styling
* Added calculated width styles to both footer buttons
* Added corrections for MonoBook

Change-Id: Iad2c947da06241e9303cf1f35574177a0f602bbb
2015-09-09 13:37:24 -07:00
jenkins-bot d220eacd60 Merge "Only show 'mark all as read' AFTER there are notifications" 2015-09-09 20:13:55 +00:00
jenkins-bot 084080eae0 Merge "Reduce distance between notification badges" 2015-09-09 20:11:01 +00:00
jenkins-bot 569efc4dd3 Merge "Add mediawiki.jqueryMsg dependency" 2015-09-09 20:08:15 +00:00
Translation updater bot f9bb189fa1 Localisation updates from https://translatewiki.net.
Change-Id: I8bd85ee2d5f6fe4fdcfb90585150278ba191d081
2015-09-09 22:01:34 +02:00
Moriel Schottlender a3e5dd4c30 Add mediawiki.jqueryMsg dependency
Change-Id: If6348e501076afb2bd55af854284b9d865d10625
2015-09-09 12:15:22 -07:00
Moriel Schottlender 71999b28c4 Only show 'mark all as read' AFTER there are notifications
Hide the 'mark all read' button while we fetch notifications.
We can't mark all as read before there are any actual unread
notifications in the popup anyways.

Change-Id: I38ace6a3f8b7898bdcd82ce650947f0c7ef319e2
2015-09-09 11:50:54 -07:00
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
Translation updater bot d40e11cd3f Localisation updates from https://translatewiki.net.
Change-Id: I2117142599a5c3a27718cced30424cdc5512d41e
2015-09-08 21:47:17 +02:00
Southparkfan bd67fc0356 chmod 644 for php files
Bug: T111740
Change-Id: I244b2e08e413602da305b4995189f5755ec6eee2
2015-09-08 18:11:25 +02: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
Translation updater bot 7a3a1ae1a0 Localisation updates from https://translatewiki.net.
Change-Id: Ie819175e5f4124c3113b80eba2087c8a990ddacd
2015-09-07 22:35:43 +02: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
Translation updater bot 48d3957146 Localisation updates from https://translatewiki.net.
Change-Id: I827430b55a9a37aca904c0bc178f6f0df46b3086
2015-09-06 21:39:18 +02:00
Translation updater bot bd29846557 Localisation updates from https://translatewiki.net.
Change-Id: Ie353736ca0bf154718cf4e4b7ed97f210418f0a9
2015-09-05 21:06:25 +02:00
jenkins-bot 43604b5922 Merge "Move edit-user-talk to messages" 2015-09-05 00:04:52 +00:00
Moriel Schottlender 311c3aad8f Restore echo.alert styles
Change-Id: I079d59b9d9dfea5b53dc2fb73d0a054ba3d7e270
2015-09-04 16:36:01 -07:00
Matthew Flaschen f9c5808912 Move edit-user-talk to messages
Also:

* Clear the newtalk flag when they mark all their edit-user-talk
  read.

* Remove the section caching system.  It was designed to avoid
  performance problems with Flow messages, but now that standard talk pages
  are in 'messages', messages should be relatively common (alerts
  were already not cached by this).

* Minor cleanups to reflect that messages are not only Flow (and
  a typo fix in the Gruntfile).

Bug: T108760
Change-Id: I82d7b1d08331693830d6a1749612b55e96b95cf9
2015-09-04 18:36:40 -04:00
Translation updater bot d747263f2d Localisation updates from https://translatewiki.net.
Change-Id: I14b40436e30331bcc6e4a3b1874a8e2bc3dc5dbe
2015-09-04 21:49:08 +02:00
Moriel Schottlender c5434d59fe Use the correct cache key when storing 'hasMessages'
The key used was empty, and therefore did not work. Use the correct
key when caching 'hasMessages' for the user to see their message
badge when receiving the first message.

Change-Id: Ib5b07854f96efed974d53267d9ed573c6ca1cf04
2015-09-03 17:30:01 -07:00
jenkins-bot df2d99674e Merge "Create an 'initiallyUnseen' class for initially unseen notifications" 2015-09-03 22:40:14 +00:00
jenkins-bot 00bc515d33 Merge "build: Bump grunt-contrib-jshint from 0.11.2 to 0.11.3 to fix upstream issue" 2015-09-03 22:37:18 +00: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
James D. Forrester 59efdc5184 build: Bump grunt-contrib-jshint from 0.11.2 to 0.11.3 to fix upstream issue
Change-Id: I5e9a3e0665bb894af3a005be46053fbdae4a4baa
2015-09-03 14:20:47 -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
jenkins-bot 59a8f9096b Merge "Require a Language object in DiscussionParser::getTextSnippet()" 2015-09-03 18:56:27 +00:00
Translation updater bot e755980d24 Localisation updates from https://translatewiki.net.
Change-Id: I94fdc6620a79e51a129a4487c74485dd5193fd41
2015-09-03 20:37:40 +02:00
Moriel Schottlender f6a12f1051 Correct 'primaryLink' to 'primaryUrl' everywhere
Change-Id: Id42940460f7825541f9bc6e65ff864035591f47e
2015-09-02 16:59:55 -07:00
jenkins-bot e6e507a9ee Merge "Use db-replicated objectcache for storing last seen time" 2015-09-02 22:50:43 +00:00
jenkins-bot da6544e275 Merge "Split alerts and messages in Echo" 2015-09-02 22:50:40 +00: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
jenkins-bot 422a682395 Merge "Expose the revid of the event revision in the API" 2015-09-02 20:23:29 +00:00
Translation updater bot 56155861f6 Localisation updates from https://translatewiki.net.
Change-Id: I6f93947f163ea2751e9803878c9bf21c6ba4dd18
2015-09-02 21:35:46 +02:00