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
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
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
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
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
- 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
In a distant future those might be replaced by core WikimediaUI Base
and this is a sane preparation for it.
Change-Id: I8907c8908f3b775be36b16a6782d7e9719e30c4c
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
Adding `aria-label` to the filter widget, with `listbox` role assigned
to allow screen readers parse read the content.
Bug: T244543
Change-Id: I72a4045abe9a7c391ee3fe471ed944d96259b79e
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
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
* 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
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
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
Echo is now in complete control. Cleanup after ourselves.
Change-Id: I9a26c7a88f5e3ff19ec5b17b08a0d05c4f9e60ce
Depends-On: I9a6b06158d9083317aea46510c0c47980a25e50a
Bug: T221007
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
Update usages of the variable for the capitalization difference.
Depends-On: I4d289267991f1f9a8e0710ec6ee5a2131306c510
Change-Id: Ie49e898b33765aa0723501be8c0c30622e7cbd2f
When there are some new notifications during polling,
the unseen state of alert/message icons does not change.
Bug: T226127
Change-Id: I8cdeb9ee920d3ec943e270eb00a6ef7f3a7449e2
New preference added so that user can set
* Displaying (n) total unread count in the title
* Displaying notification snippet for incoming notification
Bug: T229732
Change-Id: I35eb68dedf1e087b4668bfec404935f1244b3d0b
We didn't have any error handling for this scenario previously, but the
recent refactor of this code made it more obvious that it was missing.
Change-Id: I146de3ed2cde1a9bd553fc4825c0e4e06130de65
As now polling is used to update the notification count on header icons.
If there are any new notifications then a snippet containing the header
part of the notification will appear using mw.notify().
Bug: T226130
Change-Id: Id38c8ebedebd4c68b9cef0635043d6f9304784dd
There's no real reason for these to be in MakeGlobalVariablesScript
because they don't really depend on the request context: they were being
omitted if the user was not logged in, but we can just check the user's
logged-in status in JS instead.
Bug: T221151
Change-Id: I2df6d7e061545d342bc3068dccd5ce2f6e85fe78
Remove wgEchoMaxNotificationCount and wgEchoPollForUpdates from the
startup module and put them in the ext.echo.init module.
Change-Id: I03f9a3953aa97ead1a29c13a992a02404a6d0b68
We currently poll for the count of notifications after some fixed amount of time even when the user is not using it.
There is no need to poll at same rate in that case and we can poll at slower rate.
The rate now is decreased by 5 times.
Bug: T227501
Change-Id: Id53a88e0d5659edb0dac77dd3e346e2d88e95f94
* Adds notification count(alert+messages) to the title
* The count is updated immediately when notification count changes
* This functionality is feature flagged(wgEchoPollForUpdates)
Bug: T225259
Change-Id: Ic92c50d9885b0e4325b253338023d37adf8d35d0
Due to using ooui, and a lot of the styles being a lot more generic
in general these days for wider skin support, most of the skin
styles still included with Echo are no longer necessary or may even
be actively breaking things.
Remove a bunch of that, including some of the stuff for T226594 etc,
as we now have a more elegant solution in the skin itself.
Bug: T226684
Bug: T226594
Depends-On: I0ed21a78feb1b1298c30b969a1c80a4323e74043
Change-Id: Id3193a07f023eb0abc30fa24afe10da042fea876
Due to using ooui, and a lot of the styles being a lot more generic
in general these days for wider skin support, most of the skin
styles still included with Echo are no longer necessary or may even
be actively breaking things.
For Modern, basically just remove everything; nothing here seems to
apply anymore. Also frees us up to just fix the badge positioning
in the skin itself, and leave future maintenance up to the skin
maintainers, if anyone cares.
Bug: T226684
Change-Id: Id28bbc01b3b344dfeb39be1380a64c1368924289
A positive text-indent causes horizontal scrollbars, so just hide the
screenreader text by making it transparent, and accept that we're going
to have the hover tooltip issue (T161302) in Monobook.
Bug: T226594
Change-Id: I6cb9ec146c2b469cbfb1fdc57937794d237e46db
In c86a1a5cf, the structure of the badge was changed, and the hack for
hiding the screenreader text in the badge was updated accordingly.
However, the Monobook styles were not updated, and this caused the badge
icons to be positioned off-screen.
Update the Monobook styles for the new badge structure, and use a
different hack for hiding the screenreader text because the one used for
other skins doesn't work in Monobook.
Bug: T226503
Change-Id: I190d2719addfbe50a7108193848bf23eef54bccf
* MVC is used to change the count of notifications on header icons.
* The Widgets are loaded after 60secs or icon click, whichever occurs first.
Bug: T219222
Change-Id: I2d034a76d5c3abe55894dd1dd10e28713344c5bb
Provide visual feedback when focus is set on notification badges.
Also removing outdated `-moz-outline-style` property, which is applied
only in Firefox <= 3.6.
Bug: T186553
Change-Id: Ia523be0f74beb8fc52f8f04a9a7f59d88c7d2082
Now that OOUI's "alerts" icon pack includes all the icons we need, we can use it and get rid of the badgeicons module.
Bug: T139779
Change-Id: I8218530ed2cdd2d81c1fc24509f36ea2b6742bd9
When creating the various notification sources,
the server was indexing them with wfWikiID() but
the client was using wgDBname to find which one
is local and which are remote. On some wikis,
like TWN, wfWikiID() includes a db suffix so
the JS app on Special:Notifications is failing to
find the local source and errors.
Bug: T167336
Change-Id: Id60f723b615fb7db54a6f17b1c1be20dfe98e36c
This boilerplate at the beginning of most files is an anti-pattern from
very early 2011 frontend experiments (I take full blame), where I didn't
understand (or had confidence in) the load order of scripts. I won't
remove it all at once, as that requires careful review of dependencies.
But this one file seemed like low-hanging fruit. The "ext.echo.dm"
contained a file that lazy-created `mw.echo` as empty as empty object,
and `mw.echo.config` as `{ maxPrioritizedActions: 2 }`.
The "ext.echo.init" module loaded on every page already does the same.
Remove this file and depend on that module instead. The same modules
will be downloaded, in the same way, and in the same order as before.
What changes is that the order of execution is now defined instead of
implied, thus making the dm-version of it redundant.
In practice, while fragile, the load order was already consistently
running init before dm. I found this through code coverage analysis in
Chrome DevTools, <https://phabricator.wikimedia.org/F28421786>.
Change-Id: Iaed7cf0e47479ce8ce76aee1bfe479d82b4f61ed
Colours were previously defined only in the monobook- and vector-specific
styles, but with the same styles in each, and appear to work consistently
accross all tested skins (modern, timeless, cologneblue, anisa,
hassomecolours...). Given the UX importance of these colours, better to
apply them as the default for all skins and leave it to any others for
which this doesn't work to resolve any issues on their end.
bug: T181142
Change-Id: Idc22881d6c51aa12adc9a053ce08adfdf0fad2b0
This leads to broken styling in OOUI 0.30, and is only
a marginal improvement in the Apex theme.
Bug: T215509
Change-Id: Id7d000be7c9dcd50e050f067c6f1fbdc06f332af
Selector was set on the element's class, not the icon carrying
pseudo class, resulting in a hard to predict
double opacity application. Also changing default opacity to
WikimediaUI Base values.
Bug: T207542
Change-Id: I1f45e721ee30acfd6261edcbc9d81cf92c7217a3
Fix the regressions from being able to wrap items on narrow screens
in I2102f6d33979b. We don't want wrapping in affected cases.
Bug: T208930
Change-Id: I748d5b455bef15067205b49824386d2ab5dfdc07
This will prevent these requests from being blocked by browser plugins
like Privacy Badger and AdBlock.
I believe this eliminates the last foreign requests in the front end, so
we should clean up and simplify the now largely unused hierarchy of
API-related classes.
Bug: T121930
Change-Id: I74c22514409ad7e206a413306065a0c62d2e793d
Add a markasreadwiki parameter, and use cross-wiki API proxying to mark
the specified notification(s) as read on the originating wiki.
This allows notifications to be marked as read when the primary link is
followed, even if the primary link points to a different wiki.
Bug: T179765
Change-Id: Id7e1e11997173e1578e33cd189dc0f93a5e4ba63
* Move revision ids out of configuration and into MWEchoEventLogging
class. Because the EchoInteraction schema is used both server and
client, we have to duplicate the revision id.
* Use EventLoggingSchemas attribute to register client-side schema in
extension.json instead of a hook.
* Check if EventLogging is enabled in MWEchoEventLogging instead of
$wgExtensionFunctions.
* Pass only whether the EchoInteraction schema is enabled to the
client-side instead of all of $wgEchoEventLoggingSchemas.
Change-Id: I968294f96cedac19dc9d8f53df14fecfb666ceee
The only place that reads the config variable is in ext.echo.logger,
which uses OO.getProp() to do so. If that property doesn't exist,
`undefined` will be returned, which we can force to boolean false.
Bug: T118488
Change-Id: Iac352b133950f6f2e4b88950c1fcd0c893284fd9
This avoids needing any dependencies on EventLogging in the module
definition, as well as allowing the extra dependencies to be lazy-loaded
as necessary.
Change-Id: I49b5be4be4f55cd4e27064247463b2ddb8e81296
Replace the handle with a button widget.
Also remove the unused PendingElement mixin.
Bug: T178387
Change-Id: Iec3afea6c6a8fdb49e17750af7bada42b7ed4b70
Can be removed now that it's been moved to PageTriage.
This reverts commit b59eedd251.
Change-Id: If829148d09cb28f21bd48d5073886b44174b274d
Depends-On: I370391d7460c5b04a5a1ddb2e191f29044b30e5e
Still being used by PageTriage.
The proper solution is to move the icon to PageTriage, but
for now let's bring it back in Echo to unbreak things.
This reverts commit 54f49875e9.
Bug: T191335
Change-Id: If4c709d9932ac0d063f6211c5ddd82846f0f6a6d
When there isn't enough space for both date and button,
separate them each on its own line.
Bug: T146288
Change-Id: I7ad022da82503f35ae630d171faeed1815c97f7a
* Inherit from DecoratedOptionWidget as it comes with
an icon mixin.
* Keep the DOM structure as similar to its parent as
possible, to avoid breaking upstream child selectors.
* To this end, replace <a> wrapping hack with override
of getTagName to set this.$element to <a>.
Change-Id: Ifde70785a1bc996eb09e581b06ed30708323e9f7
* Rename to match their upstream names.
* For icons without upstream versions, fix canvas to 20x20.
* Use consistent suffices to indicator colour.
Change-Id: Ie6252a8ccbba79143a0f77536c6470b4350be1ad
Double-clicking would just recreate the badge midway while it is
being created, and produce 2 popups simultaneously. This patch
ignores the second click in a double-click until the widget is
being replaced anyways.
Bug: T184883
Change-Id: I2fda8df36b3828dbbe0d9b7892f159e598c630bd
https://api.jquery.com/deferred.catch/ Since jQuery 3
deferred.catch( fn ) is an alias to deferred.then( null, fn )
Change-Id: I120ec780c9b008b5e7bf12491fed83ccc8ae2420
Enabling SVGO automation with 'grunt-svgmin' and conservative
plugin settings to build step, among those:
- enable removeRasterImages and sortAttrs,
- disable cleanupIDs, removeDesc, removeTitle, removeViewBox &
removeXMLProcInst and
- don't use multipass.
Also updating SVGs accordingly.
Bug: T185596
Change-Id: I2288c7576ac96f8b5c4d5b8671218fceefaf6037
hideWhenOutOfView is for preventing popups from appearing
outside their container, but in this case the container
is the document, so it is already clipped.
Bug: T178384
Change-Id: Ie0cd83849446cf74b61e708f0a1fa79f2384a94a
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