This also means we can now get rid of the rlModuleLoader module
and make all OverlayManager routes synchronous form now on.
Depends-On: Iacea45ea5ac7332d61a33041bbd25ea4830e1375
Bug: T214641
Change-Id: I73cb622bbda44f4cfe51d08189419e15003b9d91
The feature got into Beta in over a year ago and never made into
the beta mode. For most of the time it was disabled for all users.
There is no need to keep this code as it is dead code now.
Change-Id: I9037f58b97373195e9d1b9f57789a6c531f42831
The MobileFrontend dependency in Minerva is problematic.
Code that Minerva needs should live in core.
MobileFrontend should load code on all skins when they operate on
a mobile domain.
This eslint check reminds developers of this in a hope it encourages
more upstreaming to core when possible.
Of course disabling is also an option, but this check will at least
make us aware of when we are moving further away from the goal.
Change-Id: I62183c9aefc81053e4ad81fb746decef2dd24b44
Make use of mediawiki.mixins' `.transform()` mixin for widest available
browser support.
Follow-up to I720e62a578f0c7a14f4b5a698004471c85e54bc8
Change-Id: I771a5a6e2020e323bf4cefdb944c26bdcce26ee2
* Remove ambiguity in imports - say the file extension
'less' for all instances of variables and mixins.
* Separate toast styles from drawer styles so they can be
imported separately
* associate header-action selector with its parent
(.overlay-header) not parent's parent (.overlay) so it can be imported
and rendered without the Overlay.
Change-Id: Ib7e19a440ba095d6424d35305fb41d643ca9764c
Help with readability by using module.exports and require rather than the MobileFrontend
provided mw.mobileFrontend module manager (and avoid adopting webpack at this time)
Replace usages of mw.mobileFrontend.require with local require and module.exports
(compatible with RL or Node implementation)
Changes:
* Notifications modules are merged into skins.minerva.scripts and initialised
via a client side check.
* new file overlayManager for exporting an overlayManager singleton
rather than being hidden inside resources/skins.minerva.scripts/init.js
* All M.define/M.requires swapped out for require where possible
The `define` method is now forbidden in the repo.
Bug: T212944
Change-Id: I44790dd3fc6fe42bb502d79c39c4081c223bf2b1
In I02f8645aac1d7b081eaba8f2ac92a2ef51f78182, Page.js was made into a
model and its html parsing responsibilities were moved to
PageHTMLParser. Additionally, a singleton for the current page
(currentPage.js) and a singleton for the curent page html parser
(currentPageHTMLParser.js) were introduced to replace the usage of
M.getCurrentPage().
This commit refactors Minerva to make use of these changes.
Notable changes:
* 🐛 The event bus singleton was added to references.js since it
previously relied on an instance of Skin to listen for the
`references-loaded` event. However, this event is emitted on the event
bus singleton.
* Additionally, I didn't see a reason why the `references-loaded` event
needed to also pass the current page instance when the only file
listening to it is references.js (which already has the current page
instance) so I removed that and the convoluted passing of page.js within
the file. I assumed this logic was unecessary.
* The call to drawer.showReferences in references.js now was made to
pass the currentPage instance as well as the currentPageHTMLParser. This
is to prepare for I6e858bbe73f83166476b5b2c0fdac1cca7404246 where the
getReferences() interface for ReferencesMobileViewGateway.js and
ReferencesHtmlScraperGateway.js is refactored to accept both of these
instances. Additionally, references.js was refactored to support event
delegation which gets rid of some parsing/setup logic.
Bug: T193077
Depends-On: I02f8645aac1d7b081eaba8f2ac92a2ef51f78182
Change-Id: I2f32dbcc4ebaa4bebb297cda1ecce3457922b343
I want to remove the need for M.define in the Minerva repository.
It's no longer necessary with packageFiles and will help tame
a lot of the code we have here!
Change-Id: If6a35a23e84a44adb965fd9c41265ba37eb8368e
Use MobileWebShareButton schema to track interactions with
Additional changes: Fix how button is injected into page actions
bar as last AMC changes broke it.
Bug: T207280
Change-Id: Ie7d7ab6bc66df5ab30aaec77e2ee8583c69b8f48
- Revise M.require( 'mobile.categories.overlays/CategoryOverlay' ) to
'mobile.categories.overlays/categoryOverlay' (lowercase c).
- The category overlay is a factory function not a class. Replace new
operator with function invocation. This only looked strange and didn't
break anything since the new operator uses the returned value if
specified, not `this`, which was the result of the factory function
and the OverlayManager understands both Overlays and functions that
return Overlays.
Bug: T208915
Change-Id: Ife098ee5ed1a8a164a4e31013a490076658f4147
Use the mobile.startup module mfExtend export directly instead of
OO. This will allow MobileFrontend to reduce its exposed API.
Bug: T208915
Depends-On: Idededf132f724176c38c5e0a7c9327f00489a09d
Change-Id: Id582325c830c229240b88cf4e151afea48fea750
Replace all occurrences of `M.require( 'mobile.startup/pathToModule' )`
with `M.require( 'mobile.startup' ).pathToModule`. Where multiple
requires existed, add an intermediate variable,
`var mobile = M.require( 'mobile.startup' )`, and dot off that.
This changes improves the consistency of MinervaNeue which currently
contains a mix of require styles and eliminates any deprecated requires.
Bug: T208915
Change-Id: If14f280672d914d07275197100b12421bb217b67
Migrate View.events to constructor property. MobileFrontend supports
both the deprecated View.prototype.events and recently passing events as
an argument at construction (see dependent patch).
As a client, Minerva doesn't provide nearly so many extensible classes
as MobileFrontend. The classes changed in this patch are no different so
events are not expected to be extended.
Bug: T208915
Depends-On: Ic193e97b4cd6f72d226bd9768e904bdec168ba39
Change-Id: I68923e2dfd4b2f3e3f3de5185e9b65ab0b665ab7
* Add inline exceptions for global selectors
* Exception for $.animate in scrolling code
* Fix $ prefixing in search.js
* Fix repeated selectors in search.js & toc.js
* Disable no-parse-html-literal in tests
Change-Id: Id58fe11d1e09714501a378e4ca7ed9588f02f32d
This patch removes the remaining usages of M.on/M.off/M.emit
(functionality derived from moduleLoader.js in MobileFrontend) in
Minerva and continues the work of
Id990b0e1a53221d5c1cb3e3012aed0e27d801fc2 (patch for MobileFrontend).
This patch and the patch for MobileFrontend should be merged together as
they both depend on eachother.
Depends-On: Id990b0e1a53221d5c1cb3e3012aed0e27d801fc2
Bug: T156186
Change-Id: I005d2fcdbf91c2f1ac98178dfa388aa8174e7530
We are deprecating the MobileFrontend user module. Use the
mw.user module in core instead which supports the same methods.
Bug: T204866
Change-Id: I3d068198ab79fe85823a9d82ef4bd7ca07013d3b
Add a new beta feature - share icon. When user opts into beta
the share icon will be visible on supported devices (Android OS
and Chrome browser).
Bug: T181195
Change-Id: Ie4b9dd05eea9b63422bd174048d8b1251cb02bf4
It's presumed that skin options will eventually become the default or be removed from the skin.
While they are not the default, it would be helpful to package them in one single module - as ResourceLoader
modules are costly bloating the dependency graph in the MediaWiki startup module.
In T167713 we talked about grouping our entry points by page rather than feature, which this seems consistent
with. A page with special options enabled is different from a page without.
Change-Id: Id948f913d4743532ba3442d2059a03c122419ff2