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

[DASH-638] Improve page load speed for <project>/connect tab by skipping a redirect #5758

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Dec 16, 2024

Problem solved

DASH-638


PR-Codex overview

This PR introduces a new ProjectTabs component, enhancing tab navigation within the project layout. It replaces the existing TabPathLinks implementation, allowing for more dynamic tab activation based on the current path.

Detailed summary

  • Added isActive prop to links in tabs.tsx.
  • Updated TabPathLinks usage with a new ProjectTabs component.
  • Removed direct TabPathLinks implementation in layout.tsx.
  • Implemented dynamic tab activation logic in ProjectTabs.

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

Copy link

vercel bot commented Dec 16, 2024

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 Dec 16, 2024 10:11pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Dec 16, 2024 10:11pm
thirdweb_playground ⬜️ Skipped (Inspect) Dec 16, 2024 10:11pm
wallet-ui ⬜️ Skipped (Inspect) Dec 16, 2024 10:11pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 December 16, 2024 20:46 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 16, 2024 20:46 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 16, 2024 20:46 Inactive
Copy link

changeset-bot bot commented Dec 16, 2024

⚠️ No Changeset found

Latest commit: b6deb15

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

@MananTank MananTank marked this pull request as ready for review December 16, 2024 20:47
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Dec 16, 2024
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.99%. Comparing base (4fda846) to head (b6deb15).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5758   +/-   ##
=======================================
  Coverage   52.99%   52.99%           
=======================================
  Files        1102     1102           
  Lines       59107    59107           
  Branches     4809     4809           
=======================================
  Hits        31323    31323           
  Misses      27066    27066           
  Partials      718      718           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 4fda846
packages 50.13% <ø> (ø)

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

@MananTank MananTank changed the title Improve page load speed for <project>/connect tab by skipping a redirect [DASH-638] Improve page load speed for <project>/connect tab by skipping a redirect Dec 16, 2024
Copy link

linear bot commented Dec 16, 2024

Copy link
Contributor

github-actions bot commented Dec 16, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.93 KB (0%) 899 ms (0%) 2.6 s (+3.14% 🔺) 3.5 s
thirdweb (cjs) 110.84 KB (0%) 2.3 s (0%) 6.1 s (+8.01% 🔺) 8.3 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 383 ms (+9.7% 🔺) 495 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 37 ms (-24.66% 🔽) 47 ms
thirdweb/react (minimal + tree-shaking) 19.07 KB (0%) 382 ms (0%) 690 ms (-26.26% 🔽) 1.1 s

Comment on lines +22 to +24
path: `${layoutPath}/connect/in-app-wallets`,
name: "Connect",
isActive: (path) => path.startsWith(`${layoutPath}/connect`),
Copy link
Member

Choose a reason for hiding this comment

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

means we have to keep this in mind if we ever want to prioritize another sub-tab

Copy link

graphite-app bot commented Dec 16, 2024

Merge activity

…ing a redirect (#5758)

## Problem solved

DASH-638

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new `ProjectTabs` component to replace the existing `TabPathLinks` usage in the `TeamLayout`. It enhances tab management by allowing custom active tab logic and streamlining the tab structure.

### Detailed summary
- Added `isActive` prop to the `links` array in `tabs.tsx`.
- Introduced `ProjectTabs` component in `tabs.tsx` for managing project-related tabs.
- Replaced `TabPathLinks` with `ProjectTabs` in `layout.tsx`.
- Removed unused code for project fetching and not found handling in `page.tsx`.

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

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 12-17-improve_page_load_speed_for_project__connect_tab_by_skipping_a_redirect branch from f86a86d to b6deb15 Compare December 16, 2024 22:00
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 16, 2024 22:00 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 16, 2024 22:00 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 16, 2024 22:00 Inactive
@graphite-app graphite-app bot merged commit b6deb15 into main Dec 16, 2024
33 checks passed
@graphite-app graphite-app bot deleted the 12-17-improve_page_load_speed_for_project__connect_tab_by_skipping_a_redirect branch December 16, 2024 22:11
@vercel vercel bot temporarily deployed to Production – wallet-ui December 16, 2024 22:11 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground December 16, 2024 22:11 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 December 16, 2024 22:11 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