Kinto / kinto-admin

Kinto Web Administration Console
http://kinto.github.io/kinto-admin/
184 stars 35 forks source link

Switching auth form spinner to be based on session.busy #3218

Closed alexcottner closed 2 months ago

alexcottner commented 2 months ago

Small fix for issue that we noticed after v3.0.7 was created. It looks like rjsf may have switched the order of events of form onChange vs field onChange. After looking at the code a bit I realized we should be indifferent to this.

Adjusted code to show a spinner when session.busy is true. Adjusted unit tests accordingly.

alexcottner commented 2 months ago

Out of scope for this PR, but could this mean there are other places where our const [showSpinner, setshowSpinner] = useState(false); pattern could be competing with some Redux busy prop?

That seems probable. We do show spinners based on redux values in some places already. But there are several places where we show spinners based on forms being submitted. There may be a similar property to check for there.