laravel / nova-issues

554 stars 34 forks source link

Smart polling #3004

Closed nickkuijpers closed 4 years ago

nickkuijpers commented 4 years ago

The polling feature is very nice, thank you.

What would be nice is that whenever the data did not change in the database, we are not re-rendering the resources so we don't see a flash screen of reloading the resources.

crynobone commented 4 years ago

In order to keep this repository focused on bug reports, we auto-close feature requests and requests for help. Feel free to post your feature requests so others can discuss and add reactions. We'll keep an eye on them for later planning.

stephan-v commented 3 years ago

This would be very helpful. It is kinda of strange to see the screen flashing every time the interval is hit. Services like Sentry also manage to implement polling without refreshing the entire page.

cwilby commented 3 years ago

As this approach requires a web socket server, I think this would be better as a third-party package.

It makes sense given how this was implemented as polling instead of socket notifications.

Considerations for a third-party package:

nickkuijpers commented 3 years ago

I dont think the polling is the issue, i think the issue is that whenever there is no new data, the list gets refreshed. If we can disable refreshing the list when there is no new data received, the problem will mostly disappear.

If we use websockets, the same issue will occur, as the websockets gives us new information to display like the polling does.

cwilby commented 3 years ago

The problem with that approach is the loading spinner is visible while the network request is active. The front-end would not be able to determine whether the loadmask (flash) should be displayed based on data it hasn't received yet.

The solution to this problem is to re-render the UI when the server broadcasts new data to it via web sockets.

It's something I might look into building in the next month or so.

nickkuijpers commented 3 years ago

Ah i understand, thank you for the explanation.

github-actions[bot] commented 3 years ago

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