Skip to content

fix: Small thumbnails not appearing #1335

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

Merged
merged 2 commits into from
Jun 6, 2025

Conversation

aleksanderkatan
Copy link
Contributor

@aleksanderkatan aleksanderkatan commented Jun 4, 2025

To my understanding, the query w=512;1024 only creates two result images if the width of the input image is at least 513, because the only allowed operation by default is downscaling.

@aleksanderkatan aleksanderkatan linked an issue Jun 4, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Jun 4, 2025

pkg.pr.new

packages

pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@1335
pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@405238dbdaab7cc8f65970afb303773efef8932b

benchmark
view benchmark

commit
view commit

@aleksanderkatan aleksanderkatan marked this pull request as ready for review June 4, 2025 12:09
Comment on lines 85 to 93
query: 'w=512;1024',
}) as Record<string, [string, string]>,
}) as Record<string, string | [string, string]>,
R.mapKeys(pathToExampleKey),
R.mapValues((value): ThumbnailPair => ({
small: value[0],
large: value[1],
})),
R.mapValues((
value,
): ThumbnailPair => (typeof value === 'string'
? { small: value, large: value }
: { small: value[0], large: value[1] })
),
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably prefer having a minimum size requirement for the thumbnail size and throw a descriptive error if it's too small. This would guarantee consistent look for the thumbnails

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

@iwoplaza iwoplaza left a comment

Choose a reason for hiding this comment

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

Let's go 🎉

@iwoplaza
Copy link
Collaborator

iwoplaza commented Jun 5, 2025

Also, could we change the base to release?

@aleksanderkatan aleksanderkatan changed the base branch from main to release June 6, 2025 13:08
@aleksanderkatan aleksanderkatan changed the base branch from release to main June 6, 2025 13:09
@aleksanderkatan aleksanderkatan force-pushed the fix/small-thumbnails-not-appearing branch from 47ddb34 to 405238d Compare June 6, 2025 13:19
@aleksanderkatan aleksanderkatan changed the base branch from main to release June 6, 2025 13:19
@aleksanderkatan aleksanderkatan merged commit ebff75a into release Jun 6, 2025
6 checks passed
@aleksanderkatan aleksanderkatan deleted the fix/small-thumbnails-not-appearing branch June 6, 2025 14:59
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.

fix: Small thumbnails not appearing
3 participants