Skip to content

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Jul 1, 2025

Backport of #1227

@backportbot backportbot bot requested review from szaimen and danxuliu July 1, 2025 17:44
@backportbot backportbot bot added this to the Nextcloud 30.0.13 milestone Jul 1, 2025
@danxuliu danxuliu force-pushed the backport/1227/stable30 branch from 6536fc7 to 63f1629 Compare July 1, 2025 18:15
@danxuliu
Copy link
Member

danxuliu commented Jul 1, 2025

/compile amend /

The viewer contents are shown with a bottom margin used to "frame" them,
but the PDF viewer is expected to cover that bottom margin and use the
full height instead.

In mobile devices the viewport height might be larger than the actual
viewport, for example when special UI elements like the navigation bar
are being shown. When that happens, the height of the PDF viewer is
larger than the height of its parent plus the bottom margin (as the
height of the PDF viewer is based on the viewport size, and the height
of its parent is based on the available height), so as the PDF viewer is
vertically centered it ends overlapping the header at the top and being
cut by the end of the page at the bottom.

To solve that, now the height of the PDF viewer is based instead on the
height of its parent plus the bottom margin that needs to be covered.

Besides that, the top margin in the PDF viewer is used to compensate for
the bottom margin in its parent due to being vertically aligned.
Although that works this is now also simplified by aligning the top of
the PDF viewer to the top of its parent.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
@nextcloud-command nextcloud-command force-pushed the backport/1227/stable30 branch from 63f1629 to 713c0ca Compare July 1, 2025 18:18
@danxuliu danxuliu marked this pull request as ready for review July 1, 2025 18:37
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@danxuliu danxuliu merged commit 6856da9 into stable30 Jul 1, 2025
36 checks passed
@danxuliu danxuliu deleted the backport/1227/stable30 branch July 1, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant