Add feedback states: skeleton loading, error and empty #57
+288
−54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #36
What
BookCardSkeleton: placeholder in the shape of a BookCard, shown while a list loadsLoadingState: screen reader announcement (announceOnly) plus a pulsing dot for pages without a skeletonErrorState: message and "Try again" buttonEmptyState: title, message and optional action buttonBookGridnow renders skeletons viaisLoading, and takes a singleshelfmap instead ofsavedIds+ratingsBrowsePagenow usesBookGridinstead of its own grid (this also ensures skeleton and card widths are matching)BookDetailPagehandles loading, error and book-not-foundButtonvariants renamed:primary→default,secondary→emphasisTemporary, to replace when queries are connected
isLoadinginBrowsePageandBookDetailPage, andisErrorinBookDetailPageonRetryis aconsole.log, should be the query'srefetchHow to test
/book/nonsenseto see the empty statetrueto see loading and error (in a page file)prefers-reduced-motion: reduceand check that the loading state pulse stopsFor review
BrowsePage.tsxis touched: it now renders throughBookGrid, and its duplicate.gridCSS is removed. Please pull before continuing work on search/filter/sort there.Screenshots