Page MenuHomePhabricator

Add noexcerpt class to Phonos output
Closed, ResolvedPublic2 Estimated Story Points

Description

The Phonos-containing span/div should have TextExtracts's .noexcerpt class added to it, as suggested by @MusikAnimal in T309412#8166839

Event Timeline

Change 824714 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/Phonos@master] Phonos: Add .noexcerpt to span

https://gerrit.wikimedia.org/r/824714

Change 824714 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Phonos: Add .noexcerpt to span

https://gerrit.wikimedia.org/r/824714

TheresNoTime set the point value for this task to 2.Aug 24 2022, 2:34 PM

I see that the IPA element does not appear in calls to the TextExtracts API (e.g. api.php?action=query&prop=extracts&titles=<title>).

I also setup the Popups extension locally. When hovering over a link to a page using the {{#phonos}} template, it no longer shows the IPA:

Before:

popups_phonos_before.png (384×506 px, 49 KB)

After:

popups_phonos_after.png (354×513 px, 50 KB)

(As an aside, the before screenshot does not look too bad to me. It appears that the Popups extension passes explaintext=true so it does not include the HTML markup we were worried about in this bug.)

However, in production the Popups extension does not use the TextExtracts API but instead uses Restbase. I am not sure whether Restbase will strip out the HTML. I tried setting Restbase up locally but was not successful. Perhaps @MusikAnimal or @TheresNoTime will know more.

However, in production the Popups extension does not use the TextExtracts API but instead uses Restbase. I am not sure whether Restbase will strip out the HTML

I am not sure either. I did a code search for "ipa" and "noexcerpt" across all repos in Wikimedia Services and didn't find anything relevant. It would be great to test how RESTBase handles this before we deploy to production. I imagine the fix, if necessary, should be simple. Pinging @DAbad who might know the answer or tell us who does. I also wonder about the Enterprise API, which is probably is what is (or is going to be) used by search engines. Pining @RBrounley_WMF who might know the answer on that side.

The quick question is: How do we exclude certain things from the RESTBase Page Content and Enterprise APIs? In this case we're talking about IPA specifically, which search engines and page previews don't usually want to display. More info on our project at https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2022/Generate_Audio_for_IPA. Thanks for any help you can provide!

TheresNoTime changed the task status from Open to Stalled.Sep 6 2022, 7:36 AM

Think we might be stalled on T315605#8192405 ?

Think we might be stalled on T315605#8192405 ?

Now that this is on Beta, we can test RESTBase there. It apparently does include the IPA, but so does RESTBase in production, i.e. https://en.wikipedia.org/api/rest_v1/page/html/Hasil%20Adkins. I'm guessing then this isn't something we need to be concerned about. I have no idea about the Enterprise APIs, and am not sure how to even test those.

I have no idea about the Enterprise APIs, and am not sure how to even test those.

I'm leaning towards this task being a "best attempt", which we've implemented, and you've tested — going to close this off as done! :)