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

fix rendering/calculation of maxProjectsPerRow in homepage #872

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

ToBinio
Copy link
Contributor

@ToBinio ToBinio commented Nov 11, 2023

This PR fixes a weird behavior that sometimes causes too many projects to be displayed

grafik

reason why this happened:
the onMount hock renders the page and then gets called which in most cases results in the container element in which the projects are rendered to be the correct width without any projects being inside them.
There is just the edge case where the height of the projects adds a scrollbar on the side which changes the width of the container without triggering a resize.

this PR fixes this by always rendering one element which forces a scrollbar to be rendered before onMount

@Geometrically Geometrically merged commit 6152eee into modrinth:master Nov 15, 2023
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants