Page MenuHomePhabricator

Wikipedia Preview debug mode
Closed, ResolvedPublic

Description

Value statement

As a Wikipedia Preview partner
I want to know what Wikipedia Preview is trying to do
So I can figure out why it's not working

Request

Introduce a debug boolean option to the init() function. When set to true or something truthy, the component will output all relevant information to the js console

  • Which content section it is trying to find preview targets in
  • How it is trying to find preview targets (selector vs hyperlinks)
  • For each preview targets found
    • text
    • title
    • lang
  • Anything else that looks relevant for debugging purposes

Update the documentation in the README accordingly

Event Timeline

SBisson triaged this task as Medium priority.Mar 25 2021, 12:52 PM
SBisson moved this task from Q4 FY2020-21 to Kanban on the Inuka-Team board.
SBisson edited projects, added Inuka-Team (Kanban); removed Inuka-Team.
SBisson updated the task description. (Show Details)

PR : https://github.com/wikimedia/wikipedia-preview/pull/108

Screenshot Example : (2nd version, may change later)

image.png (241×1 px, 43 KB)

Jpita added a subscriber: Jpita.

I see 3 wikipedia links found in the console but the article only has 2 links.
Is this expected?
The last link found seems to be in the footer but it is not a preview enabled word.

image.png (1×2 px, 546 KB)

I see 3 wikipedia links found in the console but the article only has 2 links.
Is this expected?
The last link found seems to be in the footer but it is not a preview enabled word.

You are right and this doesn't matter, this is just the example, if you pass the root in the function, then you can have the scope, otherwise it grabs everything on the page.