Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented May 20, 2025

PR-Codex overview

This PR focuses on adding a deprecated property to various types and components within the application, allowing for better handling and display of deprecated items in the UI.

Detailed summary

  • Added deprecated property to pathInfo in navLinks.ts, page.tsx, and insightBlueprints.ts.
  • Updated MinimalBlueprintSpec in utils.ts to include deprecated.
  • Modified SidebarItem in sidebar.tsx to conditionally apply a line-through style for deprecated links.
  • Enhanced UI in page.tsx to show "Deprecated" badge and description for deprecated paths.
  • Included crossedOut property in SidebarLink type for better visual indication of deprecated links.

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

Summary by CodeRabbit

  • New Features

    • Deprecated API paths and blueprint links are now visually distinguished with a line-through style and a "Deprecated" badge in the interface.
    • Deprecated paths display their descriptions in a highlighted container for added clarity.
  • Style

    • Sidebar and blueprint lists now strike through deprecated links for improved visibility.

@vercel
Copy link

vercel bot commented May 20, 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 May 20, 2025 9:05pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 20, 2025 9:05pm
login ⬜️ Skipped (Inspect) May 20, 2025 9:05pm
thirdweb-www ⬜️ Skipped (Inspect) May 20, 2025 9:05pm
wallet-ui ⬜️ Skipped (Inspect) May 20, 2025 9:05pm

@vercel vercel bot temporarily deployed to Preview – login May 20, 2025 19:44 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 20, 2025 19:44 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 20, 2025 19:44 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 20, 2025 19:44 Inactive
@changeset-bot
Copy link

changeset-bot bot commented May 20, 2025

⚠️ No Changeset found

Latest commit: 20fdd5b

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Walkthrough

The changes introduce a deprecation indicator system for API paths across the UI. A new deprecated boolean property is added to relevant data structures and types. Deprecated paths are visually marked with strikethrough text and a "Deprecated" badge in both the main content and sidebar navigation, with no changes to underlying data-fetching or control flow logic.

Changes

File(s) Change Summary
.../insight/insightBlueprints.ts Added a deprecated boolean property to each path object in insightBlueprints, marking specific endpoints as deprecated.
.../insight/utils.ts Updated exported types BlueprintListItem and MinimalBlueprintSpec to include a deprecated: boolean property in their paths array element types.
.../insight/page.tsx Updated the BlueprintSection component and its prop types to support and display deprecated blueprint paths with strikethrough and a "Deprecated" badge.
.../insight/[blueprint_slug]/page.tsx Enhanced the page component to visually indicate deprecated API paths with muted, struck-through titles and a red "Deprecated" badge, also displaying the description for deprecated paths.
.../navLinks.ts Augmented the sidebar link objects returned by getSidebarLinks with a crossedOut property, reflecting the deprecation status of blueprint paths.
.../components/ui/sidebar.tsx Extended the LinkMeta type with an optional crossedOut property and updated SidebarItem to render link text with a line-through style if crossedOut is true.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Sidebar
    participant MainPage
    participant BlueprintData

    User->>Sidebar: Render links
    Sidebar->>BlueprintData: Get links with `crossedOut` (deprecated) property
    Sidebar->>Sidebar: Render link with line-through if crossedOut

    User->>MainPage: Navigate to blueprint path
    MainPage->>BlueprintData: Fetch path metadata (includes `deprecated`)
    MainPage->>MainPage: Render title with line-through and "Deprecated" badge if deprecated
    MainPage->>MainPage: Show description for deprecated paths
Loading

Suggested reviewers

  • jnsdls

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 438c019 and 20fdd5b.

📒 Files selected for processing (6)
  • apps/playground-web/src/app/insight/[blueprint_slug]/page.tsx (2 hunks)
  • apps/playground-web/src/app/insight/insightBlueprints.ts (9 hunks)
  • apps/playground-web/src/app/insight/page.tsx (2 hunks)
  • apps/playground-web/src/app/insight/utils.ts (2 hunks)
  • apps/playground-web/src/app/navLinks.ts (1 hunks)
  • apps/playground-web/src/components/ui/sidebar.tsx (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/playground-web/src/app/insight/page.tsx (1)
apps/dashboard/src/tw-components/link.tsx (1)
  • Link (34-57)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (12)
apps/playground-web/src/components/ui/sidebar.tsx (2)

14-14: Good type extension for deprecation support.

Adding the optional crossedOut property to the LinkMeta type provides a clear way to indicate deprecated links in the sidebar.


87-87: Clean implementation of visual deprecation indicator.

The conditional class application uses proper type checking with "crossedOut" in link before accessing the property, which prevents potential runtime errors.

apps/playground-web/src/app/navLinks.ts (1)

144-144: Good integration of the deprecation flag.

This line correctly maps the deprecated property from path metadata to the crossedOut property used by the sidebar component, ensuring visual consistency across the UI.

apps/playground-web/src/app/insight/[blueprint_slug]/page.tsx (3)

1-1: Appropriate imports for new UI features.

The Badge component and className utility (cn) are correctly imported to support the new deprecation UI elements.

Also applies to: 9-9


58-71: Well-structured deprecation indicator.

The implementation nicely combines conditional styling with the Badge component to clearly indicate deprecated paths to users.


73-79: HTML structure looks good.

The previous HTML validation issue with <div> inside <p> has been properly addressed by using only <div> elements for the description container.

apps/playground-web/src/app/insight/utils.ts (1)

23-23: Type definitions properly updated.

Adding the deprecated boolean property to both type definitions ensures type safety throughout the application when working with blueprint paths.

Also applies to: 40-40

apps/playground-web/src/app/insight/insightBlueprints.ts (1)

12-12: Consistent deprecation property added to all path objects

The deprecated boolean property has been systematically added to all path objects in the insightBlueprints array. Most paths are marked as deprecated: false, while only two token-related endpoints are marked as deprecated: true:

  • "Get ERC-721 balances by address" (line 85)
  • "Get ERC-1155 balances by address" (line 90)

This is a well-structured and consistent change that will enable proper visual indication of deprecated APIs in the UI.

Also applies to: 17-17, 22-22, 33-33, 38-38, 43-43, 54-54, 65-65, 70-70, 75-75, 80-80, 85-85, 90-90, 95-95, 100-100, 105-105, 116-116, 121-121, 126-126, 131-131, 136-136, 141-141, 146-146, 151-151, 156-156, 161-161, 166-166, 171-171, 176-176, 187-187, 198-198, 203-203, 214-214, 225-225

apps/playground-web/src/app/insight/page.tsx (4)

32-32: Correctly propagating the deprecated status from insightBlueprints

The deprecated property is now properly passed from the source data to the component props, ensuring that the UI can reflect the deprecation status.


43-45: Type definition properly updated to include optional deprecated property

The BlueprintSection component's props type has been correctly updated to include the optional deprecated boolean property, ensuring type safety.


64-68: Appropriate visual styling for deprecated items

Good implementation of conditional styling to apply a line-through effect for deprecated items, making them visually distinct from active endpoints.


72-76: Effective UI indication for deprecated APIs

The addition of a "Deprecated" badge with appropriate styling (using destructive color with reduced opacity background) provides clear visual feedback to users that the API endpoint should not be used for new implementations.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Playground Changes involving the Playground codebase. label May 20, 2025
Copy link
Contributor Author

iuwqyir commented May 20, 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.

@codecov
Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.81%. Comparing base (438c019) to head (20fdd5b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7100   +/-   ##
=======================================
  Coverage   55.81%   55.81%           
=======================================
  Files         900      900           
  Lines       57848    57848           
  Branches     4067     4067           
=======================================
  Hits        32288    32288           
  Misses      25454    25454           
  Partials      106      106           
Flag Coverage Δ
packages 55.81% <ø> (ø)
🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented May 20, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 56.57 KB (0%) 1.2 s (0%) 156 ms (+156.48% 🔺) 1.3 s
thirdweb (cjs) 309.52 KB (0%) 6.2 s (0%) 572 ms (-3.92% 🔽) 6.8 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 51 ms (+820.87% 🔺) 165 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 13 ms (+575.18% 🔺) 24 ms
thirdweb/react (minimal + tree-shaking) 19.5 KB (0%) 390 ms (0%) 91 ms (+711.99% 🔺) 481 ms

@iuwqyir iuwqyir force-pushed the 05-20-replace_chain_with_chain_id_in_insight_playground branch from 483ce36 to 7e98519 Compare May 20, 2025 19:51
@iuwqyir iuwqyir force-pushed the 05-20-show_deprecation_in_playground_ui branch from 171dbe1 to 342aef1 Compare May 20, 2025 19:51
@vercel vercel bot temporarily deployed to Preview – login May 20, 2025 19:52 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 20, 2025 19:52 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 20, 2025 19:52 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 20, 2025 19:52 Inactive
@iuwqyir iuwqyir force-pushed the 05-20-show_deprecation_in_playground_ui branch from 342aef1 to b9b3d52 Compare May 20, 2025 20:05
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 20, 2025 20:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 20, 2025 20:05 Inactive
@graphite-app graphite-app bot changed the base branch from 05-20-replace_chain_with_chain_id_in_insight_playground to graphite-base/7100 May 20, 2025 20:46
Copy link
Member

jnsdls commented May 20, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@iuwqyir iuwqyir force-pushed the graphite-base/7100 branch from bde14b9 to 438c019 Compare May 20, 2025 20:48
@iuwqyir iuwqyir force-pushed the 05-20-show_deprecation_in_playground_ui branch from 9fb808d to cdcdee9 Compare May 20, 2025 20:48
@iuwqyir iuwqyir changed the base branch from graphite-base/7100 to 05-20-replace_chain_with_chain_id_in_insight_playground May 20, 2025 20:48
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 20, 2025 20:48 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 20, 2025 20:48 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 20, 2025 20:48 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 20, 2025 20:48 Inactive
Base automatically changed from 05-20-replace_chain_with_chain_id_in_insight_playground to main May 20, 2025 20:56
@iuwqyir iuwqyir added the merge-queue Adds the pull request to Graphite's merge queue. label May 20, 2025 — with Graphite App
Copy link
Contributor Author

iuwqyir commented May 20, 2025

Merge activity

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on adding a `deprecated` property to various types and components within the application, allowing for better handling and display of deprecated links and features in the UI.

### Detailed summary
- Added `deprecated` property to `pathInfo` in `navLinks.ts`.
- Updated `MinimalBlueprintSpec` type in `utils.ts` to include `deprecated`.
- Modified `SidebarLink` type in `sidebar.tsx` to optionally include `crossedOut`.
- Enhanced UI to visually indicate deprecated items in `page.tsx`.
- Included `deprecated` status for various API endpoints in `insightBlueprints.ts`.

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

<!-- end pr-codex -->
@graphite-app graphite-app bot force-pushed the 05-20-show_deprecation_in_playground_ui branch from cdcdee9 to 20fdd5b Compare May 20, 2025 21:04
@vercel vercel bot temporarily deployed to Preview – login May 20, 2025 21:04 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www May 20, 2025 21:04 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 20, 2025 21:04 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 20, 2025 21:04 Inactive
@graphite-app graphite-app bot merged commit 20fdd5b into main May 20, 2025
22 of 23 checks passed
@graphite-app graphite-app bot deleted the 05-20-show_deprecation_in_playground_ui branch May 20, 2025 21:07
@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label May 20, 2025
@vercel vercel bot temporarily deployed to Production – docs-v2 May 20, 2025 21:07 Inactive
@vercel vercel bot temporarily deployed to Production – login May 20, 2025 21:07 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb-www May 20, 2025 21:07 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui May 20, 2025 21:07 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.

4 participants