Commit graph

834 commits

Author SHA1 Message Date
jenkins-bot 717b53dbe4 Merge "Make notifications top toolbar controls sticky" 2016-10-04 22:37:27 +00:00
Kavitha Muthu eed48aa7fe Make notifications top toolbar controls sticky
Bug: T140964
Change-Id: I483c91344918f602da3280b9f8ad7e966bf55596
2016-10-04 22:27:49 +00:00
Touhid Arastu 50384e2f30 i18n: Native digits on CrossWikiNotificationItemWidget
Change-Id: I982319c81405917461297e96e47030953d5070d4
2016-10-04 13:49:57 +03:30
Volker E 819545ed7e Add box-sizing mixin
Replacing standard `box-sizing` with MediaWiki's Less mixin, which also
features prefixed properties for older browsers like Firefox 28 and below.

Change-Id: Iafb88b192045fb7df6bbe6954a166a198d04c5cf
2016-10-03 13:21:54 -07:00
Moriel Schottlender 7b4bb11c2a Add proper QUnit tests
Change-Id: I7a4abf068a32d9cf65eb464eb036f72f319c54ff
2016-09-29 15:28:30 -07:00
Moriel Schottlender 2875e3e5dd UnreadNotificationCounter should always normalize the count
Whether we estimate or not, the actual stored count should always be
normalized within the range of 0-cap. Estimation should always skip if
the current count is at the cap; in that case, the count can only be
changed when we get the value from the API through setCount() (used
when the value is known, rather than estimated.)

Change-Id: Ie8b81a4433e8254ee0e90f59e5b25d727158eecf
2016-09-23 16:22:56 -07:00
jenkins-bot f40f1aa36c Merge "Convert 'seenTime' to a global property" 2016-09-20 23:22:26 +00:00
jenkins-bot 21cd011dda Merge "Make sure bundledNotifications is an array" 2016-09-20 00:13:56 +00:00
Moriel Schottlender f47c554e1c Make sure bundledNotifications is an array
- Make sure that even if internal values of the array are null,
  the end-result is a valid array (with sequential keys)
- Verify that the API sent the UI an actual array, and if not,
  output an error to the console.

Bug: T145825
Change-Id: Ibdf17c58fe88e3e2547dde62cd4d3d06e089cbc8
2016-09-19 23:08:14 +00:00
Moriel Schottlender 1575e2bb7a Convert 'seenTime' to a global property
This transforms seenTime concept to a global property for all wikis
and sources, and updates the global seen time on opening the popup.

Bug: T134855
Change-Id: I67bcc4b346237317c7a9204dd43cd0e9ee02792f
2016-09-19 14:37:31 -07:00
Moriel Schottlender 58c53af1d1 Remove primary link from the bundle of page linked notification
Also, make sure that the bundle follows the same behavior as the
xwiki bundle, where if it does not have a primary link, the 'click'
event triggers the 'expand' action.

Bug: T145902
Change-Id: I456bf76a7bd531ffcad5462708f37cd54d8af99d
2016-09-19 14:16:43 -07:00
Catrope bba984c002 Revert "Make seen/unseen badge more consistent across wikis"
Has bugs, and will likely cause deployment problems.
This'll need to be reverted in wmf.19 at least
until we fix it up.

This reverts commit 00e0b9f45d.

Change-Id: Ia9d220ebcb607f96dee6bc856755305ed8501fcc
2016-09-13 14:21:32 -07:00
jenkins-bot 4063a26c0e Merge "Allow for count cap display in Special:Notifications sidebar" 2016-09-13 17:26:36 +00:00
jenkins-bot 1159a14b1f Merge "Generalize getCappedNotificationCount and move to counter" 2016-09-13 16:07:18 +00:00
Moriel Schottlender fcc2e1ddfc Allow for count cap display in Special:Notifications sidebar
Some of the counts are capped (wiki counts) and some are not (page
counts) - so we are adding a config option ('isCapped') to the
widget to make sure that capped numbers appear with the proper
i18n message ('99+' in English) and non-capped numbers appear
as-is.

Bug: T144707
Change-Id: I7332e7f5108621d0bd403edefe4feacca44b1f88
2016-09-12 16:35:38 -07:00
Moriel Schottlender dbd2f4ccf7 Generalize getCappedNotificationCount and move to counter
This follows the generalization we made in the back-end and allows
us to always use the same method to get capped notification count
in the display.

Bug: T144707
Change-Id: I4d7f406b05a195972dca0d2088bde2ff739d313d
2016-09-12 15:32:52 -07:00
Moriel Schottlender 5e8377b2f6 Make sure to use mw.language.convertNumber on displayed counts
In the special page, the counts should always display with
mw.language.convertNumber.

Change-Id: I9acafff9a35f2d3a1eb83ad003e57491905cb233
2016-09-12 22:02:13 +00:00
jenkins-bot c01b053025 Merge "Remove js-truncation of descriptions in Special:Notifications desktop" 2016-09-10 02:49:02 +00:00
Moriel Schottlender 42832ad04a Use echo-badge-count message for cross-wiki counts in Special:Notifications
These numbers are already "capped" for display as 99+ after they pass
100, so we should use this message for proper display.

Individual page number counts are not capped (they are accurate) so
they can remain the same.

Bug: T144707
Change-Id: Iecb877c11e2f372d58f4fc926119dbf3b316e825
2016-09-09 13:11:34 -07:00
Moriel Schottlender a834420533 Remove js-truncation of descriptions in Special:Notifications desktop
In order for the special page to be responsive, the descriptions can't
be truncated in the JS. If they are, they take a bigger portion
of the screen, sometimes going out of its confines.

The popup should still truncate descriptions.

Change-Id: I533f29c00482f6cfbb7b1c9c7417715e3c5809bf
2016-09-09 12:44:03 -07:00
Moriel Schottlender 00e0b9f45d Make seen/unseen badge more consistent across wikis
- Add a 'hasUnseen' data to the xwiki bundle so the badge can
  consider its value when changing its color even without the
  bundle being opened.
- Check and store seenTimes from all sources that the xwiki
  has in a new JS object that the SeenTimeModel can store

Bug: T134855
Change-Id: Ifdcee88b4378cdc7acb4ae5c0cbc60b76339757e
2016-09-08 12:40:15 -07:00
jenkins-bot 39720f926b Merge "Break more rules in break-word so long words can wrap in notifications" 2016-09-08 00:06:47 +00:00
Moriel Schottlender ed453c1026 Hide separator when bundled item is expanded
Bug: T142260
Change-Id: I5ea12d426c29a4b82bdfa5453d14841800b7a108
2016-09-07 16:44:03 -07:00
Moriel Schottlender 22d83568f7 Break more rules in break-word so long words can wrap in notifications
Change-Id: Ib0cde96438175f2bc136bd89d4a2717785cecba0
2016-09-07 16:32:37 -07:00
Moriel Schottlender 93f4f2a460 Add method to get local unread notifications in the manager
Bug: T141404
Change-Id: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
2016-09-06 13:07:57 -07:00
jenkins-bot 32e8a8c845 Merge "Add confirmation popup widget" 2016-09-02 23:28:09 +00:00
jenkins-bot 4ca6513039 Merge "Hide xwiki widget separator when widget is expanded" 2016-09-02 19:56:22 +00:00
Ed Sanders 44140295ce Remove apparently unused PNG files
The repo is now PNG-free.

Change-Id: Ia76505473fc99365781735a19ece4d028eaec528
2016-09-02 12:28:28 -07:00
Moriel Schottlender df38f142ef Followup I3daae156d: Don't truncate body text for small screens
We already took away the truncation of header text, the body should
follow for narrow screens and wrap, instead of using the ellipses
truncation.

Change-Id: I3504599044e1c94ccec55c420d455b9370dae474
2016-09-02 11:27:56 -07:00
jenkins-bot 05d05d2c56 Merge "Fix notification page width responsiveness issues" 2016-09-02 17:22:00 +00:00
Ed Sanders b54576564b Fix notification page width responsiveness issues
Have the page hide the sidebar at 982px, when there is
not enough room for both (and when vector switches down to SD).

Make inbox responsive when resizing.

Change-Id: I3daae156d1ebb0619090d466caa5138d0d98e937
2016-09-01 18:02:06 -07:00
Ed Sanders 0271cdd52d Remove unused CSS and icon for old preferences button
Change-Id: I0ba1d1322c4c53fe7fefd92be85fd595198a63c9
2016-09-01 17:30:50 -07:00
Ed Sanders b0f5a46964 Convert 'generic' icon to SVG
Change-Id: I3a364720161ede8045c5a3f7cf51923966266c56
2016-09-01 17:24:30 -07:00
Moriel Schottlender 4047f2f2c1 Hide xwiki widget separator when widget is expanded
Bug: T142260
Change-Id: I24fbd6bd2eba3c7b2d16cb1e46130cfd4a981fb3
2016-09-01 14:30:49 -07:00
Moriel Schottlender 97a7d44190 Clean up Special:Notifications output
Transform the php output to OOUI widgets.

Bug: T129172
Change-Id: I65cb5f2a016fc2a3c33a0b1cd2f3f88ed963ab02
2016-09-01 13:38:06 -07:00
Moriel Schottlender f449c68780 Add confirmation popup widget
Mainly used for mobile actions, and should be appended to the
overlay - this widget assumes it should appear and then fade out
with some confirmation message.

Also moved 'doubleCheck' icon to the ooui definitions, including
an inverted icon that is necessary for this widget.

Bug: T141404
Change-Id: I67a44962eaee6b7bd8cac26dcb5277177fa5d224
2016-08-31 14:47:59 -07:00
jenkins-bot 4c82613936 Merge "Fix sidebar counts Special:Notifications in monobook" 2016-08-31 02:41:05 +00:00
jenkins-bot 8c03fbb0e4 Merge "Adjust Special:Notifications width for small screens" 2016-08-31 02:41:03 +00:00
jenkins-bot ac62a9361c Merge "Fix line-height for notification item text" 2016-08-31 02:41:02 +00:00
Moriel Schottlender a4aa79fa50 Add the best CSS rule to notifications: word-break: break-word;
Add word-break: break-word; so we make sure even long names or titles
without spaces are broken/wrapped where they need to.

Bug: T142662
Change-Id: I166e834495972ec49eb98e301ab9be85f40f5a5e
2016-08-30 17:23:32 -07:00
Moriel Schottlender 311150a92d Adjust Special:Notifications width for small screens
Bug: T141949
Change-Id: Id0987ea9e7929777c887ceea6757ec00b3bf18ae
2016-08-30 15:29:22 -07:00
Moriel Schottlender 6e0076410c Fix sidebar counts Special:Notifications in monobook
Bug: T143845
Change-Id: Idf5922876f55aca6ed5d6800d0ff5066306c5fb1
2016-08-30 15:23:32 -07:00
Moriel Schottlender 07dde93247 Fix line-height for notification item text
Bug: T140523
Change-Id: I6a1a174ed70324da50970ecfb35ebba21ea703dd
2016-08-30 15:12:07 -07:00
jenkins-bot 76ea1746f9 Merge "Display a message when API fail due to session end" 2016-08-29 23:46:59 +00:00
Roan Kattouw 191a3309eb Fix font size for notifications dotdotdot menu in Monobook
Change-Id: Ie75ad192204a652885a82b0021340410b69864f4
2016-08-29 15:22:44 -07:00
Roan Kattouw 68a344d59a Override white background on hover for links in Monobook
p-personal links have a white background on hover, and links
inside the notifications popup were inheriting that CSS rule.

Bug: T144063
Change-Id: I3868e418ab8cce8e5ff6f7cc10e042907cb1e8df
2016-08-29 14:41:54 -07:00
Moriel Schottlender 4eab01b3b4 Display a message when API fail due to session end
Bug: T144231
Change-Id: I3ced44de097ba5b17d9edb91d4e3c527a5f18f03
2016-08-29 12:56:56 -07:00
Matthew Flaschen 299b66f937 Dynamic actions: Reuse label/description for those fields
This is necessary to preserve backwards compatibility for the API, and
this also fixes the no-JS special page.

Also, fix additional warnings.

Change-Id: Id603b4ab22c69097d5559a756bec72a6ba785661
2016-08-25 22:00:25 -04:00
jenkins-bot 4e99a5095f Merge "Add dynamic secondary actions to notification items" 2016-08-23 17:43:08 +00:00
Moriel Schottlender 480ce92bd8 Add dynamic secondary actions to notification items
Allow extensions to add dynamic actions that perform some
API request and display a confirmation message.

Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
2016-08-22 16:04:48 -07:00