-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
docs: document utility functions #13367
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
Conversation
🦋 Changeset detectedLatest commit: c305ef2 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
5349dd8 to
66bbeb4
Compare
CodSpeed Performance ReportMerging #13367 will not alter performanceComparing Summary
|
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.
LGTM! I only left a few non-blocking nits.
| } | ||
|
|
||
| const { width, height, type, orientation } = result; | ||
| const isPortrait = (orientation || 0) >= 5; |
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.
Maybe it's just my lack of knowledge, but why 5? Shouldn't there be a comment to explain this number?
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 agree with you, however I don't know the code either. Maybe @Princesseuh knows
Co-authored-by: Armand Philippot <[email protected]>
Changes
This PR adds more JsDoc to the utility functions that we expose for image services.
I used a LLM tool to generate the docs, and then reviewed them to make sure they seem correct.
I also noticed
resolveSrcwas awaiting twice the same resource in case no.defaultwasn't returned. I changed the code so the awaiting is done once every time.I also slightly refactored
imageMetadatabecause we were throwing an error inside atryblock.Testing
CI should stay green
Docs
/cc @withastro/maintainers-docs for feedback!