Skip to content

[TOOL-3942] Playground: Fix slow dev server - generate insight sidebar links with script #6631

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
Apr 2, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Apr 2, 2025


PR-Codex overview

This PR focuses on enhancing the playground-web application by adding a script for updating insight blueprints and refactoring the way sidebar links are fetched and displayed.

Detailed summary

  • Updated package.json to add a new script: update-insight-blueprints.
  • Introduced updateInsightBlueprints.ts to generate insightBlueprints.ts from fetched blueprints.
  • Refactored getSidebarLinks to use insightBlueprints instead of fetching them dynamically.
  • Modified Page component to utilize insightBlueprints for rendering.
  • Updated utility functions in utils.ts for fetching blueprints and their specifications.
  • Created insightBlueprints.ts with a predefined structure for insight blueprints.

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

Copy link

linear bot commented Apr 2, 2025

Copy link

vercel bot commented Apr 2, 2025

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

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

@vercel vercel bot temporarily deployed to Preview – wallet-ui April 2, 2025 22:56 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 2, 2025 22:56 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 2, 2025 22:56 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www April 2, 2025 22:56 Inactive
@MananTank MananTank marked this pull request as ready for review April 2, 2025 22:56
@MananTank MananTank requested review from jnsdls, joaquim-verges and a team as code owners April 2, 2025 22:57
@MananTank MananTank requested a review from a team as a code owner April 2, 2025 22:57
@github-actions github-actions bot added the Playground Changes involving the Playground codebase. label Apr 2, 2025
Copy link
Member Author

MananTank commented Apr 2, 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.

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

Copy link

changeset-bot bot commented Apr 2, 2025

⚠️ No Changeset found

Latest commit: 9e8fd89

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

@vercel vercel bot temporarily deployed to Preview – wallet-ui April 2, 2025 22:58 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 2, 2025 22:58 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www April 2, 2025 22:58 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 2, 2025 22:58 Inactive
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.97%. Comparing base (95a8753) to head (9e8fd89).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6631   +/-   ##
=======================================
  Coverage   54.97%   54.97%           
=======================================
  Files         888      888           
  Lines       55752    55752           
  Branches     3817     3817           
=======================================
  Hits        30652    30652           
  Misses      25005    25005           
  Partials       95       95           
Flag Coverage Δ
packages 54.97% <ø> (ø)
🚀 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 Apr 2, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.49 KB (0%) 950 ms (0%) 122 ms (+78.07% 🔺) 1.1 s
thirdweb (cjs) 129.89 KB (0%) 2.6 s (0%) 217 ms (+26.39% 🔺) 2.9 s
thirdweb (minimal + tree-shaking) 5.62 KB (0%) 113 ms (0%) 63 ms (+1149.61% 🔺) 176 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 27 ms (+1641.67% 🔺) 37 ms
thirdweb/react (minimal + tree-shaking) 19.33 KB (0%) 387 ms (0%) 102 ms (+563.25% 🔺) 489 ms

// This file is auto-generated by the update-insight-blueprints script
import type { MinimalBlueprintSpec } from "./utils";

export const insightBlueprints: MinimalBlueprintSpec[] = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't generate these from the downloaded files? would be generated when running the script i guess

Copy link
Member Author

@MananTank MananTank Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, This file is auto generated when running the script

Copy link
Contributor

graphite-app bot commented Apr 2, 2025

Merge activity

…r links with script (#6631)

<!--

## 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 introduces a new script for managing insight blueprints, updates the `getSidebarLinks` function to use pre-fetched blueprints, and modifies the `Page` component to display these blueprints. It also refines the utility functions for fetching blueprint data.

### Detailed summary
- Added `update-insight-blueprints` script in `package.json`.
- Created `insightBlueprints.ts` to store auto-generated blueprint data.
- Updated `getSidebarLinks` to use `insightBlueprints` instead of fetching blueprints dynamically.
- Modified `Page` component to render blueprints from `insightBlueprints`.
- Enhanced utility functions in `utils.ts` for fetching blueprint data.

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

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 2, 2025 23:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www April 2, 2025 23:28 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 2, 2025 23:28 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 2, 2025 23:28 Inactive
@graphite-app graphite-app bot merged commit 9e8fd89 into main Apr 2, 2025
32 checks passed
@graphite-app graphite-app bot deleted the tool-3942 branch April 2, 2025 23:33
@vercel vercel bot temporarily deployed to Production – docs-v2 April 2, 2025 23:33 Inactive
@vercel vercel bot temporarily deployed to Production – login April 2, 2025 23:33 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui April 2, 2025 23:33 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb-www April 2, 2025 23:33 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Playground Changes involving the Playground codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants