- In MinervaNeue, https://phabricator.wikimedia.org/diffusion/SMIN/browse/master/resources/skins.minerva.scripts/references.js refers to a ReferencesHtmlScraperGateway.
- Note: Before https://phabricator.wikimedia.org/rSMINd1cd5588215122fb9c45490fffdfa437fa2eae68, two possible sources for references existed, the other one (called "LazyLoadReferences") utilizing the RESTBase endpoint. This was not used any more, and finally dropped mid 2019.
- In MobileFrontend, https://phabricator.wikimedia.org/diffusion/EMFR/browse/master/src/mobile.startup/references/ReferencesHtmlScraperGateway.js fetches a DOM element from the page. This is probably what needs to be expanded to take sub-referencing into account.
The idea is to show the parent along with the sub-reference, so the user can understand the structure. This is the same issue and proposed solution as T239228: Make the ReferencePreviews feature of Popups compatible with BookReferencing for the Reference Previews feature.
Here's an example screenshot of a test page with an opened preview popup for a subreference:
Things to be done
- Identify sub-references when scraping the preview text from the wiki page
- Identify the parent reference
- Scrape content of the parent reference
- Combine both in the preview (TBD by design) see also T239228