-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(logos): support auto-size mode #9191
Conversation
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Thanks for having a look at this. @calebcartwright - in terms of the concept (i.e: "do we think this feature is a good idea?", as opposed to "is this good code?"), what are your views on this one? There is some more detail/discussion in #8372 |
I agree that the auto-sizing feature is a good idea. I haven't looked at the implementation at all so not sure what the current state on this topic is, but my only preference is that this behavior be an explicit opt-in (e.g. via a query param). I say that because it feels like this is relevant in more niche use cases and I don't want to apply it by default as I suspect that would be accompanied with a large number of unknowns |
OK, sounds reasonable. I'll put this one on my list to review the code then |
I've had a look over this. Broadly, the implementation looks fine. I'll leave a few comments inline. We would need to add some documentation for this param. In the new frontend, globally available params are documented in
Other admin: there are failing tests and merge conflicts that would need to be sorted. |
In terms of naming, I'm slightly unsure what the best name for this param is either, but I'm keen to get this right as once it is out there, we're basically stuck with it forever. Some other viable suggestions are Any other maintainers have a view on this? |
I've a mild preference for |
b70a15d
to
bc29d87
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
d544d98
to
b03a4c1
Compare
🚀 Updated review app: https://pr-9191-badges-shields.fly.dev |
2 similar comments
🚀 Updated review app: https://pr-9191-badges-shields.fly.dev |
🚀 Updated review app: https://pr-9191-badges-shields.fly.dev |
b03a4c1
to
0cb2518
Compare
Recognize this has some conflicts that would be blockers, but in general, where did we land as far as our target strategic direction with this one? |
My last comment was
and P-Y 👍d it You good with that? |
Ah yes, it's coming back to me now. This was one you and I discussed synchronously on the team call and I'd intended to comment indicating my 👍 but forgot to do so. Apologies for the noise, but yes indeed, I'm 👍 with that |
0cb2518
to
d83ad1b
Compare
I've resolved conflicts and rebased with the latest code. |
Seems CI is still rather unhappy. One is just the linter, and a quick https://github.com/badges/shields/actions/runs/6156362420?pr=9191
|
🚀 Updated review app: https://pr-9191-badges-shields.fly.dev |
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.
Thanks. I think we've now got the behaviour to expose settled.
I've now had a proper look over the code and flagged some points we'll need to get settled before we can merge. It is mostly quite minor stuff now though.
d4fafe3
to
9eaaddb
Compare
9eaaddb
to
bafc19d
Compare
🚀 Updated review app: https://pr-9191-badges-shields.fly.dev |
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.
Thanks for following up - latest changes LGTM. I've pushed another commit just resolving the merge conflicts on package.json and package-lock.json
Quick FYI. There's nothing you can do to help - its an issue with fly.io - but in order to get things stable I had to roll back to the previous release. I'll try deploying again later in the week, but just wanted to clarify what happened because this was deployed for a bit and then rolled back. |
The JSR logo has been added to Simple Icons since simple-icons/simple-icons#10794. I used the `logoSize` parameter to make the logo fit the badge. The feature was introduced at badges/shields#9191. Currently, we can't use `logoSize` in the response due to badges/shields#10132. So I passed these parameters with search parameters instead.
The JSR logo has been added to Simple Icons since simple-icons/simple-icons#10794. I used the `logoSize` parameter to make the logo fit the badge. The feature was introduced at badges/shields#9191. Currently, we can't use `logoSize` in the response due to badges/shields#10132. So I passed these parameters with search parameters instead.
Resolves #8372
I will add test and documentation once we finalize the idea.
Principles
This
path
was initially wrapped in aviewBox="0 0 24 24"
and centered. We need to reset the position to{x: 0, y: 0}
of the path before updating its viewBox.Notes
The parameter namelogoSize
and its value namecover
may not be the best. Just let me know what you prefer.load-simple-icons.js
andsvg-helper.js
calledloadSimpleIcons()
, we could reorganize the code to improve its performance.New params
logoSize
logoHeight
Previews
pr-9191-badges-shields.fly.dev
previewsProduction previews