This will solve multiple issues with the design having to overcome
the theme-based design for the #p-tools.
Bug: T156080
Change-Id: Ibfcdfeea649e566059fd88485e146fbad2201016
Replace color of read notification background
in notifications list with Base 80, also
slightly increase opacity of timestamp to
be more visible.
Bug: T78594
Change-Id: I93e26a9eb7e01a8b46bcac8b7ed72ddf06a63f30
Align SVG markup across Foundation products by:
- unifying XML declaration,
- removing unnecessary `standalone="no"` attribute as it's default,
- removing all `g` group elements where applicable,
- bringing attributes in order,
- removing unnecessary ids and
- unifying whitespace.
Bug: T178867
Change-Id: Id3799a46c14f793636ca9bca3ad0f642466ed5a0
We have to override 'position: absolute' and increase the specificity
of the selector to override 'display: block'.
Bug: T178439
Change-Id: Icd09e8302f124524779553eae3536d875f2e1227
Avoids any scroll-based DOM changes which slow down scroll events.
Removes floating in browsers without sticky support (mostly IE).
Change-Id: If75e2a90d76644296fe3db5ef8bd9b26de4e7b0c
Fixing CrossWiki-/BundleGroup layout after OOUI button height,
which is used as header in this case, has been increased.
Also removing `border-bottom`, `box-shadow` and
`border` of next item respectively notification footer are
sufficient and result in the groups being less crowded.
Bug: T177723
Change-Id: I18c0caea2438399d6f97e59c47177691cb43816d
Replacing vendor prefixed `box-shadow` with LESS mixin out of
mediawiki.mixins.less. This also removes obsolete `-moz-box-shadow`
saving some bytes.
Change-Id: I336ee7340bc518fef74762a8381495265dd3eb4b
The current initial message in the button label is "Alerts (x)" or
"Notices (x)" but when the badge loaded, we changed that to only show
the rendered number. This is inconsistent; the badge should always
update the label properly, even if it's not visible in most cases.
Bug: T173970
Change-Id: I6a5e13fc36ddb1bf467c712fcf49af3b18e582d0
Docs (especially in EventPresentationModel.php) say true means outside
the menu, false inside.
However, it was interpreting any non-undefined value as true.
Change-Id: Icb438538e5c588c1ac7d4bbac0b762dd07057199
'Destructive' color was updated in WikimediaUI color palette to
ensure WCAG 2.0 level AA conformance with both, white and black.
Due to WikimediaUI Base not in central place we still have to care about
this manually.
Change-Id: I7402ef64b1aa28c2cffeb9bca2804b1dfbecec42
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
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
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
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
To support accessibility, make sure the titles in Special:Notifications
are <h2> headings.
Bug: T149955
Change-Id: I4f15694efb04896e9bd7b026d297891047759644
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
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
The event should fire after the count actually changes in the
DOM as well as the internal workings of Echo.
Change-Id: I03f1742b209305080af8784632f07dff63135d81
* 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
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
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
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
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
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
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
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
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
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
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
$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
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
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
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
Added the following Javascript hooks:
* ext.echo.notifications.beforeRender: Firing before a group of
notification widgets are rendered, whether in the popup, in
the special page, or in a cross-wiki bundle (which requires
async loading)
* ext.echo.badge.countChange: Fired when the badge count changes
with the notification type, count and the label count for
display purposes.
* ext.echo.popup.onInitialize: Fired when the popup is opened and
after notifications were fetched, with the context of the popup
notification type.
* ext.echo.special.onInitialize: Fired when the special page is
ready and notifications were fetched. Note that it will be fired
whenever the special page is updated with notifications list,
as well, like when changing filter, remote wiki or pagination.
The hooks were also documented in hooks.txt
Bug: T146296
Change-Id: Ie3dc97f97e8d1f90b67f62fcdc65dd29cb379aad
Introducing stylelint with configuration rules compliant to
Wikimedia CSS Coding Standards 'stylelint-config-wikimedia', nullifying
some for now and making majority pass.
Change-Id: I2c4acee41c9b56d9b00e2a2c5b7ab0ab5de454ce
Unfortunately there's no generic support for using colors for icons in
OOUI yet, so we have to copy what OutlineOptionWidget does and
override setPressed()/setSelected() to add/clear the progressive flag.
Also reintroducing colors for text which are aligned with icons on
the different states and use transitions.
Change-Id: I07cf4011d28c1db4eefb451367e29c271b5efaeb
After Id1312fee5bb of OOjs UI got merged, we have to reintroduce
`highlighted` and `selected` states background color manually as
it caused issues on simple OptionWidgets.
Change-Id: I3fe7a4d2577bd1bc0fd258bc977b3539e268a84e
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
Due to pixel rounding errors when relying on `em` as base size unit,
the circle isn't always perfectly round and as a result /not/ a circle.
Adding `min-width` and `min-height` ensures the intended layout similar
to Ie61e7303e446 in OOjs UI's ToggleSwitchWidget.
Also aligning `:hover` unread color to OOjs UI progressive button's
`:hover`.
Bug: T141504
Change-Id: Idf130947e8e61a68819e3ac9ba3cb1e105e65370
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
- 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
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
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
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
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
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
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
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
- 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
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
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
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
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
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
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
Allow extensions to add dynamic actions that perform some
API request and display a confirmation message.
Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
Work around new styles introduced in oojs-ui in I77cd5212c.
Bonus: remove useless styles targeting the dotdotdot popup
in NotificationItemWidget.less: it's not even a popupWidget
any more and it's located in an overlay anyway, so these
styles didn't do anything.
Change-Id: Ifb16b7bb0b01c1eb2551ba4c173042cc759e9b02
Just like we do in the mobile popup, the menu should be accessible
in mobile clicks/taps by being "stuck" at the bottom of the screen.
Bug: T142013
Change-Id: I730216e717c2a02ad98bbcc28f66b13c1cbe29ed
In the unseen notifications case, Monobook used badges with
black text on a light red/blue, even though the text
is white on grey in the non-unseen case. Change the unseen style
to white on dark red/blue like Vector, and also make the colors
exactly the same as Vector.
Change-Id: I9d2d1a2614ac1130e027fb952c9288588d25d495
Do not emit sortChange for toggleSeen, because every sortChange
creates a fake widget with a flipped 'read' state. There is no
reason to emit the sortChange event in toggleSeen anyways so it
is safer when only emitted in togglRead.
Also, make sure the controller always updates the correct seenTime
from the API when fetching local notifications. This was done for
the special page method but was overlooked for the fetching of local
notifications. For the most part, it shouldn't be affecting too much
because the SeenTimeModel is initialized with wgEchoSeenTime (which
is local) but updating the controller with the API response is the
safe thing to do, and will also cover cases where a tab was open,
notifications were seen in a different tab, and now the popup was
reopened in a "stale" tab again.
Bug: T143067
Change-Id: Ie261e32db28926d04fe14f7badd9d287ddc52749
We have to override a CSS rule that tries to make all <a>s blue,
but not override it so powerfully that the real link in the footer
notice isn't blue.
Change-Id: I5a91419aab7cf6d6fe10c8e707168b52c2451cd8
Adds common bundling including messages and icons.
Bundling relates to revision now.
Changed order how notifications are generated. Now errors will
show first, since they are generated last.
Bug: T140224
Change-Id: I1069aeb5523db8710da4e8e21065bf447d031e3c
Seems to be fixed by different changes, and now this change
is causing trouble, moving the badges up off-screen.
This reverts commit 0b7f8712a9.
Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
What this really does is:
* Change the forced width of the <a> to the width of the icon
(rather than 1.25x the width of the icon)
* Change the alignment of the :before from 40% to 50% so it
stays in the middle (1.25*40=50)
Change-Id: I0399a20fc84e59fcbcf69da509a4d8bfa9b54a08
The color: transparent; hack was being overridden by a color rule
that's only in effect after the popup is opened.
Change-Id: I2f415619603ccadb625ed2482c25fde78765fee4
It's a lot easier to set 'color' back to the desired value than 'font-size'.
As an amusing side-effect, the hidden text will appear when selected, and
it will be possible to copy it.
Change-Id: I7a7ef8e60f514743c9cb65bcef3ba4e869f5b7b7
I think everything works the same. Some older browsers (IE 10-11,
Opera 12) have funny issues with SVGs in 'content'.
.mw-echo-notifications-badge now has 'height: 24px', as it must be
at least as high as the background to display it. We no longer need
.oo-ui-popupWidget to have 'margin-top: 7px', that was a workaround
for the badge having smaller dimensions in CSS than in reality.
This also allows us to significantly reduce the amount of Monobook-
specific CSS, because we now use the background-image approach for
all skins.
Bug: T142042
Bug: T142248
Change-Id: Iaa22202dbd5b5eb7a9b1ef47d068e80764ed982f
The actions logged:
* Popup: Mark all notifications in the popup as read
- Event ID is omitted
- Context 'flyout'
* Special page: Mark all notifications in current wiki
as read
- Event ID is omitted
- Context 'archive'
Bug: T127955
Change-Id: Id7c091f9e0cf0dd3745d33e335ab44706581d7f3
When we mark an entire bundle as read, we don't care if it was opened
before or not - we call the API for the list of sources and their items
and build a list of IDs to mark as read in the remote source.
Then, we make sure that bundleIDs are expanded, added to that list.
Previously, we then sent those IDs to 'markCrossWikiItemsRead'
which marked the item IDs in the remote wikis as read.
markCrossWikiItemsRead is also expanding item bundle
IDs (correctly, because we also use it when we mark individual
xwiki items, and they should be expanded)
However, in cases where we mark individual xwiki items, the
model list is already filled, so markCrossWikiItemsRead trusts
the models to deliver the sub items (and then expand on their
IDs properly)
In the case of marking an entire xwiki bundle as read without
opening it first, however, that operation is not only redundant,
it produces a problem where the models were not yet filled
(because the xwiki bundle wasn't opened) and so we get empty
array of IDs, and the API has nothing to mark as read.
The solution is simple in this case - skip this method for working
with an entire bundle. It's both a redundant operation and the
wrong model to check. Send the information directly to the API
instead.
Bug: T142143
Change-Id: I4ed3bbc5c83290ed5791060b124840b1c3b12a75
This fixes a bug where changing the read status of any notification
in the messages popup would remove the "You have new messages"
banner even though there are still unread talk page notifications
in the alerts popup.
Change-Id: Ic6b3d2c9fa764be2da8f9bd9b0d10311857f8509
A browser bug causes the badges to be pushed down by 1em in IE11
and below, but not in Edge. The only way I could find to work
around this was to add top:-1em; in IE browsers using CSS hacks.
Bug: T142053
Change-Id: If240f7281dd795085c003af524da294d5bf5ff76
Not sure why it's doing that, because the SVG has explicit 24x24
dimensions, but adding these (theoretically unnecessary) CSS rules helps.
In Chrome/FF (as well as more modern IE versions), this is a no-op.
Bug: T142042
Change-Id: Ibb293f453dc79de90690ab48f522e43d3e66b8e8
Foreign notifications, though non-expandable, can represent
bundles (4 new topics on your talk page). When marking one
as read, it's important to provide all the IDs that are
part of that bundle. Otherwise, only the dynamic base is
marked as read and the bundle shows up again on reload
(3 new topics on your talk page).
For bundles that do not include the count
(The description on Flow_Page was edited multiple times)
it looks like the mark-as-read action did not work.
Tagging with T140309 as it may explain it but not 100% sure.
Bug: T140309
Change-Id: I19c9eb18669b7cad8173c966392a6e5977018121
Make everything a little smaller, decrease spacing. In order to
make the icons smaller, we had to override the content: url(...)
into using background-image with sizing.
Bug: T141923
Change-Id: Icacb15871c824ae845acc937973fb230b05b489a
Make it optional through the unpgrouppages parameter, so that
generic usage of the unreadnotificationpages API is still possible.
In the front-end, store which display title maps to what set of titles,
and pass in the full set rather than just the display title when
filtering by a page.
Bug: T137502
Change-Id: I443ca00ff5e5d36fd6910101226358942e6aa8ee
For mobile view, only display 1 prioritized action in the items,
and for general desktop view, stick to the default 2.
Bug: T141788
Change-Id: Ibf386ee598553ecfb717f07f02688034bbc338c8
The fade in/out animation is asynchronous. This means that if we are
sorting multiple items one after the other, by the time the item faded
out, it will be reinserted back into the wrong position, breaking the
sorting.
This also broke the promise of OO.SortedEmitterList whereby all its items
are always in order.
The way to fix this was to force a better synchronization with the item
order while we hide and show the item in its new place. To do that,
a new widget is created as a fake clone of the old one, in the original
position of the old one. The original item is then reinserted (while hidden)
to the proper location -- preserving order. The fake clone is then faded
out, and the real item is then faded in.
For this to work properly, the cloned item had to preserve some of the
original item's information, like timestamp, foreigness and id. However,
since both the real item and the fake new clone have the same details,
the clone fakes its ID by adding a fraction to it - promising that the
fallback in case of equal timestamps (which happens on the real and
cloned items) will still resolve with some decision about the placement
of the items rather than (falsely but understandably) decide they are
both the same.
Since this whole animation is somewhat of a hack, the list now has a
configuration parameter to turn the animation on.
The animation is on in the popups, but off in the special page.
Bug: T141419
Change-Id: Ic7c35e5ddefc51bf7fde497eab36414b4dddcd9e
Adds new notification type and icon for successful mentions.
Complements existing test to consider successful mentions.
Bug: T139623
Change-Id: I7a77b40e8b14c95cadb9023065ee916247feacf9
- Adds global "$wgEchoMentionStatusNotifications"
to activate mention status notifications.
(must be set before extension is loaded)
- Adds notification types and icon for some basic mention
failures.
- Adds failure and stats for anonymous IP.
- Adds check for links to user subpages.
- Adds config var for max mention notifications allowed.
- Bundles notifications.
- Refactors test for the event generation and adds tests
for unknown users, user links with subpages and failures
for too many mentions.
Bug: T136326
Change-Id: I388bdc3714feb9a2865a5ad10dbeabb0a6a09a4f
* Add ISO 8601 date format to notification output
This is actually supposed to be the only output date format used,
per https://www.mediawiki.org/wiki/API:Data_formats#Timestamps , but
I'm not doing anything to deprecate the others right now.
* Change wgEchoSeenTime to use ISO 8601. mwgrep and extension grep do
not show any usages. However, since it is a breaking change, to
minimize disruption, I'm also using this opportunity to change
'message' to 'notice'.
* Remove wgEchoInitialNotifCount. I was going to also change 'message'
to 'notice' here too, but then I saw it was totally unused.
(It was read in Echo to populate a JS variable, but then it was
unused.)
* Make sure the Special:Notifications page aggregation by days is
done by local days, even though the timestamp per item is still
UTC. This is to make sure the days are displayed correctly in
the local timezone.
* Change all reverse sorting callbacks to handle comparisons of
ISO 8601.
Bug: T141413
Change-Id: I20271345c7d350dc3e7f467288e5cdc98e6250cc
Now that we have the cog menu, it should be placed correctly in
mobile and the "preferences" link should be hidden.
Since MobileFrontend doesn't have the personal toolbar, and we
can't cheat by using jQuery and grabbing the url of preferences,
we have to get SpecialNotifications.php to output the urls
to a wg variable and reading it from there.
Bug: T115528
Change-Id: I6a69823d6f75c376c04e9a21d79916321e417178
Bundles only have a header, no body, so when we include excerpts
in bundle headers, we wrap them in <em> tags. This change
makes these excerpts the same color as the excerpts in the
non-bundled case.
Bug: T139960
Bug: T141034
Change-Id: I6a14274b42ba672ab1366c0dd106ea0847db6404
As pointed out by Roan, this is the consistent way ooui elements
are displayed when they have a drop-down menu.
Change-Id: I36ecdd4cf6374dff34be15b24959548887788130
Alert popup can now also have talk-page related notifications, so
we should make sure we listen to 'allTalkRead' event when it is
updating as well.
Bug: T141047
Change-Id: I1317efc63b503bd1a55734ebe377ff4c617fe485
And change all CSS and JS dependent calls/tags based on the new
tooltip message and ID of the personal tool <li> item.
Change-Id: I136fabe5710f90da10eb8d4afe92acdb77571eec
Add a global-wiki 'mark all as read' to the Special:Notifications page.
The 'mark all as read' will makr all notifications in the given
wiki. The context of the wiki changes when filters are chosen,
and so the message of the button changes as well.
Bug: T115528
Change-Id: Ibd9dcdf7072d6cbc1a268c18e558e6d0df28f929
As a first step for mobile support, make the page responsive,
hide the sidebar, and slightly adjust button/title positions and
sizes so they fit in a small screen.
Bug: T140687
Change-Id: I98f264948a57924f6370a861381456ce9c82f8d8
When there are only foreign notifications, marking them all
as read empties the flyout completely. With this change,
we now show the placeholder widget with the 'no notifications'
message instead.
Bug: T132202
Change-Id: I7ee38b160ca03c08711670a3296ba4ab45a5eb6c
We need a fixed-width CSS table with a number of fixed-width
cells and one cell that takes up the remaining width, with
text truncation. This is a pain to do with CSS tables,
but this trick I found on StackOverflow[1] works well:
wrap the contents of the cell in a div that's position: relative;,
containing another div that's position: absolute; width: 100%;
[1] http://stackoverflow.com/questions/7569436/css-constrain-a-table-with-long-cell-contents-to-page-width
Bug: T140349
Change-Id: I507f915f06185c767d7a5c8edbff6c341e07b6e2
When we are viewing a certain read state filter ('read' or 'unread')
the visibility of items should correspond to that state even when
the user marks a specific item as read/unread. That means that the
system should remove these items from view when the action is taken.
In this commit:
* The controller makes the judgment of whether to remove items when
read/unread action is taken, based on whether a filter is set.
* We clean up the terminology of discard - no more 'remove' - to
make sure we have consistency in the code.
* Related: The 'discard' event is now scoped within the hierarchy;
meaning, lists emit 'discard' when an item is removed, grouplist
emits 'discard' when a group is removed, and the manager emits
'discard' when an entire notification model is removed. This
means we can actually have proper hierarchy and organization with
a single event, and not worry about clashing between the intentional
'discard' action and the event 'remove' that is also used while
resorting happens.
* The model manager emits a discard event when a model is removed
so that the general list can listen to the manager and remove an
entire batch of items if needed.
* The pagination model now updates the count for the current page
rather than some vague notion of the last page. This is also
updated when the controller removes items, so we can get an
accurate count in the page for the number of notifications that
are displayed.
Bug: T136891
Change-Id: I247c618042ef256fadf09922f7b83bd1ad361f64
This organizes the operation of seenTime so we can store and
follow up on it based on different sources, as well as update
it correctly remotely when needed.
Change-Id: I629ecfc84999be998b45c9c7adb00ea7e3e51742
This would make the wiki names localized to the current user
interface language, rather than the wiki language.
Bug: T139807
Change-Id: I2b787e1486819d6833e169ac6db519cd36a3c3eb
The message for tooltip-pt-notifications-message was removed to comply
with the new naming. The problem is that in the back end, sections are
still defined as 'message' vs 'alerts' and the sections in the user
toolbar are defined with those terms. In no-JS mode (which is before
the user clicks any of the badges) this tooltip is created automatically
by MediaWiki based on class names.
It's easier to return the message key with different text for translation
and wait for the bigger tech debt to correct all instances of 'message'
to 'notice' (including in the API, which would require a much more
massive work)
Bug: T139520
Change-Id: I6368b63e38f64aa065f2580df812de1c63a93716
We need the API to return the notifications for the special page
in timestamp order and not read/unread order, so that the 'continue'
value is still correct.
On top of that, if we have many unread notifications, they should
still be placed according to the dates, so the API must bring back
proper result.
In this fix, we add 'unreadFirst' to filters, and only use that
filter when needed (namely, in the popup)
Bug: T136885
Change-Id: I3018d09b009d735402d83074a5ffcd14ea1c242a
When we fetch the pages per wiki, the API returns an object that
defines the local wiki we are in as its dbName; this then gets
stored into the model as the source, which forces us to check against
the dbName whenever we want to perform an operation so we can tell
the API layer to fetch and perform the actions locally, rather than
use a foreign API.
The term 'local' makes no sense for naming the model (and upcoming
tech debt work will fix this) but it makes sense in the context of
the API layer -- and hence, the source name should follow suit.
This fix makes sure that the local wiki objects always have their
sources defined to be 'local', and thus making us use the test for
dbName in very specific points (when we get the data) rather than
throughout the codebase, randonly.
This is also the first step to allow proper updating of things like
seenTime accross wikis, especially in cases where we view a remote
wiki as if it is local (in the Special:Notifications page)
Change-Id: I94633a1cd074580cbc5029d7c75d179e908e5c52
Instead of 'cheating' and externally aggregating the itemUpdate event
we should just let the relevant (non-xwiki) models aggregate this
centrally and properly, and include it as an offered event.
Change-Id: Ibe528fe971e1be8309a97275b1a1be8979306ff5