|Resolved||Dereckson||T68374 Enable Hovercards on se.wikimedia.org (Swedish chapter wiki)|
|Resolved||Jdlrobson||T70860 [GOAL] Graduate Page Previews feature (Popups extension) out of Beta Feature|
|Resolved||Gilles||T70861 Performance review #2 of Hovercards (Popups extension)|
|Resolved||phuedx||T149801 [EPIC] Refactor Hovercards (née Popups)|
|Resolved||ovasileva||T156290 Merge mpga branch into master|
|Resolved||ovasileva||T123445 Add support for RESTBase endpoint consumption|
|Resolved||Fomafix||T68114 Hovercards: Add `lang` and `dir` attributes to the `.mwe-popups-extract`|
|Resolved||Fomafix||T117392 Deliver page content language together with the extract|
Can we use the current page's content language/direction for the popup instead of the one from the API? In which cases would that not work?
I am reopening the task because I want to switch the extension to use RESTBase and it currently doesn't return language details. It simple enough to add but I am want to find out why we need it before I request it.
In the MediaWiki namespace pages can have different languages. With $wgPageLanguageUseDB = true; every page can have an individual language.
For extracting the language code and the direction of the language from the current page see my comments on patch set 5: https://gerrit.wikimedia.org/r/#/c/142481/5/resources/ext.popups.core.js
Whoa! That was really quick. Hovercards hasn't even switched to the RESTBase response yet, and even when it does it should be fine if we don't get that content for a while. So, no need to nuke the existing content.
The changes are live in production. Here's an example: https://en.wikipedia.org/api/rest_v1/page/summary/Coca_Cola
However, we didn't drop all the data we've had in the storage, so now it will get updated to the new format gradually, as the articles are edited (also the response is cached for 1 hour, so update wouldn't be seen right away).