Skip to content

feat: generic EmptyState CTA + wire zero-holdings empty state - #619

Closed
prissca wants to merge 1 commit into
accesslayerorg:mainfrom
prissca:fix/issue-545-holdings-empty-state
Closed

feat: generic EmptyState CTA + wire zero-holdings empty state#619
prissca wants to merge 1 commit into
accesslayerorg:mainfrom
prissca:fix/issue-545-holdings-empty-state

Conversation

@prissca

@prissca prissca commented Jul 26, 2026

Copy link
Copy Markdown

Summary

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 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 both are somehow 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: loading/empty/populated are an if/else-if/else chain.
  • Added 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.

Closes #545

Test plan

  • Could not run vitest locally (no node_modules, disk space constraint in my environment) — please run the new EmptyState.test.tsx
  • Manually clear all holdings (or view as a new wallet with no key positions) and confirm the empty state renders with working "Discover creators" scroll CTA, with no layout shift/flash between skeleton and empty state

…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>
@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for accesslayer ready!

Name Link
🔨 Latest commit c3cb1b4
🔍 Latest deploy log https://app.netlify.com/projects/accesslayer/deploys/6a665f85056b18000860437c
😎 Deploy Preview https://deploy-preview-619--accesslayer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

👋 Hey @prissca, thanks for your contribution!

This PR is targeting main directly. We use main for stable releases only — all contributions should be opened against the dev branch instead.

Please close this PR and reopen it with dev as the base branch. If you're unsure how to do that, you can change the base branch using the Edit button at the top of this PR page.

Closing this PR automatically. See you in dev! 🚀

@github-actions github-actions Bot closed this Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants