Page MenuHomePhabricator

Render image previews via RSVG
Closed, ResolvedPublic3 Estimated Story Points

Description

To be able to display the SVGs in the right language, as well as to make sure every quirk of Wikimedia wikis is preserved, add an API function that returns a SVG rendered into PNG with translations in progress applied.

Event Timeline

MaxSem created this task.Dec 10 2018, 10:02 PM
Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptDec 10 2018, 10:02 PM
Niharika added subscribers: Samwilson, Mooeypoo, Niharika.

Let's estimate this today. @Samwilson @Mooeypoo Anything to add to this ticket?

This will also include setting up Docker to use the Wikimedia fork of RSVG won't it? But apart from that, I don't suppose svgtranslate's use of rsvg will require anything specific (i.e. if people are developing locally and not with Docker, they can use whatever rsvg their package manager gives them).

Also: do we set a max-size for the rendering?

aezell added a subscriber: aezell.Dec 10 2018, 11:02 PM

Is this the RSVG we are talking about? https://www.npmjs.com/package/rsvg

Niharika triaged this task as Medium priority.Dec 11 2018, 12:09 AM
Niharika set the point value for this task to 3.
Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.
Glrx added a subscriber: Glrx.Dec 15 2018, 3:03 AM

Patch merged. Staging site not yet updated as we're blocked on T151656.

Samwilson changed the task status from Open to Stalled.Dec 18 2018, 10:07 PM
Samwilson moved this task from In Development to QA on the Community-Tech-Sprint board.

The staging site is now updated with this patch, and PNGs are rendering. Ready for QA.

Please try with small aspect ratios, and large images. I think there's some weird things; might just be me though. :)

Niharika closed this task as Resolved.Jan 16 2019, 1:40 PM
Niharika moved this task from QA to Q2 2018-19 on the Community-Tech-Sprint board.

Works for me. Sometimes images load slowly or don't load at all. I've filed T213140: [BUG] SVG Translate fails to render some images to look at the latter.

Niharika moved this task from In progress to Done on the SVG Translate Tool board.Jan 17 2019, 3:22 AM