netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.98k stars 2.56k forks source link

SSO icon is not centered when there is no text #17007

Closed mcmehrtens closed 1 month ago

mcmehrtens commented 2 months ago

Deployment Type

Self-hosted

NetBox Version

v4.0.8

Python Version

3.11

Steps to Reproduce

  1. Set the SOCIAL_AUTH_BACKEND_ATTRS variable in the configuration directory to have an icon and an empty string as the text:
SOCIAL_AUTH_BACKEND_ATTRS = {
    "oidc": ("", "https://mehrtens-cc.pages.dev/netbox/netbox_sso_icon.svg"),
}
  1. Restart NetBox.

Expected Behavior

The SSO button shows on the login screen with only a centered icon.

image

Note: in the image, the rulers are off by 0.5 pts due to aliasing.

Observed Behavior

The SSO button shows on the login screen with the icon noticeably off-center, due to a 5rem margin on the right of the icon.

image
mcmehrtens commented 2 months ago

I'd love to fix this quickly myself. I've never contributed to an open-source project before!

mcmehrtens commented 2 months ago

Just want to double-check that I can open a PR for this :)

arthanson commented 2 months ago

@mcmehrtens yes, and thank you. Will assign to you.

jeremystretch commented 1 month ago

@mcmehrtens are you still planning to work on this issue?

mcmehrtens commented 1 month ago

@mcmehrtens are you still planning to work on this issue?

I'm so sorry, yes. I'll do it tonight. I was moving in to a new apartment last week :)