Skip to content

[Dashboard] Fix: Display latest value in PayNewCustomers component #7002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2025

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented May 10, 2025

🤖 Generated with Claude Code


PR-Codex overview

This PR updates the logic for displaying the total value of new customers in the PayNewCustomers component. It changes how the value is computed when the graphData is empty or when accessing the latest value.

Detailed summary

  • Modified the loadedData prop in the SkeletonContainer.
  • Changed the logic from summing all curr.value to retrieving the last value in graphData or returning 0 if not available.
  • Handled the case where graphData is empty by displaying "NA".

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@gregfromstl gregfromstl requested review from a team as code owners May 10, 2025 07:21
Copy link

changeset-bot bot commented May 10, 2025

⚠️ No Changeset found

Latest commit: 816aa61

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2025 5:17pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 10, 2025 5:17pm
login ⬜️ Skipped (Inspect) May 10, 2025 5:17pm
thirdweb_playground ⬜️ Skipped (Inspect) May 10, 2025 5:17pm
wallet-ui ⬜️ Skipped (Inspect) May 10, 2025 5:17pm

Copy link
Contributor

graphite-app bot commented May 10, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label May 10, 2025
@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. and removed merge-queue Adds the pull request to Graphite's merge queue. labels May 10, 2025
Copy link

codecov bot commented May 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.60%. Comparing base (7de273c) to head (816aa61).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7002   +/-   ##
=======================================
  Coverage   54.60%   54.60%           
=======================================
  Files         903      903           
  Lines       57936    57936           
  Branches     3971     3971           
=======================================
  Hits        31638    31638           
  Misses      26197    26197           
  Partials      101      101           
Flag Coverage Δ
packages 54.60% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented May 10, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 54.21 KB (0%) 1.1 s (0%) 199 ms (+190.93% 🔺) 1.3 s
thirdweb (cjs) 193.92 KB (0%) 3.9 s (0%) 360 ms (+31.43% 🔺) 4.3 s
thirdweb (minimal + tree-shaking) 5.68 KB (0%) 114 ms (0%) 81 ms (+1578.18% 🔺) 195 ms
thirdweb/chains (tree-shaking) 524 B (0%) 11 ms (0%) 41 ms (+2852.69% 🔺) 51 ms
thirdweb/react (minimal + tree-shaking) 19.55 KB (0%) 391 ms (0%) 82 ms (+488.92% 🔺) 473 ms

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label May 10, 2025
Copy link
Member Author

gregfromstl commented May 10, 2025

Merge activity

…7002)

🤖 Generated with [Claude Code](https://claude.ai/code)

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving the logic used to display the total value in the `SkeletonContainer` of the `PayNewCustomers` component. It ensures that when `graphData` is empty, it returns "NA", and otherwise, it retrieves the last value or defaults to 0.

### Detailed summary
- Updated the logic in `SkeletonContainer`:
  - Changed the expression to return `graphData[graphData.length - 1]?.value || 0` when `graphData` is not empty.
  - Maintained the output of "NA" when `isEmpty` is true.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the greg/fix-new-customers-total-count branch from f1cddd6 to 816aa61 Compare May 10, 2025 17:10
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 10, 2025 17:10 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 10, 2025 17:10 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 10, 2025 17:10 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 10, 2025 17:10 Inactive
@graphite-app graphite-app bot merged commit 816aa61 into main May 10, 2025
23 checks passed
@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label May 10, 2025
@graphite-app graphite-app bot deleted the greg/fix-new-customers-total-count branch May 10, 2025 17:18
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 10, 2025 17:18 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 May 10, 2025 17:18 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui May 10, 2025 17:18 Inactive
@vercel vercel bot temporarily deployed to Production – login May 10, 2025 17:18 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants