-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop: fixes #7932: PDF preview Pane does not show the whole first page. #8192
Conversation
|
How does it work when the window is scrolled? How does it work when the layout is changed and, for example, the note list is above the preview pane? |
|
Hi @laurent22
when the window is scrolled, the preview pane scroll along. and if you are to scroll through the pages of the pdf, scrolling inside the preview pane handles that.
It responds to the layout change accordingly maintaining the aspect-ratio with min-height set to 35rem as before |
|
I don't feel the way it works in this PR is much better than before. For example the PDF text remains at a fixed size even when the window size increases. How do other apps display PDF files? For example Evernote, OneNote, etc.? If it works well in these apps perhaps we can do something similar |
|
I see what you mean @laurent22 |
Co-authored-by: Kolade Adetoyinbo <koolcollins25@gmail.com>
|
Hi @laurent22 Updated:
Loom video: https://www.loom.com/share/43ea26571c044d1293fe252b810f018a |
|
We understand what you mean @laurent22 But what happens when there are some text right below the pdf media? if we make the pdf viewer take up the entire vertical space, I believe that could lead to some bad user experience, as they may not know there are still text below the pdf viewer. and also around scrolling, when the pdf viewer fills up the entire vertical space, it will be a bit difficult to scroll the note page, until the pdf viewer's page (if it is multi-pages pdf) has been fully scrolled to the last page. In conclusion, reviewing the thread, I believe this did address the issue. However we are more than happy to update as you deem fit. |
|
There was also the question:
Before implementing something, it's important to check what other apps are doing. They already went through the same questions that we have and found answers, so it would be a good idea to compare. |
|
OneNote's rendering process is somehow complex, however, for evernote i am certain they use In fact we should be able to close this issue: #8277 with it. |

Fixes #7932
Problem:
The pdf rendering only assumes the min-height set for it, and wouldn't increase in height even if we have more room for it to grow.
Solution:
Instead of using javascript to handle resizing as suggested by TahaNw, I used CSS vh set to 80 to ensure a part of the note are still visible, and set A4 aspect ratio to ensure pdf scale accordingly
Updated:
view=fithas been added to ensure responsiveness, andmin-height=35remremoved to ensure the preview pane does not contain horizontal blank space when on a small width device.Old Loom video: https://www.loom.com/share/52dffc8a33a949558b3cf39da1db6e58New Loom video: https://www.loom.com/share/43ea26571c044d1293fe252b810f018a
This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.