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
fix: auto-scrolling on form pages, layout issues #2927
Conversation
Fixing PR containers#2863 has exposed issues with all of the 'child form pages': - build/pull/run image - play kube - deploy pod - create pod from container Prior to the change these pages were all reliant on scrolling to exist somewhere external and the entire page would scroll. Although it often looked poor in some cases you could always get to the content. Now that we have fixed page headers and no automatic scrolling, these pages need to declare which div to autoscroll on. While fixing this I found that two screens had prior scrolling/display issues, and controls would appear 'outside' of the background panel or partially hidden offscreen. Although they're not directly related it made sense to fix them here so that I could confirm the correct scrolling behaviour: DeployPodToKube - The h-1/3 was causing the height calculation to be wrong and the Deploy button was often hanging off the bottom of the panel. Use a fixed height for the editor instead. PodCreateFromContainers - The minimum width would force unnecessary scrollbars when the window was narrow, and float-right left the Close and Create Pod buttons hanging off the bottom of the panel. Signed-off-by: Tim deBoer <git@tdeboer.ca>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an issue to add overflow-auto everywhere since a couple of weeks. It looks there is something broken as we should have something very simple/ easy but it looks like we're trying to do workarounds everywhere applying tons of styling
Yeah, I was starting to think the same thing. I removed the 'unplanned scrollbars' but now every page needs to say 'auto-scroll this bit'. I think the solution is the same as what I did in SettingsPage: the NavPage should just have autoscroll on the content area. |
Moves overflow-auto 'up' to the NavPage so that all child content automatically scrolls as necessary. Moved top of search bar padding to bottom of title - this helps child pages without search so that there is a little padding under the title (when scrolling the content doesn't look like it hits the title). Most child content divs require 'min-w-full and h-fit' so that the form stays full width but only as large vertically as necessary, made this consistent. Signed-off-by: Tim deBoer <git@tdeboer.ca>
Implemented this. Had to add a few missing |
@@ -46,6 +46,8 @@ export let searchEnabled = true; | |||
</div> | |||
{/if} | |||
|
|||
<slot name="content" /> | |||
<div class="flex w-full h-full overflow-auto"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks better to put it there 👍
What does this PR do?
Fixing PR #2863 has exposed issues with all of the 'child form pages':
Prior to the change these pages were all reliant on scrolling to exist somewhere external and the entire page would scroll. Although it looked poor in some cases you could always get to the content. Now that we have fixed page headers and no automatic scrolling, these pages need to declare which div to autoscroll on.
While fixing this I found that two screens had prior scrolling/display issues, and controls would appear 'outside' of the background panel or partially hidden offscreen. Although they're not directly related it made sense to fix them here so that I could confirm the correct scrolling behaviour:
DeployPodToKube - The h-1/3 was causing the height calculation to be wrong and the Deploy button
was often hanging off the bottom of the panel. Use a fixed height for the editor instead.
PodCreateFromContainers - The minimum width would force unnecessary scrollbars when the window
was narrow, and float-right left the Close and Create Pod buttons hanging off the bottom of
the panel.
Screenshot/screencast of this PR
1.1 - scrollbars generally work, but on some pages always visible/not working right:
Since #2863 - broken, no scroll: :(
After:
What issues does this PR fix or reference?
N/A
How to test this PR?
Open up each page and resize the window too big or too small.