Fetch cross-wiki notifications by asking the local API, but still
maintain the ability to send remote requests to the foreign wikis
for mark-as-read operations.
Bug: T130636
Change-Id: I48524cb9dff43257a401d7483e939edfb042b928
Notifications were being marked as read in response to a click event
in JavaScript, but that causes a jarring effect in the UI, and it's
not reliable (the browser could abort the AJAX request).
Instead, add ?markasread=XYZ to the end of every primary link URL,
where XYZ is the event ID.
Bug: T133975
Depends-On: Icb99d5479836fea25a47451b5a758dd71f642f71
Change-Id: I8047d121584b43e6172463a50ad0e0de5f7fa73c
Removing the info popup because we don't have to show
a privacy notice when linking within the wiki.
This adds a database query to every page view for logged-in
users; If78bfc710, once merged, will fix that.
Bug: T117669
Change-Id: I8451db34ae8e94264e4921ecd6df6e4b32c7623a
min-width and min-height are now set on icons. This breaks the ability
to scale icons down, so override these rules.
Change-Id: I6372f0fe17ccfd853bde497730c49cbcf9f89a41
To implement this, use PopupButtonWidget and override to handle hover
in addition to click.
Bug: T128937
Change-Id: I79f5bb5839491516b0a3f77630b481cd6c2cc3da
If we don't do this, the footer becomes slightly taller
when the image loads, which makes the popup clip incorrectly.
Change-Id: Ica84d704692676d884b847f8fe01c49319f04931
The flyout loads no more than 25 notifications
from a given source. Using those in-memory notification
objects to count how many are currently unread (and
update the badge) produces a result of at most 25.
This patch extracts the responsibility or counting the
unread from the Model/Item/Groupitem structure into
a new UnreadNotificationCounter class. It receives
estimated updates from other components and synchronizes
with the server after markRead/markUnread operations
have completed.
Bug: T129726
Change-Id: I9af4defc00dd491ed2b355eb4e85073476e08ce7
Hover effects aren't the only thing that cause link underlining,
the "Underline links" preference can do this too.
We do still need the :hover selectors too, for specificity reasons.
Bug: T130793
Change-Id: I01c0eaee449470380f3bd752e509043c4580fea9
Followup to I7891eb3fb46b3 this should be merged only after
the changes in MobileFrontend in Ie592ca738ac2d82 are merged.
Change-Id: I0f28e0757170e8a5b12075d3e9a2343fea7e7155
We need to use it in more than just the context of mobile, and
there is nothing actually mobile-specific in it. Renaming the
class so it isn't awkward to use elsewhere.
This makes the ext.echo.ui.mobile module unnecessary, but
we leave it in until next patchset so that MobileFrontend
doesn't crash while we wait for the adjustments in
Ie592ca738ac2d8 to be merged.
Change-Id: I7891eb3fb46b350f0b325bf0a2b56b2cd55ff1d7
Add a mw.echo.ui.FooterNoticeWidget that includes a link to
a feedback survey, and three config variables:
* $wgEchoShowFooterNotice: Enable this feature per wiki
(Defaults to false)
* $wgEchoFooterNoticeURL: The URL for the survey
(Defaults to '')
* User preference 'echo-dismiss-feedback-alert': determines
whether the user permanently dismissed the feedback alert.
(Defaults to false)
Bug: T128937
Change-Id: I918a70beaba7b173e764519fe4fe0f780b61082d
This involves:
* Making this value no longer admin-configurable.
* Changing getNotificationCountForOutput to return only a single value
Since there is no + in the formatted value anymore, we can actually
use the same value for both.
This is a B/C break, but hopefully worth it to simplify the method
call.
For now, the excess parameter is just marked unused. It could be
removed at some point if the translations are updated.
This must be merged at the same time as:
* Flow - Ibfa56b1af9e8c56b4c5f900e0d487bc09688b2a2
* MobileFrontend - Ibf784b279d56773a227ff261b75f2b26125bbb63 (well, MF
can be merged first)
* translatewiki - I2a4b6938aed49e4101deb6b9351c43656a863490
Also, change 1 to One/one, per Siebrand on the task. This can easily
be dropped/undone if we don't want it.
Also, remove reference to no-longer-existent notification-page-linked-bundle
Bug: T127288
Change-Id: Iabeaae747f99980c0610d552f6b38f89d940b890
FloatableElement incorrectly believes it doesn't need to
position itself when its closest scrollable is the same as
the closest scrollable of the container. This causes
the dotdotdot menu to be placed at the top left of the screen
if the notifications popup is not scrollable. If it is scrollable,
everything works fine. This regression was introduced by I5b5d7936c4d.
Work around this by setting overflow-x: auto; on the popup body.
This is a no-op, but tricks OOUI into thinking that the popup
body is scrollable even when it visually isn't. We can't use
overflow-y for this, because we still need to set overflow-y: auto;
on the popup body to work around a Chrome bug where right-floated
elements don't move over when the scrollbar appears.
Bug: T130153
Change-Id: I8bd8a26a4931444a760d2159779240272c51f966
This is to wrap the mobile notifications in MobileFrontend with
a pendingElement and organize the API calls specifically for the
mixed popup in mobile.
Also added a specific 'ext.echo.ui.mobile' module so we don't
load unnecessary files for mobile.
Bug: T124188
Change-Id: I4a8be19a79b9e38c21907bb9d4123540a648c535
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
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
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