Skip to content
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

Layout jank caused by images loading #76

Open
tom-sherman opened this issue Mar 28, 2021 · 4 comments
Open

Layout jank caused by images loading #76

tom-sherman opened this issue Mar 28, 2021 · 4 comments

Comments

@tom-sherman
Copy link
Member

This is especially visible on posts with images.

Next.js' image component can solve this I believe https://nextjs.org/docs/api-reference/next/image

@tom-sherman
Copy link
Member Author

@shaunchurch I think this might require a change to getPosts to attach an aspectRatio property to the hero of a post. We can then use this layout="fill" and object-fit to avoid jank. What do you think?

@shaunchurch
Copy link
Contributor

@tom-sherman Sounds good to me. (Looks like I basically parroted this same thing in the Discord without reading your comment.)

Perhaps we should bring that getPosts stuff under this project instead of using the @static-fns functions I haven't touched in a long while.

@tom-sherman
Copy link
Member Author

@shaunchurch That was a barrier (caused by laziness) for me going to modify the implementation 😅 That library being brought into this repo would reduce the friction for me as an outside contributor

@shaunchurch
Copy link
Contributor

shaunchurch commented Mar 29, 2021

@tom-sherman It's a barrier for me as well!

At the time I had a vision that this project best demonstrates: https://content.nuxtjs.org.

I probably won't work on changing this until the weekend but fully support your or anyone else's efforts and happy to chat about it if useful.

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

No branches or pull requests

2 participants