Skip to content

Conversation

@dfabulich
Copy link
Contributor

This prevents layout shift on the ballot page.

Fixes #453

This prevents layout shift on the ballot page.

Fixes iftechfoundation#453
@dfabulich
Copy link
Contributor Author

I'm not 100% sure this is the "best" way to do it, but I'm trying to fix #453 in a hurry, and this certainly appears to work on my dev machine.

In particular, this code will run Imager to get the height/width of all cover art every time the page loads. That seems inefficient. But I bet it's manageable, and we can improve performance with a cache in a subsequent PR if we find that the performance impact is too severe.

@coveralls
Copy link

Coverage Status

coverage: 62.02% (+0.07%) from 61.946%
when pulling 9af07c0 on dfabulich:ballot-image-dimensions
into 3550103 on iftechfoundation:main.

@mjmusante mjmusante merged commit eaa64ef into iftechfoundation:main Sep 1, 2025
2 checks passed
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.

Layout shift on ballot page breaks links to Play Online

3 participants