perf: add skeleton loading state for heritage cards [closes #330]#370
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alidate in background Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…earch params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… above-fold images Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9a1fcf8 to
eec7294
Compare
…imensions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hile fetching Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… grid while fetching Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… pass isLoading to HeritageList Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eResultsContainer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7c1f3fa to
a705378
Compare
zigzagdev
added a commit
that referenced
this pull request
May 22, 2026
* perf: add stale-while-revalidate in-memory cache for heritage API calls [closes #333] (#368) * perf: create api-cache utility with TTL-based get/set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: apply SWR cache to useTopPage — serve stale data instantly, revalidate in background Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: apply SWR cache to useHeritageSearchQuery keyed by serialized search params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: add skeleton loading state for heritage cards [closes #330] (#370) * perf: create api-cache utility with TTL-based get/set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: apply SWR cache to useTopPage — serve stale data instantly, revalidate in background Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: apply SWR cache to useHeritageSearchQuery keyed by serialized search params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(card): add isPriority prop — eager loading and fetchpriority for above-fold images Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(list): pass isPriority to first 3 cards in HeritageList Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(search): pass isPriority to first 3 cards in SearchResultsPage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: create HeritageCardSkeleton component matching thumbnail card dimensions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(list): add isLoading prop to HeritageList — show skeleton grid while fetching Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(search): add isLoading prop to SearchResultsPage — show skeleton grid while fetching Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(container): remove Loading… early return from TopPageContainer — pass isLoading to HeritageList Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(container): pass isLoading to SearchResultsPage in SearchHeritageResultsContainer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: lazy-load Map and DetailHeritageMap to shrink initial JS bundle [closes #331] (#372) * perf: create api-cache utility with TTL-based get/set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: apply SWR cache to useTopPage — serve stale data instantly, revalidate in background Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: apply SWR cache to useHeritageSearchQuery keyed by serialized search params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(card): add isPriority prop — eager loading and fetchpriority for above-fold images Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(list): pass isPriority to first 3 cards in HeritageList Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(search): pass isPriority to first 3 cards in SearchResultsPage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf: create HeritageCardSkeleton component matching thumbnail card dimensions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(list): add isLoading prop to HeritageList — show skeleton grid while fetching Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(search): add isLoading prop to SearchResultsPage — show skeleton grid while fetching Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(container): remove Loading… early return from TopPageContainer — pass isLoading to HeritageList Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(container): pass isLoading to SearchResultsPage in SearchHeritageResultsContainer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(top): lazy-load Map component with React.lazy and Suspense pulse fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * perf(detail): lazy-load DetailHeritageMap with React.lazy and Suspense pulse fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(card): remove isPriority/fetchPriority/eager loading — caused 403 on UNESCO image URLs fetchPriority="high" and loading="eager" triggered rate-limiting on UNESCO's document server. Revert to loading="lazy" for all images. Keep width, height, and decoding="async" for CLS prevention. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(card): revert image dimension attrs added for #332 Drop decoding="async", width/height hints — image optimization issue is being closed without implementation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
HeritageCardSkeleton: full-height pulse block matching thumbnail card dimensionsHeritageList: acceptsisLoading— shows 6 skeletons while data loadsSearchResultsPage: acceptsisLoading— shows 6 skeletons instead of empty gridTopPageContainer: removedLoading…early return, passesisLoadingtoHeritageListSearchHeritageResultsContainer: passesisLoadingtoSearchResultsPageTest plan
animate-pulseshimmer is visible during loading🤖 Generated with Claude Code