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

When clicking an album it first displays the previous loaded album track list. #158

Closed
FunDeckHermit opened this issue Apr 9, 2020 · 5 comments

Comments

@FunDeckHermit
Copy link

FunDeckHermit commented Apr 9, 2020

It takes about 100ms but was slow enough to notice. I ran a trace in chrome devtools. You can load the .json file into devtools.
Have a look at the difference between 1.4s and 1.48s

The screen first has to use resources to draw the old list before redrawing it with the new track list. This is sub-optimal.

Profile-navidrome.zip

@deluan
Copy link
Member

deluan commented Apr 9, 2020

Yeah, this is a "feature" of ReactAdmin, optimistic rendering, and I could not find a way to disable it.

I'll take another look at it, but any suggestions/workarounds are very welcome :)

@FunDeckHermit
Copy link
Author

FunDeckHermit commented Apr 9, 2020

Setting the visibility of the list container to hidden beforehand and displaying it after filling?
Question is: "When is it done?'
That depends if the data is new or persistent.

@deluan
Copy link
Member

deluan commented Apr 9, 2020

That's a good idea, we have this information: https://github.com/deluan/navidrome/blob/656ca1f3b5b541e43f1a539fe2a3c88836ce46c7/ui/src/album/AlbumShow.js#L25
Will play with this tonight.

Ideally, there should be a property in their <Datagrid/> component that would disable this behaviour, but I could not find anything like that.

I'm thinking of opening a feature request on their repo.

@deluan deluan closed this as completed in 5b488b7 Apr 9, 2020
@deluan
Copy link
Member

deluan commented Apr 9, 2020

Found documentation on how to create a custom <List> component. It'll be part of the next release (probably tonight)

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants