-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: better error and loading handling on programs page #1012
base: main
Are you sure you want to change the base?
Commits on Nov 8, 2023
-
fix: handle query errors in
ChooseSession
The error and loading messages are just placeholders for now. The crucial change here is to let the student know when we can't display up-to-date session information for some reason. Note that we show data if it's available, without first checking for `isLoading` or `isError`. This means we may show stale data, but we prefer this over showing a loading message or an error for short server outages. For some justification of this approach, see: https://tkdodo.eu/blog/status-checks-in-react-query Note that React Query will not show stale data indefinitely, and will eventually show an error message if the data is stale for too long. Signed-off-by: Drew Hess <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee2280a - Browse repository at this point
Copy the full SHA ee2280aView commit details -
fix: always render the session page nav bar
The previous commit improved matters on the session page by handling `isError` and `isLoading` conditions, but has annoying behavior when the student is typing a program name into the search bar and we're doing live search, because the sessions page was rendered all-or-nothing. Now we always show the nav bar. This means we no longer have a nice single component for the sessions page (i.e., the `SessionsPage` component is no more), but `ChooseSession` is now more or less the same thing, only with better error and loading behavior. I haven't bothered to add a Storybook story for it, but it would be easyenough to add later if we need it. Signed-off-by: Drew Hess <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 630dd7c - Browse repository at this point
Copy the full SHA 630dd7cView commit details -
feat: replacing
ChooseSession
"loading" message with a spinnerSigned-off-by: Drew Hess <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0de9678 - Browse repository at this point
Copy the full SHA 0de9678View commit details -
fix: disable
exactOptionalPropertyTypes
TypeScript optionThis setting is causing problems with one of `react-aria`'s dependencies, and we've found it to be probably more annoying than it's worth anyway, on balance. Signed-off-by: Drew Hess <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 904f050 - Browse repository at this point
Copy the full SHA 904f050View commit details -
fix: display a better error message when fetching programs fails
Signed-off-by: Drew Hess <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7a3ef55 - Browse repository at this point
Copy the full SHA 7a3ef55View commit details -
fix: show more helpful messages when no programs are found
Signed-off-by: Drew Hess <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4f489a6 - Browse repository at this point
Copy the full SHA 4f489a6View commit details