MinervaNeue/resources
Nicholas Ray 331df226f5 Make Minerva use new PageHTMLParser.js and refactored Page.js
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
2019-07-15 16:43:51 -06:00
..
skins.minerva.amc.styles Tabs: Remove unnecessary flexbox styles 2019-06-18 21:36:28 +01:00
skins.minerva.base.styles Hygiene: extract ToggleList to a reusable component 2019-07-04 13:48:13 -06:00
skins.minerva.content.styles Adding a reflist.less file to hold Template:Reflist specific styles 2019-06-03 14:27:50 +02:00
skins.minerva.content.styles.images Correct search icon 2018-08-14 14:20:00 -07:00
skins.minerva.icons.images Update: add secondary page actions submenu in AMC mode 2019-04-19 14:51:17 +00:00
skins.minerva.icons.images.scripts Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.icons.images.scripts.misc Remove fancy block info popups (move to MobileFrontend) 2018-07-26 23:44:28 +02:00
skins.minerva.icons.loggedin Only load notification icon (bell) CSS for logged in users 2018-04-12 09:27:01 -07:00
skins.minerva.icons.page.issues.default.color Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.icons.page.issues.medium.color Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.icons.page.issues.uncolored Update: page issue icons 2018-07-17 15:54:17 -05:00
skins.minerva.loggedin.styles Remove minerva.less from global import path 2018-05-29 12:19:00 +00:00
skins.minerva.mainMenu.icons Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
skins.minerva.mainMenu.styles Fix z-index issue with button on action=history page 2019-05-27 16:48:09 +02:00
skins.minerva.mainPage.styles Remove large bottom margin at top of main page 2019-01-23 12:10:06 -07:00
skins.minerva.notifications Hygiene: rename "secondary button" to "user notifications" 2019-06-19 11:31:16 -06:00
skins.minerva.notifications.badge Minerva is Hogan free 2019-04-25 10:34:01 +08:00
skins.minerva.options Make Minerva use new PageHTMLParser.js and refactored Page.js 2019-07-15 16:43:51 -06:00
skins.minerva.scripts Make Minerva use new PageHTMLParser.js and refactored Page.js 2019-07-15 16:43:51 -06:00
skins.minerva.talk Make Minerva use new PageHTMLParser.js and refactored Page.js 2019-07-15 16:43:51 -06:00
skins.minerva.toggling Make Minerva use new PageHTMLParser.js and refactored Page.js 2019-07-15 16:43:51 -06:00
skins.minerva.userpage.icons Remove unused userpage icon from repo 2018-02-15 08:36:44 -08:00
skins.minerva.userpage.styles build: Update 'stylelint-config-wikimedia' to v0.5.0 and make pass 2018-12-12 23:26:48 +00:00
skins.minerva.watchstar Make Minerva use new PageHTMLParser.js and refactored Page.js 2019-07-15 16:43:51 -06:00
wikimedia.ui Correct Wikidata icon color in overflow menu 2019-06-18 17:05:26 -06:00