Page MenuHomePhabricator

Page media endpoint missing math formula images
Closed, ResolvedPublic

Description

https://en.wikipedia.org/api/rest_v1/page/media/tangent

is missing the images for the formulas embedded in the article, for example:

https://wikimedia.org/api/rest_v1/media/math/render/svg/3c924ec6626c572300b256a28bbb285cc98fe040

On iOS, we cached those images when the user saves the article, so that the full article with formulas is available offline. It'd be ideal if they were added to the items list, and items were given a property to indicate whether or not the image should be included in the fullscreen image gallery (these images would have that property set to false)

Details

Related Gerrit Patches:
mediawiki/services/mobileapps : masterMedia: Always return showInGallery property
mediawiki/services/mobileapps : masterMedia: Add Mathoid math formula image support

Event Timeline

JoeWalsh created this task.May 22 2018, 7:29 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 22 2018, 7:29 PM
Mholloway added a subscriber: Mholloway.

Yeah, I sort of just punted on Mathoid images for v1, but since there's a specific product need now it's probably time to get it done.

Mholloway renamed this task from Page media missing some images to Page media missing math images.May 30 2018, 2:41 PM
Mholloway renamed this task from Page media missing math images to Page media endpoint missing math formula images.
Mholloway claimed this task.

Change 436360 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Media: Add Mathoid math formula image support

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

Change 436360 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Media: Add Mathoid math formula image support

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

Hey @JoeWalsh, the above patch is live on appservice.wmflabs.org:

http://appservice.wmflabs.org/en.wikipedia.org/v1/page/media/Tangent

Does that look more or less as expected?

Mholloway closed this task as Resolved.Jun 4 2018, 8:49 PM

This is live:

https://en.wikipedia.org/api/rest_v1/page/media/Tangent

Please reopen if any changes are needed.

This comment was removed by JoeWalsh.

@JoeWalsh I see you removed your comment but if I understood it correctly I thought it was a good one. Not sure I quite caught your point about web clients but it's true that having a flag that can only be false is pretty crappy for weakly typed clients. Maybe the boolean flag should be present for all entries?

Vvjjkkii renamed this task from Page media endpoint missing math formula images to mhcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Mholloway as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from mhcaaaaaaa to Page media endpoint missing math formula images.Jul 2 2018, 3:57 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Mholloway.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

@Mholloway thanks to the phabricator spam I came across this ticket again. I'm fine either way, I initially thought it was a bug but I hadn't implemented it properly. This sort of thing is something we should standardize across the APIs, and maybe always populating a boolean field makes the most sense.

Change 444744 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Media: Always return showInGallery property

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

Change 444744 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Media: Always return showInGallery property

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

Mentioned in SAL (#wikimedia-operations) [2018-07-11T20:16:33Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@03fa731]: Update mobileapps to b5e152d (T195325 T189830 T177619 T196523)

Mentioned in SAL (#wikimedia-operations) [2018-07-11T20:20:04Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@03fa731]: Update mobileapps to b5e152d (T195325 T189830 T177619 T196523) (duration: 03m 30s)

Mentioned in SAL (#wikimedia-operations) [2018-07-11T22:18:16Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@03fa731]: Update mobileapps to b5e152d (T195325 T189830 T177619 T196523)

Mentioned in SAL (#wikimedia-operations) [2018-07-11T22:25:00Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@03fa731]: Update mobileapps to b5e152d (T195325 T189830 T177619 T196523) (duration: 06m 44s)