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

Feature/virtualize manga grid #363

Merged
merged 9 commits into from
Jun 17, 2023
Merged

Feature/virtualize manga grid #363

merged 9 commits into from
Jun 17, 2023

Conversation

schroda
Copy link
Collaborator

@schroda schroda commented Jun 9, 2023

No description provided.

@schroda schroda changed the title [WIP] Feature/virtualize manga grid Feature/virtualize manga grid Jun 15, 2023
@schroda schroda marked this pull request as ready for review June 15, 2023 22:16
@schroda schroda marked this pull request as draft June 17, 2023 00:43
@schroda schroda changed the title Feature/virtualize manga grid [WIP] Feature/virtualize manga grid Jun 17, 2023
schroda added 9 commits June 17, 2023 16:32
SSR would cause the hook to run once with default values and only after the first render with real values.
This can cause issue on rendering when depending on useMediaQuery results like in 8c129f2
Was required due to the previous load more trigger logic from the MangaGrid.
Due to using Virtuoso now, load more will be triggered only once when the bottom of the grid was reached and thus won't trigger multiple load more requests
Pagination is handled by virtuoso, thus, the previous pagination can be removed
virtuoso requires enough initial items to be rendered, so that actual virtualization takes effect, for it to fire "endReached"
In case the items have a big height difference there is a bug where the scrollbar starts jumping around the moment these new items are rendered
For some reason the UI jumps around when accessing "document.documentElement" during loading more items.
After the items are rendered the loading placeholder gets removed and the previous items jump to the bottom of the viewport.
Info is not needed. The only thing the MangaGrid has to do is to trigger a request to load more data
@schroda schroda changed the title [WIP] Feature/virtualize manga grid Feature/virtualize manga grid Jun 17, 2023
@schroda schroda marked this pull request as ready for review June 17, 2023 14:40
@schroda schroda merged commit 19d27fd into Suwayomi:master Jun 17, 2023
@schroda schroda deleted the feature/virtualize_manga_grid branch June 17, 2023 14:50
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.

1 participant