I poked around for a little bit for getting a spinner showing while the grading page is changing problems. Here is a small diff that works, but I don't love the fact that my default spinner (that darkens the whole page) ends up flickering on and off quickly when moving between problems in a reasonable sized class.
I think ideally there would be a little delay to see if rendering can finish quickly, and if it doesn't then show the spinner. The react render is synchronous though, so its not like we can interrupt it.
Best thing I can think of to do is count up the number of expressions we will be rendering and make that a precondition to showing the spinner at all if we think it won't take too long. Also as discussed we can add pagination to this page, or fancy virtual scrolling or whatever like they use in the various table libraries to not fall over when people load a bunch of data.
Here is the diff for unconditionally showing the spinner at least:
I poked around for a little bit for getting a spinner showing while the grading page is changing problems. Here is a small diff that works, but I don't love the fact that my default spinner (that darkens the whole page) ends up flickering on and off quickly when moving between problems in a reasonable sized class.
I think ideally there would be a little delay to see if rendering can finish quickly, and if it doesn't then show the spinner. The react render is synchronous though, so its not like we can interrupt it.
Best thing I can think of to do is count up the number of expressions we will be rendering and make that a precondition to showing the spinner at all if we think it won't take too long. Also as discussed we can add pagination to this page, or fancy virtual scrolling or whatever like they use in the various table libraries to not fall over when people load a bunch of data.
Here is the diff for unconditionally showing the spinner at least: