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='...'/>

Event Timeline

tstarling raised the priority of this task from to Needs Triage.
tstarling updated the task description. (Show Details)
tstarling added a subscriber: tstarling.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2015, 6:47 AM

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 triaged this task as Low priority.Sep 16 2015, 10:51 PM
ssastry removed a project: Patch-For-Review.
ssastry set Security to None.
ssastry removed a subscriber: gerritbot.
ssastry added a subscriber: ssastry.

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.

ssastry moved this task from Needs Triage to Read Views on the Parsoid board.Jan 11 2018, 9:37 PM
Reedy edited projects, added Parsoid-Read-Views; removed Parsoid.Sep 17 2018, 7:25 PM
Aklapper edited projects, added Parsoid; removed Parsoid-Read-Views.Feb 29 2020, 5:14 PM
LGoto assigned this task to Arlolra.Thu, Jun 25, 6:22 PM
LGoto moved this task from Missing Functionality to Needs Investigation on the Parsoid board.
Arlolra removed Arlolra as the assignee of this task.Mon, Jun 29, 5:12 PM
Arlolra added a subscriber: Arlolra.

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.Mon, Jun 29, 5:14 PM
Arlolra moved this task from Needs Investigation to Missing Functionality on the Parsoid board.
MBinder_WMF closed this task as Declined.EditedThu, Jul 9, 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.