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

fix: consistent max width and padding in settings #3232

Merged
merged 1 commit into from Jul 17, 2023

Conversation

deboer-tim
Copy link
Collaborator

What does this PR do?

Currently, each settings page has different maximum width and alignment. Most page are always full width; proxy/registry are centred after a max width; auth is left justified after a max width.

This fix makes them all consistent: full width on smaller screens, and when the width gets over 905px (*) they are centred.

Had to fix the proxy page a little b/c it was using block elements that don't expand correctly.

(*) Why 905px? This is the current sweet-spot where the Settings > Resources page just has three columns. The built-in sizes don't quite work: max-w-screen-md is too narrow and a couple pages like resources look squished; max-w-screen-lg is really wide and simpler pages like proxy and preferences are stretched.

Screenshot/screencast of this PR

Before:
https://github.com/containers/podman-desktop/assets/19958075/892470f2-048d-469c-b458-0fbcf4b9d605

After:
https://github.com/containers/podman-desktop/assets/19958075/1d1810a6-38a1-4c6b-a4ed-1fd8f44830d0

What issues does this PR fix or reference?

Fixes #3230.

How to test this PR?

Go to each Settings page with a small width, then make your window really wide and go to each page again.

Currently, each settings page has different maximum width and alignment.

This fix makes them all consistent: full width on smaller screens, and when
the width gets over 905px (*) they are centred.

Had to fix the proxy page a little b/c it was using block elements that
don't expand correctly.

(*) Why 905px? This is the current sweet-spot where the Settings > Resources
page just has three columns. The built-in sizes don't quite work:
max-w-screen-md is too narrow and a couple pages like resources look
squished; max-w-screen-lg is really wide and simpler pages like proxy and
preferences are stretched.

Fixes containers#3230.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@deboer-tim deboer-tim requested review from a team and benoitf as code owners July 14, 2023 18:11
@deboer-tim deboer-tim requested review from jeffmaury and cdrage and removed request for a team July 14, 2023 18:11
Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

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

LGTM

@deboer-tim deboer-tim merged commit 38ec9bb into containers:main Jul 17, 2023
8 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.3.0 milestone Jul 17, 2023
@deboer-tim deboer-tim deleted the settings-align branch February 5, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Odd settings behaviour when window is wide
4 participants