Commit graph

894 commits

Author SHA1 Message Date
Moriel Schottlender 9e320bac6a Fix 'unread' dot top padding regression
All frameless buttons seemed to have recieved a generous padding-top
in the latest OOUI release. This fix overrides that.

Bug: T173059
Change-Id: Ia1f1bbc48410555163afabc84a199e7a69bb95dc
2017-08-21 11:21:39 -07:00
Volker E d7ebaf8c8b Replace outdated border-radius value with WikimediaUI one
Change-Id: Iebfd55c8e7f52f207f45dc547fccaf89107e8a32
2017-08-17 17:22:57 -07:00
jenkins-bot e74713a3ba Merge "Add 'Mark all as read' button" 2017-08-13 16:19:56 +00:00
mdew192837 e88185c54e Add 'Mark all as read' button
Currently, the 'Mark all as read' button exists only for JS users.
This patch adds the button for no-JS users as well.

Bug: T96061
Change-Id: I1a62c56306597209540ffd694c8fb7b2a92885c9
2017-08-13 10:55:46 -05:00
Roan Kattouw 0bf4861d92 Fix layout regression in notification popup footer
Caused by a new margin rule in OOUI.

Bug: T171302
Change-Id: I5746d9e6a2daa2b0d18e76a99e67c8fdaa1464d6
2017-07-21 13:04:51 -07:00
Roan Kattouw 4cf17a6712 Fix alignment of the "Mark all read" button
Bug: T169019
Change-Id: Ie63e74bef594e9c21c8a9bb615454c4a526276c2
2017-06-27 14:46:19 -07:00
Roan Kattouw 23252571a4 Migrate from FloatingMenuSelectWidget (deprecated) to MenuSelectWidget
Bug: T168679
Change-Id: I987a4b12560d03cc5eec7f8a57020a3e726a040f
2017-06-23 12:58:22 -07:00
Moriel Schottlender f05131a8ef Fallback to dbname if source title doesn't exist
This shouldn't happen regularly, since the source should always
have a title through a wg* variable in LocalSettings.php but in
cases where that is not set up correctly, or is missing for whatever
reason, the system should always fall back to displaying the name
of the source, if the title doesn't exist.

Bug: T164112
Change-Id: I94074adc260a5caf55ca21578fd7071b3323a5e6
2017-06-05 16:40:15 +03:00
jenkins-bot 2de9b411c7 Merge "Follow-up 739847c20: don't adjust the popup anchor position" 2017-05-02 18:39:02 +00:00
Roan Kattouw dd2bdd64af Follow-up 739847c20: don't adjust the popup anchor position
We used to need to center the anchor, but I375a76a49337d3b on oojs-ui
makes popup anchors center themselves, so this is now harmful.

Bug: T163993
Change-Id: I345727ae4175fd9d3cea024f43df802bcd401838
2017-05-02 10:55:02 -07:00
Roan Kattouw 2691d94e0f Don't truncate notification header messages in bundles
Bug: T163518
Change-Id: I569aeba7b8f87ca46a81ffb5a56c241342dc3d21
2017-05-02 10:50:13 -07:00
Stephane Bisson c46d56b018 Special:Notifications show unread by default if there's unread notifications
Bug: T162927
Change-Id: Ibdfaca90803eb8b12b12eb1781b0692e7336b7d9
2017-04-19 15:20:12 -04:00
Moriel Schottlender ebbe2e81af Make date headings a proper semantic <h2> heading
To support accessibility, make sure the titles in Special:Notifications
are <h2> headings.

Bug: T149955
Change-Id: I4f15694efb04896e9bd7b026d297891047759644
2017-04-13 22:39:28 +00:00
Mooeypoo 84d34a3901 Revert "Do not use fancy styled badge on Modern and CologneBlue"
This reverts commit 08d224e955.

Causes bugs in Vector when displaying the badges.

Bug: T162173
Change-Id: I9e92c304b47ce9204d7a7d2fba67118e67b1bdc9
2017-04-04 18:40:09 +00:00
Bartosz Dziewoński 08d224e955 Do not use fancy styled badge on Modern and CologneBlue
Just show the textual "Alerts (1)" and "Notices (1)".

Updated NotificationBadgeWidget to use that internally as label,
same as the PHP-generated list item does after d4d325e7.

Bug: T141944
Change-Id: I468c67b0866530e21c9af32cd02816075a3693a1
2017-04-01 14:57:34 +02:00
jenkins-bot 85c9397bce Merge "Fire 'ext.echo.badge.countChange' after DOM changes" 2017-04-01 04:52:54 +00:00
Bartosz Dziewoński f0875de9f3 Stop badge hacks from messing up the entire page on IE 11 on MonoBook
Looks like we're hitting an edge case where positioning with negative
offsets inside an inline-block element results in incorrect rendering.
We're accidentally rendering an invisible overlay over nearly the
entire page. Twiddle the styles until we no longer hit that case.

Minimal example of the IE 11 bug: https://jsfiddle.net/50v6m0kb/3/

Bug: T161869
Change-Id: Id4b6ccc1ec6a11b455d6ab45c5aaa0e8544385f7
2017-03-31 20:41:00 +02:00
Moriel Schottlender 5c35535f36 Fire 'ext.echo.badge.countChange' after DOM changes
The event should fire after the count actually changes in the
DOM as well as the internal workings of Echo.

Change-Id: I03f1742b209305080af8784632f07dff63135d81
2017-03-30 15:22:02 -07:00
jenkins-bot ea942c6250 Merge "Fix JS error when closing notification popup while animating a moving notification" 2017-03-30 17:59:32 +00:00
Bartosz Dziewoński 945fccf009 Make the invisible text in badges really invisible
Bug: T161302
Change-Id: I5c7a5bcb7a096b69c28651c6fe1e4017654997ad
2017-03-28 18:26:26 +02:00
Roan Kattouw 089531c1e9 Fix JS error when closing notification popup while animating a moving notification
This failed because it tried to call .resetInitiallyUnseen()
on a ClonedNotificationItemWidget.

Change-Id: Ib675aecfb0d916bfb25f17ad738f3a493a49dd1b
2017-03-28 12:24:25 -04:00
Bartosz Dziewoński c39fffd82f Simplify definition of 'ext.echo.badgeicons' module
* The JSON file for the Apex theme was exactly identical to the
  MediaWiki theme. If the icons are the same, there's no need to
  duplicate it.
* Since we now only have one definition used for all themes,
  ResourceLoaderOOUIImageModule is overkill and we can use the
  slightly simpler ResourceLoaderImageModule.
* Remove "prefix": "oo-ui-icon" from the JSON file, since it is
  overridden in the module definition by "selectorWithoutVariant" and
  "selectorWithVariant".

Change-Id: I1d579873459e079369fd13350a9cb00939c2b76b
2017-03-21 20:33:10 +01:00
Roan Kattouw 739847c20f Fix RTL popup alignment for OOjs UI 0.19.5
Popup alignment corrections are now done with margins on the anchor,
not directly on the popup. Setting "left" also didn't have any effect,
because it was being overridden by inline styles set by the new
PopupWidget/FloatableElement code.

Bug: T159999
Change-Id: I7738edee7ae096fcc116a79e71a591a2287ea34f
2017-03-08 15:39:50 -08:00
jenkins-bot 14f261a2fc Merge "Revert "Remove FloatableElement hack, no longer needed"" 2017-03-08 01:48:27 +00:00
Catrope 8b396ec675 Revert "Remove FloatableElement hack, no longer needed"
We still need overflow-x set to a non-visible value, so that
the overflow-y: visible rule doesn't take effect. If it does
take effect, it breaks clipping.

This reverts commit 97bde4d21a.

Bug: T159888
Change-Id: Id834d9cf9615a8d2dad27faf2eb89743ad95da9d
2017-03-08 01:23:09 +00:00
Moriel Schottlender bee8aaa499 Add and listen to 'modified' event for popup clip()
Separate the behavior of promise vs event when changes happen and
we need to clip the popup. The popup should only clip itself after
the DOM has finished populating, not "just" after the model has
been populated with data.

Adding an event that triggers whenever the main list changes anything
that is in its DOM, and having the badge widget trigger a popup clip
will solve this issue and untangle the expectation of the promises
vs. the widgets populating themselves through the events.

Change-Id: Iff9996eb1810e7ade135359139e16837e6dc74f0
2017-03-07 14:35:42 -08:00
jenkins-bot dd61dd06cb Merge "Align the cross-wiki icon with the other notification icons" 2017-03-02 06:47:48 +00:00
jenkins-bot 4ef0594a30 Merge "Remove FloatableElement hack, no longer needed" 2017-03-02 06:46:12 +00:00
jenkins-bot db1a5181dc Merge "NotificationBadgeWidget: Fix appearance of bottom buttons for OOUI changes" 2017-03-02 06:19:48 +00:00
Roan Kattouw 3e8f028ffe NotificationBadgeWidget: Fix appearance of bottom buttons for OOUI changes
This time we actually get to *remove* a hack that overrides OOUI,
which is always nice. Also add our new dependency on future-magic
forthcoming MediaWiki version.

Change-Id: Icef086e6b19dffb34eefe7b5658b57e020c5de8b
2017-03-01 22:04:05 -08:00
MtDu 185e68a803 Support loading of secondary icons in RLEIM module
Before, secondary icons, such as linked, changes, thanks, and
userSpeechBubble were loaded in mw.echo.ui.icons.less. Now, an
extra icons attribute is passed when the module is loaded, allowing
RLEIM to know which icons to load. If this attribute is left out,
an MWException will be thrown.

Bug: T159394
Change-Id: I9b36a74bcf1da0d1c698845bd067b226fb81ac96
2017-03-01 23:45:04 -06:00
James D. Forrester 988eea9da4 build: Bump stylelint and make pass
grunt-stylelint              0.6.0  →   0.7.0
 stylelint-config-wikimedia   0.3.0  →   0.4.1

Change-Id: Id87b8df04d415e1f1058a4042a31408236402037
2017-02-17 15:41:15 -08:00
Roan Kattouw 97bde4d21a Remove FloatableElement hack, no longer needed
T130153 is now fixed in oojs-ui. However, we can't set
overflow-x to visible because that breaks clipping.

Partially reverts 02252d0531. Depends on I22f2ca72cf7c2f in oojs-ui.

Change-Id: I726aada60238d17227e4475637bd3d9befa1b4c3
2017-01-24 13:12:04 +11:00
Stephane Bisson fcbc0ea2bc Remove calls to debouncedUpdateThemeClasses
debouncedUpdateThemeClasses doesn't seem to exist
anymore in ooui.

I'm not sure what this function call was for.
My limited testing has reveal no obvious
problems after removing it.

Bug: T155800
Change-Id: If9ab35ed57e51b103cc5474ea902da390abaf69d
2017-01-20 10:48:32 -05:00
Fomafix a76bd5320f Replace $( document ).ready(...) by $(...)
In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: Iff3d7fb07a739fc6ff9b62a2f586c54cd9c8f315
2017-01-06 14:06:39 +01:00
Stephane Bisson 01a1924187 Adjust unread counter position based on length
Move unread counter to the left (or right, in RTL)
when it's longuer than 2 characters so as to
have harmonious spacing between the counters and
the next link on the toolbar.

Bug: T142454
Change-Id: Ib8aa673cf9e60ade80490ea0eccb7453d3747cd0
2016-12-20 13:40:54 -05:00
Amir Sarabadani 7ac77d8538 Make mw.echo.alert text darker to pass WCAG test
Going from #54595d to #222 (both from the color palette)

Bug: T153506
Change-Id: I7e844f63a743ff8791ab76149147e9e9c71df7d2
2016-12-17 02:42:51 +03:30
Roan Kattouw 22caa786c1 Follow-up eed48aa7: remove unnecessary z-index
This z-index rule isn't needed for the floating toolbar, and it
causes the notificationInboxWidget to be on top of MobileFrontend's
semi-transparent cloaking overlay, which makes it look weird.

Change-Id: Ie9d10e4193d15b72ce0199ff9b4e45742afec132
2016-12-09 15:28:14 -08:00
Stephane Bisson 61b602e961 Fix unread notification count caching
Purge all cache when unread count changes and
repopulate on read.

Also fix client-side estimation when
marking a foreign notification as read.

Bug: T151389
Change-Id: I62def3d40a5640e26c234bb0335bc506dbf864a0
2016-12-09 09:23:59 -05:00
Roan Kattouw 49974544ba Split up $wgEchoConfig
$wgEchoConfig is a deeply nested structure that ExtensionRegistry can't handle well.
It also combined different things, and the version number was used for two
separate purposes.

Split this out into $wgEchoCacheVersion, $wgEchoEventLoggingVersion
and $wgEchoEventLoggingSchemas.

Change-Id: I2f9d5d111f7925fb057d423a3e7064bff5040205
2016-12-05 15:44:12 -08:00
jenkins-bot 53d3e99744 Merge "Add help icon" 2016-12-04 04:23:58 +00:00
cenarium c753cc04ee Add help icon
This adds an help icon that extensions can use for help pages. This is
the same icon as the one used in core mediawiki, located at
resources/src/mediawiki/images/help.svg.

Change-Id: I31665932b69c52e2a3eb2f0e1d9b5d88c562bca2
2016-12-03 20:10:21 -08:00
Amir Sarabadani 550dc4ee88 Align echo alert colors to WikimediaUI color palette
Change-Id: I4a6d53f7a5407838ce43f12b3a8ec6dde365ce4c
2016-12-01 07:30:01 +00:00
Ed Sanders c8d24ebd17 build: Replace jscs/jshint with eslint
Change-Id: Iee1d1b20ed31e636bfb8fc8cf9b18ff328bf608c
2016-11-23 15:25:59 -08:00
Kavitha Muthu 22389cf69b Add shadow to the notifications top toolbar
Bug: T140964
Change-Id: I5d795bc9c6601d874dfd58010399832b2727b811
2016-11-03 17:08:55 -07:00
Roan Kattouw c5d3fe3159 Clean up and simplify icon SVGs
Using svgo and some manual fixes

Change-Id: Ifb2ca82da7e95e2f0deccbec0e01eeefaae43236
2016-11-02 00:52:34 +00:00
jenkins-bot aead4d1ae9 Merge "Follow overhauled color palette" 2016-11-01 22:49:16 +00:00
Volker E 33655c75e7 Follow overhauled color palette
Replacing colors with ones from the overhauled WCAG 2.0 level AA
compliant color palette https://phabricator.wikimedia.org/M82
Applying Less variables where possible for better flexibility
in future design maintenance.
Also introducing some variables from WikimediaUI Base.

Bug: T147365
Depends-on: I16bdfbdada252ee27d5a0de11e0930347315b699
Change-Id: Ic05ed15b44d86752c686d80efc4f2ed2a1e71b41
2016-11-01 22:31:28 +00:00
Pau Giner 1e24c5798a Updating icon colors to latest palette
Echo icons updated to the new color palette
https://phabricator.wikimedia.org/M82
Also setting color value hex codes to lowercase for uniformity
across products.

Bug: T147365
Change-Id: I16bdfbdada252ee27d5a0de11e0930347315b699
2016-11-01 22:00:24 +00:00
jenkins-bot 84ad297d8e Merge "(re)Add JavaScript hooks to Notifications" 2016-10-14 22:36:37 +00:00