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

chore: reduce width and font size subnavigation #9325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cdrage
Copy link
Contributor

@cdrage cdrage commented Oct 10, 2024

chore: reduce width and font size subnavigation

What does this PR do?

Reduces the width and font size of the subnavigation for Kubernetes and
settings menus (and other components using the UI).

It does the following:

  • Reduces from large to medium font
  • Reduces the width of navigation menu
  • Decreases spacing between the section name (Kubernetes / Preferences)
    and menu items to match similarly to how it was before with large
    font.

Screenshot / video of UI

Before:

Screenshot 2024-10-10 at 12 21 50 PM
Screenshot 2024-10-10 at 12 21 54 PM

After:
Screenshot 2024-10-10 at 12 20 49 PM
Screenshot 2024-10-10 at 12 20 53 PM

What issues does this PR fix or reference?

Closes #9299

How to test this PR?

N/A, minor UI change

Signed-off-by: Charlie Drage [email protected]

@cdrage cdrage requested review from benoitf and a team as code owners October 10, 2024 16:24
@cdrage cdrage requested review from dgolovin, gastoner and SoniaSandler and removed request for a team October 10, 2024 16:24
@cdrage
Copy link
Contributor Author

cdrage commented Oct 10, 2024

cc @ekidneyrh @benoitf @deboer-tim

Comment on lines -36 to +40
leftsidebar: '225px',
leftsidebar: '170px',
},
minWidth: {
leftnavbar: '48px',
leftsidebar: '225px',
leftsidebar: '170px',
Copy link
Collaborator

Choose a reason for hiding this comment

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

not directly related to this PR, but it makes me feeling that maybe the dimension of the sidebar should not be part of the tailwind configuration but of the component or the core (like the color-registry)

where the value are then being injected into the CSS

because if we change the value there, probably that AI lab would have to change it in their fork of the tailwind config while we might think that the width is set by Podman Desktop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benoitf should AI lab plan to change it in their extensions too / implement the navigation bar? i'm assuming it's a separate svelte file for them?

would it be suitable to include the pixel width in the color-registry file so it's easily retrievable like everything else? unsure if this should be a separate PR or not

Copy link
Collaborator

Choose a reason for hiding this comment

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

(it's just thoughts there, that I wanted to share but it won't hold the PR)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh that makes sense. Let's open up an issue regarding this so we can help standardize this. I know we've been discussing webviews as well as subnavigation, so I'm unsure what the result of that discussion may impact this either.

@ekidneyrh
Copy link
Contributor

Looks great! Just one nit - can we center the arrow on the preferences menu item so its inline with the text

image

@cdrage
Copy link
Contributor Author

cdrage commented Oct 11, 2024

Looks great! Just one nit - can we center the arrow on the preferences menu item so its inline with the text

image

Done!

Screenshot 2024-10-11 at 8 53 46 AM

Added top-0.5 and it centered (2px change, which corresponds to the change in font).

Keeping the absolute value in there (not using relative) so that the transitions work fine still.

@axel7083
Copy link
Contributor

In AI Lab here is what it would look likes

Before After
image image

Copy link
Contributor

@gastoner gastoner left a comment

Choose a reason for hiding this comment

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

LGTM

### What does this PR do?

Reduces the width and font size of the subnavigation for Kubernetes and
settings menus (and other components using the UI).

It does the following:
- Reduces from large to medium font
- Reduces the width of navigation menu
- Decreases spacing between the section name (Kubernetes / Preferences)
  and menu items to match similarly to how it was before with large
  font.

### Screenshot / video of UI

<!-- If this PR is changing UI, please include
screenshots or screencasts showing the difference -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes containers#9299

### How to test this PR?

<!-- Please explain steps to verify the functionality,
do not forget to provide unit/component tests -->

N/A, minor UI change

Signed-off-by: Charlie Drage <[email protected]>
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.

Implementation of smaller subnavigation menu
5 participants