kirby icon indicating copy to clipboard operation
kirby copied to clipboard

Panel search: abort previous requests

Open distantnative opened this issue 3 months ago • 4 comments

This PR …

Fixes

  • Panel search: previous search requests are aborted when new ones are sent to the backend https://github.com/getkirby/kirby/issues/6409

For review team

  • [ ] Add changes & docs to release notes draft in Notion

distantnative avatar Apr 28 '24 17:04 distantnative

There are now quite a few situations where the search is showing "No results" while there's still a search going on in the background that will eventually deliver results. It feels a bit confusing.

bastianallgeier avatar Apr 29 '24 13:04 bastianallgeier

@bastianallgeier tricky one. I think we cannot work with the current boolean isLoading then but rather need a counter incrementing when a request starts, decrementing when one is finished/aborted. What do you think?

distantnative avatar Apr 29 '24 17:04 distantnative

Yep, makes sense. I also saw yesterday that we need to improve the "no results" part. It should only be shown if nothing is loading and maybe show a "Searching …" placeholder instead if there are no results in the list but loading is still happening.

bastianallgeier avatar Apr 30 '24 10:04 bastianallgeier