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 / card grid rendering previous items #613

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

ChristiaanScheermeijer
Copy link
Collaborator

Description

When switching playlists pages or using the playlist filters in a wrapped shelf, the cards would render the previous item briefly. This creates some noise in the loading state as multiple page changes occur stacked.

This PR addresses that and also includes some performance improvements. The main cause of the old item being shown was the key being set to the column index in the grid. Because this doesn't change when a new playlist is set as prop, the card doesn't re-render immediately and keeps the previous poster image.

Copy link

github-actions bot commented Sep 18, 2024

Visit the preview URL for this PR (updated for commit 6feac0d):

https://ottwebapp--pr613-fix-layout-grid-impr-9j1v1g03.web.app

(expires Sat, 19 Oct 2024 11:12:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c198f8a3a199ba8747819f7f1e45cf602b777529

Copy link
Collaborator

@langemike langemike left a comment

Choose a reason for hiding this comment

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

Nice optimalisations

Copy link
Collaborator

@royschut royschut left a comment

Choose a reason for hiding this comment

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

Nice one! Although I think you've introduced unused code.

@ChristiaanScheermeijer ChristiaanScheermeijer merged commit dce9f70 into develop Sep 19, 2024
10 checks passed
@ChristiaanScheermeijer ChristiaanScheermeijer deleted the fix/layout-grid-improvements branch September 19, 2024 13:04
This was referenced Sep 27, 2024
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.

3 participants