feat: generic EmptyState CTA + wire zero-holdings empty state - #619
Closed
prissca wants to merge 1 commit into
Closed
feat: generic EmptyState CTA + wire zero-holdings empty state#619prissca wants to merge 1 commit into
prissca wants to merge 1 commit into
Conversation
…ccesslayerorg#545) Skeleton loading states (CreatorGridSkeleton, CreatorHoldingsListSkeleton, CreatorProfileHeaderSkeleton) already existed and were already wired for the creator list and holdings sections' isLoading branch. The genuine gap: once loading settled, a zero-result holdings list silently rendered an empty grid with no empty-state messaging or CTA. - Extended EmptyState with a generic `cta: {label, onClick}` prop alongside the existing `onReset` (kept for the search-reset caller; onReset takes precedence if somehow both are passed, so no existing behavior changes). - Wired an EmptyState into the holdings section for the zero-result case (after loading settles, before the populated grid renders), with a CTA that smooth-scrolls to the existing #main-creator-list section — this app doesn't have a separate discovery route to link to. - Skeleton and empty state remain mutually exclusive: the loading / empty / populated branches are an if/else-if/else chain. - Added src/components/common/__tests__/EmptyState.test.tsx covering title/description rendering, no-button-when-neither-prop, the legacy onReset button, the new generic cta button, and onReset taking precedence over cta. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
✅ Deploy Preview for accesslayer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @prissca, thanks for your contribution! This PR is targeting Please close this PR and reopen it with Closing this PR automatically. See you in |
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
Skeleton loading states (
CreatorGridSkeleton,CreatorHoldingsListSkeleton,CreatorProfileHeaderSkeleton) already existed and were already wired for the creator list and holdings sections'isLoadingbranch. The genuine gap: once loading settled, a zero-result holdings list silently rendered an empty grid with no messaging or CTA.EmptyStatewith a genericcta: {label, onClick}prop alongside the existingonReset(kept for the search-reset caller;onResettakes precedence if both are somehow passed, so no existing behavior changes).EmptyStateinto the holdings section for the zero-result case (after loading settles, before the populated grid renders), with a CTA that smooth-scrolls to the existing#main-creator-listsection — this app doesn't have a separate discovery route to link to.EmptyState.test.tsxcovering title/description rendering, no-button-when-neither-prop, the legacyonResetbutton, the new genericctabutton, andonResettaking precedence overcta.Closes #545
Test plan
node_modules, disk space constraint in my environment) — please run the newEmptyState.test.tsx