Commit graph

1181 commits

Author SHA1 Message Date
Jon Robson 287c59be44 Don't change width of Vector when more than 0 notifications
Bug: T307134
Change-Id: I133162d06166bc2c3cabd58b61fc8437fdb3db1f
2022-05-16 12:18:48 -07:00
Kosta Harlan 0abeb2bfeb
Use watchlist-progressive icon for WatchlistChangePresentationModel
Bug: T203941
Change-Id: I8c252c5a48296fd47f0e30462a9771baf7fd7804
2022-05-11 13:57:09 +02:00
Ed Sanders 2af0c6d816 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I60f34cb3c3c5c12cf1f9f38426a56c76dcf063fd
2022-05-09 14:05:59 +01:00
Jon Robson 5752542981 Prepare for removal of SkinMinervaReplaceNotificationsBadge hook
Bug: T301263
Change-Id: I7b9cf401936be2421d0ad4efe963486404d50e6a
2022-05-06 14:26:16 +00:00
jenkins-bot cfd9dbf9ca Merge "Replace deprecated Less .box-sizing() mixin with standard CSS" 2022-04-26 11:12:58 +00:00
Volker E fe766f04ea Replace deprecated Less .box-sizing() mixin with standard CSS
Also remove 'mediawiki.mixins' includes where unused.

Bug: T306488
Change-Id: Ia9a5a1ce1e47c1de2c2197885237f9355f9cc4f2
2022-04-20 17:14:37 +00:00
lens0021 5943b13b5b
Handle the missing 'all' type as specified in the doc
The text for 'type' in the documentation of the parent describes the
notification type can be 'all', following 'message' and 'alert'. That is
actually used, for instance inside of
mw.echo.Controller.markLocalNotificationsRead() function. The gap
between doc and implementation results in bugs. This resolves the gap.

Bug: T270879
Change-Id: I546aa42e927a05a5426db90153901ae632b97e36
2022-04-20 21:57:12 +09:00
Jon Robson 5350bba546 Drop unused zero class
Not used anywhere.

Change-Id: I848650e4e3497664d712537437d8a10b22d6afb1
2022-04-04 18:20:27 +00:00
Ed Sanders e7ac2a8966 Set all icons used in EchoNotificationIcons to 30x30
This will cause them to be rasterized as the correct size
when used in emails. When used on the web (as SVGs) they have
their dimensions set by CSS.

Bug: T275936
Change-Id: Id7b76cf13bf9ebb88776d9c7eebc3944732ae743
2022-03-25 13:18:07 +00:00
jenkins-bot 586e1291bf Merge "Clicking Echo badge should close ULS dialog" 2022-03-05 06:09:41 +00:00
Jon Robson 0c074ec91a Clicking Echo badge should close ULS dialog
Bug: T295796
Change-Id: I3a7f33cad4e08ce22b6e640901c965d764c9156b
2022-03-04 22:47:23 +00:00
Timo Tijhof 5a76489be0 tests: Fix QUnit warnings and resolve complex test_NotificationBadge
== Problem 1 ==

As of I09c27a084100b223,  tests/qunit/index.js or equiv was used to
load test files asynchronously from a using() callback. This was
untracked by RL or QUnit, and thus sometimes ended up finishing after
the test runner was already done executing all tests. In CI this
means the tests are sometimes never loaded and the browser (or Node)
process already killed before they even have a chance to arrive.

Prior to QUnit 2.17, this was no way of detecting this. As of
QUnit 2.17 (core upgraded last week) when running tests manually
the following helpful warnings appear in the console:

> [warning] Unexpected test after runEnd.
> [warning] This is unstable and will fail in QUnit 3.0.
> test	@	qunit.js
> tests/qunit/model/test_mw.echo.dm.SeenTimeModel.js
> require

There were about 1072 instances of this warning, all from Echo.

Fix this problem by removing the async callbacks and specifying the
two modules as normal dependencies instead.

== Problem 2 ==

Class NotificationBadge was being loaded in a strange way out of
bound. This was a violation of module boundaries and should not be
needed other than for a temporary hack or other tech debt. More
generally when a test uses `packageFiles` this is a likely sign of
tech debt or misunderstandings.

Instead, depend on `ext.echo.mobile` and export/import the class
as normal.

After this, the test module can use `scripts` instead.

== Problem 3 ==

The `ext.echo.mobile` uses a Mustache template which the test
was also duplicating a reference to. This is no longer needed now.

Due to the `qunit/index.js` file carefully splitting the operations
between template assignment and file loading, I wondered whether
it was meaning to replace or mock it with something else, but it
simply refers to the same file and only does this because it wasn't
using the module directly. This is now resolved.

If you do need to mock in the future, this can simply be done
by assigning `NotificationBadge.prototype.template` from a
beforeEach() callback in the test suite, or by supporting it
property as a constructor option in NotificationBadge.js and
assigning `this.template` there, which is supported by the
mobile `View` class already it seems and would follow DI patterns
more effectively.

== Problem 4 ==

Most of the Echo tests were ignored sometimes and executed other
times.

The test for `ext.echo.mobile` in particular though was never
executed in CI specifically because:

> Undefined module: 'mobile.startup'

This became a hard error with this patch, which is fixed by
the CI config change with Ie9dabe3269c56fa76db8e51.

Bug: T299780
Change-Id: Ie4a87f3b8085fd6ae53ec586c1782cc266d5288a
2022-03-02 12:52:06 +00:00
Timo Tijhof 1ae60e5977 ext.echo.mobile: Name init function as such for clarity
It is common for internal files to export a single value, e.g.
when a file exports a single class or other special value.

However, this is uncommon for a module's overall export.

* It can create the misunderstanding that the init code is immediately
  executed, when it is in fact delayed.

* This leads to the obscure `require()()` statement that is easy to
  misunderstand.

* The least-effort way to expand this is by adding a statement
  like `module.exports.Foo = Foo` after `module.exports = init`
  which has the sublte behaviour that 1) it only works in this
  order, not reversed as then Foo would be de-referenced by the
  second assignment, and 2) it has the subtle effect of attaching
  Foo to the `init` function as `init.Foo` which is non-obvious,
  and 3) makes the init function unsafe to pass around, wrap,
  stub or otherwise treat as a regular function.

Remedy by naming it as "init" on a regular module export object.

Change-Id: I51065e00f9dcaec075578a46df4de32c7a427df3
2022-03-01 23:11:40 +00:00
Ed Sanders ba38b57c83 eslint: Lint Gruntile.js using server rules
Change-Id: Ic7d67098492558fdd6cec292afd22aaf8693a594
2022-02-07 16:30:24 +00:00
Sergio Gimeno c815bc64e4 Prevent welcome message partially truncated
Bug: T291100
Change-Id: Ia7d349bd81b45c99eb421b8e69ccdadb3135a67f
2022-01-24 21:44:47 +01:00
DannyS712 93ccaa71f1 Remove unused empty mw.echo.js file
Follow-up: Iaed7cf0e47479ce8ce76aee1bfe479d82b4f61ed
Change-Id: I778918d62405d07f76210aa40df730eda631d51b
2021-10-07 21:32:41 +00:00
Kosta Harlan d21f8d2bb7 Remove uses of .box-shadow() mixin
The .box-shadow() LESS mixin is now obsolete as box-shadow is supported
without any vendor prefix fallbacks, and planned to be removed by the
next MediaWiki release.

Bug: T283352
Change-Id: I3a4f5299b1d6b12e4dbfa68864613f5923957607
2021-09-03 19:21:39 +00:00
bwang a64b97a620 Override opacity styles for all read badges for vector user links
- Addresses this issue https://phabricator.wikimedia.org/T285259#7231489

Bug: T285259
Change-Id: I58345c84efa129aae56c5ae1be3bcf5117589647
2021-07-23 14:47:14 +00:00
bwang b0aaa2e4ec Update vector badge styles
- Override echo icon styles for modern vector
- Reverts https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/704862

Bug: T285259
Change-Id: Id71d3e248dc6d0ee24278e0ecfbcf8691e1da24b
2021-07-22 11:53:36 -05:00
jdlrobson 088697a73d Echo notification oo-ui-popupWidget-anchor should point to icon
In Vector, these rules result in the anchor pointing to the wrong
place. They seem to be improve things in Minerva, so these are restricted
to that skin.

Bug: T276566
Change-Id: If871ab59fea519b48568781ffd9ddf6640006385
2021-06-23 08:47:09 -07:00
Bartosz Dziewoński f2da1ff813 Fix MonoBook orange banner hover styles
Follow-up to 2583f803c3.

Bug: T284496
Change-Id: Ib476d28fc2a89a7722b6218a5fe557157c863d7d
2021-06-08 17:54:09 +00:00
Nicholas Ray 2583f803c3 Add talk notification instead of transforming the talk link
Note: This change would potentially affect all skins including modern
and legacy Vector and others.

The status quo when a talk notification is present is to transform the
talk link into an orange notification message. One option is to leave
the talk link and **add** a notification instead of transforming it.

This will result in two elements #pt-mytalk and #pt-talk-alert
This will interfere with styles targeting #pt-mytalk .mw-echo-alert
This impacts user styles but not anything in production.

Bug: T283811
Change-Id: I3e4be1381f9a2e9986b94b3b13df5ed64d09a59d
2021-06-04 09:33:50 -07:00
Volker E 67bf58a489 build: Update SVGO to latest v2.3.0 and re-crush SVGs
SVGO v2.x changed configuration to JS, amending configuration.
Adding new 'minify-svg' npm script.
Also re-crushing SVGs.

Bug: T278656
Change-Id: I5b150cce300e764afb0a40d402479db22cfcea99
2021-05-27 11:47:02 -07:00
Nicholas Ray 3a351cfb4f Move talk page notification data from 'user-menu' to 'notifications'
**Note**: This change will affect the order of the yellow talk page
message notification on legacy Vector/other skins by moving it from
after the `#pt-notifications-notice` element to before the
`#pt-notifications-alert` element. This was done because the
notification is related to the list of messages that appear when the
bell icon is clicked so having it in close proximity to that icon is
hopefully more intuitive than having it next to the unrelated inbox
icon. [1]

Per T274428, we need this notification to be inside the `notifications`
array instead of inside the `user-menu` array.

Additionally:

* Per T274428, update the notifications message copy to "You have a new
Talk page message"

* Remove the `onPersonalUrls` hook method inside EchoHooks,
unregister its use as a hook in extension.json, and update its
references in Echo.

[1] T274428#7113896

Bug: T274428
Change-Id: I5ae0ec089bcf0eec1ec7ac13f60e811f54e1d8e1
2021-05-25 18:24:29 -06:00
Volker E a9f495db13 Unify list-style CSS
`list-style: none none` was a workaround for an IE 6 & 7 rendering issue.
Same goes for `list-style-image: none; list-style-type: none;` combination.
Let's unify to shorthand `list-style: none` for any non-ancient browser.

Change-Id: Ibdfb9a3cbd868d439504b59fa029e8da9a13f70a
2021-05-03 01:41:54 -07:00
libraryupgrader cefce8b8fa build: Updating eslint-config-wikimedia to 0.20.0
Change-Id: If1eaa61aefc93426217f675fca27873dd9db6dc1
2021-04-16 14:24:33 +00:00
Ed Sanders 2bbae62aa3 Set icon size in bundle to exactly 20x20
1.5em would render as 21px in Vector and 19.05px in monobook.

Bug: T276114
Change-Id: Ie31f83e849ae5a4b17f28dfe6ccabc8a2005c919
2021-03-03 23:19:44 +00:00
Ed Sanders bb1bd02bd6 eslint: Fix warnings
* Load wikimedia/jsduck rules
* Add inline disables for compat
* Fix shadowed variables

Change-Id: I42234ab74f5007c16ff3960309335e715da76c1c
2021-02-01 21:02:46 +00:00
Isarra 4ab34ada4f Move Vector-specific top:-5px badge offset to Vector style file
Essentially: force the badges, when the personal menu is displayed
inline, to align correctly with the rest of the line instead of
hovering slightly above the line for no apparent reason.

This should fix nearly every other skin that doesn't already have
its own local fix, as 20px is already pretty well-centered with
normal-sized fonts when doing sane things with padding/margins/
line-heights. (Vector is not doing sane things with padding/
margins/line-heights in the personal menu, but hopefully forking
Vector went out of vogue ten years ago and people have quit doing
this by now, yes?)

This may also not be ideal for mobile skins. Breaks Timeless,
because I just completely gave up on trying to get this to behave
there and put it in its own little timeout box. Oops.

Change-Id: I73067bbc3c930ebf20aa492b53a4a5fe4259b607
2020-12-16 19:22:40 +00:00
Ed Sanders 7170698d68 Remove padding from popup heading
Fixes regression from OOUI update.

Change-Id: I0f2cca3417a2217f350032b8aed2f517e8ed35b7
2020-12-08 22:05:08 +00:00
jdlrobson 2f020163ee Restore old Echo styling through several reverts
These dont work. Timeless provides its own skinStyles for this module:
* Revert "Timeless skinStyles should be additive not replace"
This reverts commit 98d0d296a8.
* Revert "Use skinStyles for deciding where the text-indent should apply"
This reverts commit 8adab78547.

A new implementation in Vector means these are redundant:
*  Revert "Item label can now use overflow hidden"
This reverts commit b5dd7baa08.
* Revert "Drop text indent in modern Vector"
This reverts commit 150fc7a16c.

Bug: T264339
Depends-On: I2afc12504d7184583fa8331479125474c68017dc
Change-Id: Ifd0dd5a0479588664b772fb839dbbcd8d7c47320
2020-10-29 16:59:45 +00:00
jdlrobson b5dd7baa08 Item label can now use overflow hidden
Since the icon is applied to the link element it is now possible
to apply overflow hidden to the label itself when its wrapped in
a span.

Bug: T264339
Change-Id: Ifdc1d152702c1f5338fd2969cccf07971d622fc7
2020-10-21 10:04:40 -07:00
jdlrobson 31401f9b00 Catch malformed URIs
It is documented that Uri can throw an exception so this should guard
against this case.

Bug: T261799
Change-Id: Ia45654194f853923a5b05ceff3ab2b47f6dd87d8
2020-10-20 19:42:20 +00:00
jdlrobson 8adab78547 Use skinStyles for deciding where the text-indent should apply
The code previously suggested it was only needed for Monobook and Vector
but it was also being used by timeless as discovered when 150fc7a16c
landed. This follow up applies the text-indent in the skin styles to ensure
it goes where needed.

Bug: T265806
Change-Id: I76a26a0a497f6bf7bb5f53967ea625f7e5d06ff7
2020-10-19 18:13:21 +00:00
jdlrobson 150fc7a16c Drop text indent in modern Vector
In the new version of Vector the personal tools text is aligned right
rather than left. The text-indent is redundunt.

A background-position and center directive are added in preparation for
future changes we plan to the personal tools to make this code more
resilient.

Depends-On: Ic9df8c1cea0fef82461a84190689791ce2275812
Bug: T264339
Change-Id: I6bc80c8a42425599102370e5d90b48c07d360ccb
2020-10-13 20:21:57 +00:00
Bartosz Dziewoński 121cbd6ee8 Fix incorrect use of $.extend()
$.extend() with one parameter will merge the given options into the
global `jQuery` object, which was definitely not intended here. Maybe
the `config` variable was supposed to be passed as the second
parameter, but it doesn't look like that would do anything either.

Accessing the global `jQuery` object in that way ended up generating
completely unrelated warnings about deprecated `$.trimByteLength`,
which was reported in the task.

Follow-up to 7658e151d6.

Bug: T256732
Change-Id: I5f92b6725c8abdcfb676e6a09b610ea0dc8c245f
2020-10-03 18:30:30 +00:00
arttsymbar 355e171eaa Notification: add skin specific(WikimediaApiPortal) z-index for menu overlay
Bug: T259735
Change-Id: Ib46d77a7d78107282b14e84bedb545886ba182e8
2020-09-07 11:30:26 +03:00
Thiemo Kreuz a5d35141f4 Fix notification popup header always showing a scrollbar
This issue was introduced in patch I41ad96b (T190397). The head
element is set to 44px height. However, the box-sizing is set
to border-box, which means these 44px include the 1px border at
the bottom. This leaves only 43px inside the head. The label is
meant to fit in there. Since the previous 44px don't fit, there
was always a scrollbar.

This could as well be fixed by changing the head to 45px.
However, this would make it different from the footer. I
believe both should have the same size for consistency.

Bug: T190397
Change-Id: Id0946d872a99fb8a1fbb33e6365fd78cd22eddd3
2020-08-10 14:59:06 +00:00
jenkins-bot 6eee04f614 Merge "Fix layout of action buttons use display:flex" 2020-08-04 05:17:04 +00:00
Ed Sanders ee65e8b426 Remove text decoration on whole item widget when focused
Change-Id: I910b4cf3ef5503a4e38195cd588f327870e87d5e
2020-08-03 15:14:36 +01:00
Roan Kattouw bf1a124475 Mobile Special:Notifications: Properly close overlay on selection
Calling overlay.hide() doesn't invoke the onBeforeExit handler
(anymore? not sure if it ever did), so we have to call this handler
ourselves when manually closing the overlay.

Bug: T258954
Change-Id: Ife5926241c0b8473607c14df0f89c794728566dd
2020-07-30 15:31:01 -07:00
Ed Sanders 5161a2c40e Fix layout of action buttons use display:flex
Bug: T258990
Change-Id: If0ece6e7ff6fef9abfcd4996a9158e86a5ffece0
2020-07-29 14:13:02 +01:00
Ed Sanders 6492fc380d Fix width of buttons-as-option-widgets
Change-Id: I7001815850a829a07c941e94548ea5a65d2fd1d5
2020-07-28 09:51:20 +00:00
Ed Sanders 344cccb5fa Minerva popup: Fix scope of border-left/right rule
We only hide side borders from top level notifications,
not notifications in bundles.

Change-Id: Iba680bda1dcd69b8f907413fbeec088e3ee1b43a
2020-07-28 09:51:15 +00:00
Ed Sanders d43ceb8978 Merge in styles from Minerva
Drops some no-JS styles (.mw-echo-notification) which didn't do anything useful.

Bug: T258936
Change-Id: I72bedc3c3d633e8898c93d5e7d570b8ee7b6a1ff
2020-07-27 23:19:51 +00:00
Ed Sanders eb0603c9af Fix layout of NotificationsInboxWidget on narrow screens
Bug: T258939
Change-Id: I17b968297baf630b71e832f6af0b0b534c9c08b4
2020-07-27 16:11:38 +01:00
Ed Sanders bc5b569719 Fix styling of action popup menu
* Fix icon position
* Fix border widths and colour

Change-Id: I06f45baa4c90e43d7e50eed83888d57ede69a517
2020-07-27 16:11:03 +01:00
Ed Sanders d22ca3b44c Fix popup font size in Minerva
Bug: T258937
Change-Id: I91ff2c49cfa7aa0805d7e0444c87599226c79291
2020-07-27 12:56:24 +01:00
jenkins-bot 34b8f1050e Merge "Follow-up I1ed9d3860: Fix ToggleReadCircle in monobook" 2020-07-25 18:08:15 +00:00
jenkins-bot 833fcdfd1e Merge "Fix font size in monobook" 2020-07-25 00:00:11 +00:00
jenkins-bot 407e55dd00 Merge "Remove padding reset from markAllReadButton" 2020-07-24 23:59:51 +00:00
Ed Sanders 34c70f8501 Follow-up I1ed9d3860: Fix ToggleReadCircle in monobook
Dummy icon is not position absolute in monobook, so hide it.

Change-Id: I24edfbc1afcb81da8ef4db6bb685792ee56bc49a
2020-07-24 23:31:45 +00:00
Ed Sanders 5b216bfad3 Fix font size in monobook
Content font size should be 12.7px and this can be achieved
by just applying the 127% from globalWrapper.

This matches the font sizes on Special:Notifications.

Change-Id: I5369231da52343029ea2cdbfc790296c2257807a
2020-07-24 23:31:35 +00:00
Ed Sanders 3ead305c27 Remove padding reset from markAllReadButton
Buttons should be positioned with margin, not padding,
as changing padding breaks hover and focus states.

In this case the position is already fine without
additional adjustment.

Change-Id: I8a7726b2e0988117084a1d0b060b4f649ba4cc75
2020-07-24 23:31:00 +00:00
Ed Sanders 2faa1fe512 Fix hover styles, remove link underline on special page
Change-Id: Ie144eed5295a8c8fa6239c28f7f2a15d493fd775
2020-07-24 20:34:43 +01:00
Ed Sanders ec87876f59 Set min-width on action buttons
Bug: T130109
Change-Id: I0a763aa7d73a84854daf43696d5751c58b3d067d
2020-07-23 18:19:34 +01:00
Ed Sanders e91e0c410b Simplify styling of notification bundles
Bug: T258714
Change-Id: Ia73fe2d2a96c070dacd8d9744242148ab4eca390
2020-07-23 18:19:34 +01:00
Ed Sanders 769d6579f9 Make MenuItemWidgets inherit from ButtonOptionWidgets
This gives them a consistent appearance with the expand/collapse
button. Only requires a small visual tweak to work in the popup
menu.

Bug: T258701
Bug: T258703
Change-Id: Ib3d074d1117e08d11136791354184e2e4b655290
2020-07-23 18:19:32 +01:00
Ed Sanders 3abe6b77bd Make mark as read/unread buttons properly focusable
Bug: T258710
Change-Id: I1ed9d386083d94bf6b5696bb71385169c0ccb807
2020-07-23 15:27:01 +01:00
Ed Sanders 42e2e5efbc Make NotificationItemWidget an <a> tag to fix focus issues
Bug: T258705
Change-Id: Ib44e04dd08e2818eb99ffb0cba73c775256d66d5
2020-07-23 15:27:01 +01:00
Ed Sanders 25e2fb4a8f De-activate toggleExpandButton after clicking
Bug: T258706
Change-Id: I810d7733e1f5f89c521e733713641b28b1ae6237
2020-07-23 15:27:01 +01:00
Ed Sanders d39d944bf0 Remove light background from dynamic-action hover state
Bug: T258703
Change-Id: I7b306b63c56da11ab7ce0492111f594f8b60593e
2020-07-23 14:02:34 +01:00
jenkins-bot 3c62654c2f Merge "NotificationBadgeWidget: Removes role button from footer elements so screen reader announces it as link" 2020-07-13 20:47:55 +00:00
jdlrobson 4a62746f87 Echo badges should have transparent text
While working on the new Vector, it exposed some issues with
the label due to the change in position of the personal tools.
This change should be safe in legacy version since the label is
never displayed to end users visually.

Change-Id: I5aaac22af689ce74b9d9214453681c0250dade7f
2020-07-07 15:43:02 -07:00
bkudiess-msft dd46c6f665 NotificationBadgeWidget: Removes role button from footer elements so screen reader announces it as link
Bug: T253585
Change-Id: Icb1dfca98d0950e6beda91592c18c877f28214ac
2020-07-02 16:29:40 +00:00
jenkins-bot f87a6a1a19 Merge "Remove unnecessary table markup announcement in notification item widget" 2020-06-30 00:06:40 +00:00
bkudiess-msft 172fb93f14 Remove unnecessary table markup announcement in notification item widget
Bug: T253406
Change-Id: Ibc9d3101b86c4dfb534d37ac2ca42e965fa45ad3
2020-06-23 22:51:12 +00:00
jdlrobson 1f995c93a3 self.hide is not a function
This is a factory function. self.hide is replaced with overlay.hide
and a local variable to correct.

Bug: T255630
Bug: T253045
Change-Id: I3dae26e798b0c2e7520c2f01b017c257cc81e995
2020-06-17 22:02:14 +00:00
Ed Sanders ffe3363d09 build: Update eslint-config-wikimedia to 0.16.1
Change-Id: I2ce14429f9440e69e36fa349847f58fb32862f2a
2020-06-15 16:19:00 +01:00
Roan Kattouw 7658e151d6 Fix positioning of the secondary actions menu
- Automatically flip the position if there's no room
- Always flip the position in bundled notifications
- Remove menuWidth and related hacks, they didn't work anyway
- Increase maximum label width a bit

Change-Id: I490a925b6265bfbb8bbedae11672fd19d4efba44
2020-06-03 04:41:13 +00:00
Roan Kattouw 28f432b150
Add dynamic secondary action to mute/unmute page-linked notifications
Also adds an API module for muting and unmuting pages (and users).

Bug: T46787
Bug: T115264
Change-Id: Icf4e4bfa9fd7fa27b4c40892e3d5ce000eb22d5a
2020-05-27 15:20:08 +02:00
Volker E a569321595 Add aria-label to SpecialHelpMenuWidget
Bug: T244543
Change-Id: I04c2c47c5d20cf69f9f0602a2e535c05b01f5f3c
2020-05-18 12:35:43 -07:00
Ed Sanders 04100d4083 SpecialHelpMenuWidget: Use ButtonMenuSelectWidget
Bug: T178387
Change-Id: I521aa3749e1009e5bb028ee1359f732f21226689
2020-05-06 16:21:52 +00:00
Volker E 9ee48977f1 Use '.text-overflow()' mixin from 'mediawiki.mixins'
And remove Echo's own mixin.

Depends-On: Ia8d6e7229b49598b0f4cb19dff463ffe2f11a43d
Change-Id: I68d5726f01484ef5b94a606de9669207944dff54
2020-04-23 18:16:01 -07:00
Volker E e85d881817 Replace static border radius value with var
In a distant future those might be replaced by core WikimediaUI Base
and this is a sane preparation for it.

Change-Id: I8907c8908f3b775be36b16a6782d7e9719e30c4c
2020-04-15 18:09:48 -07:00
Volker E 32c1c8e5f1 Amend Base10 color, add and amend WikimediaUI Base variables notation
Amending Base10 to slightly darker `#202122` to fulfill WCAG
requirements in connection to Accent50.
Also adding and amending WikimediaUI Base variables where in connection
with the color change.

Bug: T248393
Change-Id: I3b0c1666f7f883908a3778aa9e3fcbf51b57fefe
2020-04-15 18:02:21 -07:00
jenkins-bot ce186cf03e Merge "Add aria-label to Notifications page “Recent activity” filter widget" 2020-04-03 21:18:37 +00:00
Akinwale Alagbe b49fdb88c3 Add aria-label to Notifications page “Recent activity” filter widget
Adding `aria-label` to the filter widget, with `listbox` role assigned 
to allow screen readers parse read the content.

Bug: T244543
Change-Id: I72a4045abe9a7c391ee3fe471ed944d96259b79e
2020-04-03 20:00:22 +00:00
jenkins-bot f3862d3e5e Merge "Updated notices icon images ARIA role to presentation" 2020-02-24 20:37:38 +00:00
Akinwale Alagbe f3baccbfb2 Updated notices icon images ARIA role to presentation
Also adding empty `alt` attribute for browsers incapable of 
`presentation` role yet.

Bug: T244814
Change-Id: Ia7b9961aa4210244df0f8e87880b32d9de41a3a9
2020-02-24 20:22:13 +00:00
jdlrobson d7cc28fbcb Properly scoped style improvements to Echo OOUI dialog in desktop Minerva
This reverts commit ca5e5c85af and then
scopes the rules.

Bug: T241090
Bug: T242493
Change-Id: I0e6a4f6d235f34dc8f05a5e7ea5272d6465b80aa
2020-02-11 07:41:23 +08:00
Esanders ca5e5c85af Revert "Style improvements to Echo OOUI dialog in desktop Minerva"
This reverts commit 5b628b5109.

Bug: T241090
Bug: T242493
Change-Id: Id4a7ac9748ed7f934e9c47f4ade0c2f87da4488d
2020-02-10 20:24:17 +00:00
Roan Kattouw 0ff7678377 Document ext.echo.unseen counters
There are two counters (ext.echo.unseen and ext.echo.unseen.click) that
are incremented in two different places. It's hard to see how they're
connected unless you know where to look.

Add comments to each of these counters pointing to the other one and
explaining what they're for.

Change-Id: I0699cba85bf797e4f7ef42cc6a7a996aa35510f0
2020-01-16 17:46:08 -08:00
Roan Kattouw b2f816d0af Use GET rather than POST for action=markseen
This seems strange, because markseen sounds like a write action, but it
writes to the seentime cache rather than the database. For multi-DC
support, we need writes to the seentime cache to happen in the local
data center, and the easiest way to do that is to make it a GET request
rather than a POST request.

It would be nice if marking as seen could be consolidated into the GET
request for fetching notifications, but I didn't do that because the
code for those fetches is pretty complicated, and some fetches (like
polling) should not mark as seen.

Bug: T222851
Change-Id: If4c504a9dc562b1d4e626e155fba8ebb5cdb0579
2020-01-10 16:12:18 -08:00
jenkins-bot 1f96009221 Merge "Use document.body instead of 'body' as jQuery selector" 2020-01-05 23:33:24 +00:00
jdlrobson 5b628b5109 Style improvements to Echo OOUI dialog in desktop Minerva
* Make sure the badge for desktop when initialised points to the
right thing
* Make sure the dialog takes up the full screen and the Clippable bug
does not interfere with the display of the pane

Bug: T241090
Change-Id: I6c5588ee689633cef413ef27449aeeea341d7a97
2019-12-20 20:38:36 +00:00
Fomafix 99dc512ef8 Use document.body instead of 'body' as jQuery selector
Also use the shorter .appendTo() instead of .append().

Change-Id: I1e0aaff4790a6ca5c9e5d2f6e5926e15f8574cee
2019-12-16 11:51:03 +01:00
jenkins-bot 19d88be6cf Merge "build: Update linters" 2019-12-12 17:52:35 +00:00
Ed Sanders 80ddee3956 build: Update linters
Change-Id: I713aafb891306fc21a776a7d4622c6a039798753
2019-12-12 11:20:49 +00:00
Ben Houghton aeafb09d80 Allow marking all as read from popout window
Clicking 'mark all as read' would only mark the notifications you are viewing as read
instead of all of them - now it will mark all of them as read.

Bug: T156425
Change-Id: If46a85f91dfddd4ac158e5c3a4f942c9c3d9aac1
2019-12-03 20:08:35 +00:00
Volker E 415b7b9851 hygiene: Make LESS imports non-ambigious
Some LESS parsers will get confused with the lack of file extension.
It's better to be explicit and in alignment with recent change in core
I379334d7729e587a2a00.
It was already weirdly mixed in this repo with some imports featuring
extension and some not.

Change-Id: Ib208607c850fa2492b13cd3d449c04ebc2c21a01
2019-10-25 13:53:39 -07:00
Zoranzoki21 5a05e94a1e Remove comment related to skins.minerva.scripts after removal of it in 1053997
Bug: T221007
Change-Id: I0ca3e195aa623cff7ef437dc177179dee13c7cd1
2019-10-16 10:30:57 +00:00
jdlrobson 10539971f1 No longer check for skins.minerva.scripts
Echo is now in complete control. Cleanup after ourselves.

Change-Id: I9a26c7a88f5e3ff19ec5b17b08a0d05c4f9e60ce
Depends-On: I9a6b06158d9083317aea46510c0c47980a25e50a
Bug: T221007
2019-10-16 09:27:24 +00:00
jdlrobson d3c0494a17 Dormant mobile notifications overlay lives in Echo
This code will be enabled when Iba1d7863171268066bf7597182c57a0a2041497f
relinquishes the responsibility for rendering the Echo notification badge
and wiring up of the related JS.

It makes 3 assumptions:
1) Minerva will expose a VERSION property on the skins.minerva.scripts module
to tell Echo it can begin control of the functionality
2) A new hook `SkinMinervaReplaceNotificationsBadge` will run on the server side
allowing Echo extension to render the Notifications badge in Minerva.
3) A new client side hook (echo.mobile) will fire whenever the Echo dialog is opened or
closed.

All code relating to Echo inside MobileFrontend and Minerva is
moved here.
CSS for the modules is kept in Minerva as skinStyles

This code remains dormant until Iba1d7863171268066bf7597182c57a0a2041497f lands.
It pre-registers a "to-be-created" hook SkinMinervaReplaceNotificationsBadge that
substitutes the Minerva badge.

It also watches the export value of skins.minerva.scripts for a VERSION value - when
this appears it will take the signal that it should manage the frontend code.

In the new system the mobile specific code is limited to the mobile version of
Minerva. The desktop version of Echo loads on Minerva desktop - presenting an
opportunity in future to consolidate both implementations to use the same component.
The mobile version of Vector and Timeless for example will load the mobile overlay
(with existing styling issues that we don't need to worry about right now given
we don't officially support skins other than Minerva as mobile)

Testers:
* Check require( 'ext.echo.mobile' )(); inside initMobile
inside ext.echo.init does not fire until
Iba1d7863171268066bf7597182c57a0a2041497f is checked out.

Depends-On:  I1a66939d2b596094b419de40b370e79f09c85581
Bug: T221007
Change-Id: I09c27a084100b223662f84de6cbe01bebe1fe774
2019-10-09 12:36:11 -07:00
Volker E dce5173703 Remove IE 6 & 7 hacks
Bug: T234582
Change-Id: I5208a57ab3b1b95e97ca8a0d3d9c1df6c57ebc3b
2019-10-03 19:05:38 -07:00
Roan Kattouw 83f8949dc5 Stop exporting wgWikiId, use wgWikiID from core
Update usages of the variable for the capitalization difference.

Depends-On: I4d289267991f1f9a8e0710ec6ee5a2131306c510
Change-Id: Ie49e898b33765aa0723501be8c0c30622e7cbd2f
2019-09-25 18:14:40 +00:00
jenkins-bot 30dbae4c02 Merge "Render HTML in notification snippet" 2019-08-21 08:11:28 +00:00
shivanshbindal9 2406462c01 Render HTML in notification snippet
The HTML tags are not parsed in notification snippet.

Bug: T226130
Change-Id: I94cd63d351ac034d80b58a934a823aa0efe18cf5
2019-08-20 23:54:15 +05:30
Kosta Harlan 2a4fde702a Use utility functions to improve code readability
Change-Id: Idf39028d41293b33153254f7648babc3a0cb2b82
Follows-Up: I8cdeb9ee920d3ec943e270eb00a6ef7f3a7449e2
Bug: T226127
2019-08-16 22:25:51 +02:00
shivanshbindal9 8821563955 Add unseen class to alert/message icons
When there are some new notifications during polling,
the unseen state of alert/message icons does not change.

Bug: T226127
Change-Id: I8cdeb9ee920d3ec943e270eb00a6ef7f3a7449e2
2019-08-16 20:32:11 +05:30