Skip to content

Commit

Permalink
Improve announcements for loading states in logs tab
Browse files Browse the repository at this point in the history
  • Loading branch information
synzen committed Feb 11, 2025
1 parent 6e4289b commit 377ed0c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,13 @@ export const DeliveryHistory = () => {
</Box>
</Box>
<Box srOnly aria-live="polite">
{fetchStatus === "fetching" && `Loading rows ${skip} through ${skip + limit}`}
{data && `Finished loading rows ${skip} through ${skip + limit}`}
{status === "loading" &&
`Loading article delivery history rows ${skip} through ${skip + limit}`}
{status === "success" &&
`Finished loading article delivery history rows ${skip} through ${skip + limit}`}
{status === "success" &&
fetchStatus === "fetching" &&
`Loading article delivery history rows ${skip} through ${skip + limit}`}
</Box>
{status === "loading" && (
<Center pb={8}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ export const RequestHistory = () => {
</Box>
</Box>
<Box srOnly aria-live="polite">
{fetchStatus === "fetching" && `Loading rows ${skip} through ${skip + limit}`}
{data && `Finished loading rows ${skip} through ${skip + limit}`}
{status === "loading" && `Loading request history rows ${skip} through ${skip + limit}`}
{status === "success" &&
`Finished loading request history rows ${skip} through ${skip + limit}`}
{status === "success" &&
fetchStatus === "fetching" &&
`Loading request history rows ${skip} through ${skip + limit}`}
</Box>
{status === "loading" && (
<Center pb={8}>
Expand Down

0 comments on commit 377ed0c

Please sign in to comment.