Page MenuHomePhabricator

Parsoid lacks support for mustRender in the non-extension DataAccesses
Closed, DeclinedPublic

Description

For any file type where the handler returns true from mustRender(), such as SVG, PDF, DjVu, etc., the renderer is required to not attempt to link directly to the file in an <img/> tag. For example, for wikitext input [[File:Cross.svg]], the MW output is

<a href="/wiki/File:Cross.svg" class="image"><img alt="Cross.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Cross.svg/32px-Cross.svg.png" width="32" height="32" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Cross.svg/48px-Cross.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Cross.svg/64px-Cross.svg.png 2x" data-file-width="32" data-file-height="32" /></a>

whereas Parsoid attempts client-side scaling regardless of the file type:

...<img resource="./File:Cross.svg" src="//upload.wikimedia.org/wikipedia/commons/8/8b/Cross.svg" data-file-width="32" data-file-height="32" data-file-type="drawing" height="32" width="32" data-parsoid='...'/>

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
OpenNone
OpenNone
DeclinedNone
InvalidNone
OpenNone
InvalidNone
OpenBUG REPORTNone
OpenNone
OpenNone
OpenLadsgroup
ResolvedKrinkle
ResolvedLadsgroup
Resolvedmforns
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
Resolved Zabe
ResolvedDreamy_Jazz
ResolvedLadsgroup
ResolvedLadsgroup
DuplicateNone
Resolved Zabe
OpenLadsgroup
Open Zabe
OpenPRODUCTION ERRORNone
ResolvedPRODUCTION ERROR Zabe
ResolvedPRODUCTION ERROR Zabe
ResolvedPRODUCTION ERROR Zabe
ResolvedSecurity Zabe
ResolvedBUG REPORTLadsgroup
Open Zabe

Event Timeline

tstarling raised the priority of this task from to Needs Triage.
tstarling updated the task description. (Show Details)
tstarling subscribed.

Change 238082 had a related patch set uploaded (by Tim Starling):
Fix support for height parameter and mustRender

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

The patch above fixes the issue only if the batch API is enabled.

Change 238082 merged by jenkins-bot:
Fix support for height parameter and mustRender

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

Change 238356 had a related patch set uploaded (by Tim Starling):
Fix support for height parameter and mustRender

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

Change 238356 merged by jenkins-bot:
Fix support for height parameter and mustRender

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

ssastry removed a project: Patch-For-Review.
ssastry set Security to None.
ssastry removed a subscriber: gerritbot.
ssastry subscribed.

This support is now there in the Parsoid Batching API. If all testing goes well, that will be enabled in production next week. So, the only thing left here is support in the non-batching API. It is unclear how easy it is to do it there, and if the batching API becomes the default, it is low priority to do this for the non-batching API use case.

Arlolra subscribed.

This support is now there in the Parsoid Batching API. If all testing goes well, that will be enabled in production next week. So, the only thing left here is support in the non-batching API. It is unclear how easy it is to do it there, and if the batching API becomes the default, it is low priority to do this for the non-batching API use case.

Since the port, this is now implemented in the extension/ DataAccess but not the others. So, basically the same state as pre-port.

Arlolra renamed this task from Parsoid lacks support for mustRender to Parsoid lacks support for mustRender in the non-extension DataAccesses.Jun 29 2020, 5:14 PM
Arlolra moved this task from Needs Investigation to Missing Functionality on the Parsoid board.
MBinder_WMF closed this task as Declined.EditedJul 9 2020, 6:23 PM

@ssastry et al to explain why this was declined

Previous comments explain that the original gaps in functionality have been long since addressed.

As for the last remaining bit, we don't use the non-extension DataAccess in production and it is an edge case usage for developer testing and there is no reason to spend cycles on this use case right now.