67P / kredits-web

Kredits Web UI
https://kredits.kosmos.org
6 stars 2 forks source link

Asynchronously load initial data #106

Closed bumi closed 3 years ago

bumi commented 5 years ago

Currently we show a "Loading data from Ethereum..." message until all the data is loaded. Is it possible to already render what we got and not wait until everything is loaded.

Right now this is especially the problem with new IPFS documents which take long to initialy load.

raucao commented 5 years ago

Anything is possible, but it will require refactoring all of the loading code, as well as deciding what to show for data that hasn't been loaded yet, so it doesn't show false information either. And of course you don't want 35 spinners all over the UI.

bumi commented 5 years ago

it works right now for new events, dosn't it? when a new contributor/contribution is loaded and it is added to that collection it shows up.

we could have one spinner like right now, but one that is not blocking the whole interface.

raucao commented 5 years ago

I'm not sure what you're saying. Everything I mentioned still has to be done and solved.

we could have one spinner like right now, but one that is not blocking the whole interface.

You can have either one or the other. You can't have a single blocking spinner, but not block anything. The events that come in afterwards manipulate existing collections, and there's no loading indicator. Neither is there any data missing in between the events.

galfert commented 5 years ago

Maybe we can show skeleton objects for some elements that are still loading.

fsmanuel commented 5 years ago

We need to redo the loading now that we have pagination. Maybe we can put an ember data adapter together to fetch the records. Not sure how you like ember data but it could help to resolve the relationships...

Am 23.04.2019 um 13:45 schrieb Garret Alfert notifications@github.com:

Maybe we can show skeleton objects for some elements that are still loading.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bumi commented 5 years ago

The sequential loading of IPFS data is a problem and for example right now I can not open the page because it is waiting for this request (IPFS hash of a new contribution): https://ipfs.kosmos.org:5444/api/v0/cat?arg=QmcMFzCHQ9j4gNEFTMwKxbmzEZLP4WJc7zS36HpyLtTS9s&stream-channels=true

also nginx times out after 30(?) seconds but ipfs regularly takes longer, maybe we can increase that timout? @gregkare If we have that timeout the page silently breaks and the "Loading data from Ethereum... " is there forever.

raucao commented 3 years ago

Closing this, since we implemented caching, and asynchronous loading.