AtlasOfLivingAustralia / biocache-hubs

Biocache Hub UI grails plugin
Other
3 stars 30 forks source link

explore your area, names result is replaced by prior request #603

Closed adam-collins closed 1 month ago

adam-collins commented 3 months ago

When sending multiple names requests from explore your area by quickly clicking on different group names, there appears to be an low frequency use case not handled.

I suspect it looks like this:

  1. name request A has a large response can no longer be cancelled and is in the processing loop.
  2. name request B is clicked.
  3. name request B responds before 1 is finished.
  4. name request B processes and writes the new names list to the DOM.
  5. name request A processing loop finishes and overwrites the names list in the DOM.

Address this with the introduction of a new variable to keep track of the last name request and match this before writing to the DOM. Any existing names list might need to be removed again.

adam-collins commented 2 months ago

No specific test for this other than interacting with the "explore your area" page.

nickdos commented 1 month ago

Couldn't replicate with latest version, so marking as fixed.