kolibri: PDF Pages height are not rendering dynamically
Observed behavior
Issue observed while testing #11145.
When a PDF is rendered, the height of the first page to be rendered is used, and this height is used for all other pages. The problem is if there are PDFs that have pages with different heights, for example, if there are some pages in landscape and others in portrait.
When a landscape page is the first page to be rendered, the portrait pages overflows its height and renders on top of the following page:
When a portrait page is the the first page to be rendered, the landscape pages present a big gap between them and the following pages:
This issue is because we use a virtual list for rendering the pages list and render the pdf pages on demand. But this component renders a fixed-size list, which takes the same height for every list item.
Expected behavior
The PDF Renderer list should render a dynamic-size virtual list. We can do this by keeping the vue-virtual-scroller
library or installing a new library that allows dynamic-size virtual lists.
Steps to reproduce
Import the Kolibri QA channel (import token nakav-mafak), and open the “PDF page orientation” resource.
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 15 (15 by maintainers)
Alright, thanks! I’ve drafted a PR #11671 . Currently I’ve done some code changes to upgrade to vue-virtual-scroller
v1.1.2
usingRecycleScroller
. I’ll try to look into implementingDynamicScroller
.Oh, there’s nothing to apologize for, take your time. We all have our things to do and you are taking a little of your time to help us! So thank you for that! 👐 No rush =)
Yes! That’s it.
Yes @ThEditor , you can import our QA channel as explained in this comment. Let me know if you have any issue!
I had forgotten too!! 😄 Great. No rush on this though 😃 if you’d like something to work on through the end of the year and this seems fun - it would be great for you to work on. But if you have other things to do that you’d rather focus on, that’s okay too. We might be able to get this into one of our planned patches for 0.16.x though, which would be great. Thanks, @AlexVelezLl !