learningequality / studio

Content curation tools for Kolibri
https://studio.learningequality.org/
MIT License
118 stars 168 forks source link

Cosmetic changes to catalog export to PDF #2020

Closed ivanistheone closed 4 years ago

ivanistheone commented 4 years ago

Summary

Two suggestions for the PDF exports form catalog:

  1. Do no squish thumbnails like this:

    Screen Shot 2020-07-24 at 7 11 15 AM

    (the thumbnail looks horizontally squashed)

  2. Do no show stats for content kinds that are not present in the channel

    Screen Shot 2020-07-24 at 7 10 12 AM

Category

Select one: ENHANCEMENT

ivanistheone commented 4 years ago

When I tried to regenerate a report from all channels, Chrome kept working for a very long time at 100% CPU,

Screen Shot 2020-08-02 at 9 47 41 AM

and didn't finish in 10+ minutes.

I then retried with a smaller selection, which worked after about 1 minute: 2020_August_Kolibri_Content_Library.pdf

In the generated report it seems both of the issues highlited above are fixed (thumbanils look un-squashed, and only non-zero content kinds counts are shown), so I'm going to close this issue now.

@rtibbles check the Arabic fonts in the PDF seem smudged but probably nothing requiring immediate fix.

rtibbles commented 4 years ago

Yeah... unfortunately the JS PDF generation library we are using doesn't handle RTL text very well, so @jayoshih had to do some very fancy footwork to get the Arabic text to be generated at all.

I would like to work out how to do the PDF generation in a worker thread, but it requires DOM access, so I'm not completely sure how to handle that.