Skip to content
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

[stable22] Fix footer not hidden when Talk sidebar is not shown #618

Conversation

danxuliu
Copy link
Member

(Kind of) Backport of #615

The style.css file was no longer loaded since the PDF viewer was
adjusted to use the standard viewer app, so it can be removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the Talk sidebar is shown the footer in public pages is moved into
the "#app-content" element. However, by default the footer in public
pages is a direct child of the body, so this needs to be taken into
account when hiding the footer element, as the footer would not be moved
if Talk is not enabled.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The main content minimum height is set in server styles to the full
height minus the footer height. Due to this, when the footer is hidden
the height of the main content needs to be adjusted to ensure that it
takes all the available space.

When the Talk sidebar is shown the page layout is adjusted, including
the CSS styles, and that main content height is increased as needed.
However, when the Talk sidebar is not shown the height is not increased,
so there is a blank area below the main content. Unfortunately it is not
possible to just set an explicit height, as the needed height is
different depending on whether the Talk sidebar is shown or not.

No matter if the Talk sidebar is shown or not the main content height
just needs to fill the available space, so now this is done using
flexbox. This avoids having to set an explicit height and thus works for
both the standard layout and the Talk sidebar layout. Moreover, even if
an explicit height is set somewhere, like in the server or Talk styles,
the flex-grow property implicitly overrides it and ensures that the main
content will fill the available height.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@skjnldsv skjnldsv merged commit 4759ce9 into stable22 Jun 28, 2022
@skjnldsv skjnldsv deleted the backport/615/stable22-fix-footer-not-hidden-when-talk-sidebar-is-not-shown branch June 28, 2022 08:13
@skjnldsv skjnldsv mentioned this pull request Jul 5, 2022
8 tasks
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.

2 participants