Skip to content
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

[TOOL-3007] Dashboard: Replace chainsaw with insight #5926

Merged

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Jan 10, 2025

PR-Codex overview

This PR focuses on enhancing the analytics features of the thirdweb project. Key updates include the addition of new utility functions, improved data fetching for contract analytics, and adjustments to various components to support new data structures and API endpoints.

Detailed summary

  • Added toEventSelector utility function export.
  • Introduced INSIGHT_SERVICE_API_KEY for analytics API calls.
  • Enhanced ContractAnalyticsPageClient to accept new props for function and event selectors.
  • Created new functions for fetching total contract events, unique wallets, and transactions.
  • Updated isAnalyticsSupportedForChain to use the new API key.
  • Refactored analytics components to utilize new hooks for fetching contract data.
  • Implemented detailed breakdowns for contract events and functions.
  • Adjusted UI components to accommodate loading states and data fetching.
  • Removed deprecated or unused code related to previous analytics implementations.

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

Copy link

linear bot commented Jan 10, 2025

Copy link

changeset-bot bot commented Jan 10, 2025

🦋 Changeset detected

Latest commit: 4b5661b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Jan 10, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 0:25am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 0:25am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 0:25am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 0:25am

@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. packages SDK Involves changes to the thirdweb SDK labels Jan 10, 2025
Copy link
Member Author


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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

github-actions bot commented Jan 10, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.65 KB (0%) 913 ms (0%) 1.2 s (+31.01% 🔺) 2.1 s
thirdweb (cjs) 115.43 KB (0%) 2.4 s (0%) 2.1 s (-13.07% 🔽) 4.4 s
thirdweb (minimal + tree-shaking) 5.59 KB (0%) 112 ms (0%) 291 ms (+116.95% 🔺) 403 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 17 ms (-68.86% 🔽) 27 ms
thirdweb/react (minimal + tree-shaking) 19.21 KB (0%) 385 ms (0%) 338 ms (+24.48% 🔺) 722 ms

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.83%. Comparing base (42a313f) to head (4b5661b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5926      +/-   ##
==========================================
+ Coverage   54.81%   54.83%   +0.01%     
==========================================
  Files        1141     1141              
  Lines       60903    60903              
  Branches     5126     5128       +2     
==========================================
+ Hits        33384    33396      +12     
+ Misses      26795    26781      -14     
- Partials      724      726       +2     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 42a313f
packages 52.47% <ø> (+0.02%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

see 4 files with indirect coverage changes

Copy link

graphite-app bot commented Jan 11, 2025

Merge activity

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on enhancing the analytics functionality within the `dashboard` application by introducing new utility functions, updating existing API calls, and improving the data handling for contract analytics.

### Detailed summary
- Added export of `toEventSelector` from `thirdweb/utils`.
- Introduced `INSIGHT_SERVICE_API_KEY` in environment constants.
- Modified `ContractAnalyticsPageClient` to accept new props for function and event selectors.
- Created new analytics functions for total contract events, unique wallets, and transactions.
- Updated `isAnalyticsSupportedForChain` to use `INSIGHT_SERVICE_API_KEY`.
- Refactored analytics components to use new hooks for contract events and functions.
- Improved data fetching and error handling in analytics hooks.
- Enhanced UI components for displaying analytics data with loading states.

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

<!-- end pr-codex -->
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. packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants