DDMAL / CantusDB

A new site for Cantus Database running under Django.
https://cantusdatabase.org
MIT License
5 stars 6 forks source link

On pages with lots of results, show a "loading" message #895

Open jacobdgm opened 1 year ago

jacobdgm commented 1 year ago

On search pages and other pages for which database queries take a long time, it would be considerate to show a "loading" message to users as we work on fetching the results.

lucasmarchd01 commented 1 year ago

After spending some time looking into this, it looks like it's possible using ajax but the solution is not so straightforward (unless it is because of my lack of expertise using ajax)

jacobdgm commented 1 year ago

Yes, this is my impression. Certainly possible to do, but it would not be simple/elegant.

Perhaps we could identify a few specific places - the suggestion of chant texts on the Chant Create page, the display of concordances on the Chant Detail page - where there's a significant bottleneck and we could lazy-load just part of the page.

lucasmarchd01 commented 1 year ago

That makes sense. I also noticed that the melody search page displays a loading message while waiting for the results, so maybe we could learn or use something from that code. However, the melody search page isn't set up with a view to handle the data processing so I suspect it will need to be implemented differently (and also means it won't be as easy to implement pagination with #869)