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

fix: use html links when needed #6103

Merged
merged 1 commit into from
Nov 11, 2023
Merged

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Nov 9, 2023

Description

Since we use the Next.js's Link component dynamically, it sadly always tries to prefetch even external links and request RSC versions of said pages. This causes exceptions such as (https://nodejs-org.sentry.io/issues/4616983365/?project=4506191307735040&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=1).

In the future we will always be relying on Next.js's Link component as we remove the remainder of static Components such as Header and Footer and others, hence we should actually use the approach we had until before, that was being handled by LocalizedLink component, and that we removed as next-intl has a built-in Link component.

But we still need a custom Link component to simply handle these scenarios of when the URL is external or not defined to not used Next.js's Link Component and simply a bare-bones a element.

Validation

All links should be working, external links such as the SHASUMS256 should not be requesting prefetching anymore

Related Issues

Sentry: https://nodejs-org.sentry.io/issues/4616983365/

@ovflowd ovflowd requested a review from a team as a code owner November 9, 2023 14:55
Copy link

vercel bot commented Nov 9, 2023

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Nov 9, 2023 2:55pm

@ovflowd ovflowd added bug infrastructure Issues/PRs related to the Repository Infra github_actions:pull-request Trigger Pull Request Checks labels Nov 9, 2023
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Nov 9, 2023
Copy link
Contributor

github-actions bot commented Nov 9, 2023

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 100 🟢 97 🟢 92 🟢 92 🔗
/en/about 🟢 100 🟢 95 🟢 92 🟢 92 🔗
/en/about/previous-releases 🟢 98 🟢 96 🟢 92 🟢 92 🔗
/en/download 🟢 100 🟢 97 🟢 92 🟢 92 🔗
/en/blog 🟢 95 🟢 97 🟠 83 🟢 92 🔗

Copy link

sentry-io bot commented Nov 9, 2023

Sentry issue: NODEJS-ORG-K

Copy link
Contributor

github-actions bot commented Nov 9, 2023

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 84%
79.34% (361/455) 64.81% (70/108) 63.04% (58/92)

Unit Test Report

Tests Skipped Failures Errors Time
54 0 💤 0 ❌ 0 🔥 5.042s ⏱️

@bmuenzenmeyer bmuenzenmeyer added this pull request to the merge queue Nov 11, 2023
Merged via the queue into main with commit 195dbfb Nov 11, 2023
23 checks passed
@bmuenzenmeyer bmuenzenmeyer deleted the fix/use-html-links-when-needed branch November 11, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infrastructure Issues/PRs related to the Repository Infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants