nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

fix: open external link in new tab for navbar items

Open hisamafahri opened this issue 1 year ago • 6 comments

Description

Open external navigation bar's link in new tab

Validation

If clicked in the Certification and Docs in the navbar, should open it in the new tab.

Related Issues

None

Check List

  • [x] I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • [x] I have run npx turbo format to ensure the code follows the style guide.
  • [x] I have run npx turbo test to check if all tests are passing.
  • [x] I have run npx turbo build to check if the website builds without errors.
  • [x] I've covered new added functionality with unit tests if necessary.

hisamafahri avatar Mar 19 '24 22:03 hisamafahri

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Mar 19, 2024 10:19pm

vercel[bot] avatar Mar 19 '24 22:03 vercel[bot]

Honestly, I'm not in favour of this change, because if a user wants to go to the docs and goes through nodejs.org, they'll end up with two tabs open, which will "take time" to close. I think that opening a new tab should only be done when the user needs to keep the source page open, which isn't the case here.

AugustinMauroy avatar Mar 20 '24 07:03 AugustinMauroy

@AugustinMauroy That's a good point. However, I believe the expectations for most users are to open the clicked link in a new tab whenever they see a top-right arrow (↗) since it is mostly used as an indicator for a link from another site.

Either way, whatever decision will be made (open in a new tab, remove the arrow, or even keep the current behaviour), I am all for it 🙆‍♂️ .

hisamafahri avatar Mar 20 '24 11:03 hisamafahri

@AugustinMauroy are you okay with moving this forward?

bmuenzenmeyer avatar Mar 26 '24 00:03 bmuenzenmeyer

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 94 🟢 90 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 91 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 90 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟠 89 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 90 🟢 100 🟢 92 🔗

github-actions[bot] avatar Mar 26 '24 00:03 github-actions[bot]

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 84%
80.07% (450/562) 79.55% (144/181) 71.17% (79/111)

Unit Test Report

Tests Skipped Failures Errors Time
90 0 :zzz: 0 :x: 0 :fire: 4.425s :stopwatch:

github-actions[bot] avatar Mar 26 '24 00:03 github-actions[bot]

@AugustinMauroy are you okay with moving this forward?

I'm in favor of keeping this behavior. But modifying api docs link to not have icons and blank page.

AugustinMauroy avatar Mar 26 '24 08:03 AugustinMauroy

@AugustinMauroy i appreciate your thoughts but am going to merge this. it's generally common consensus that

  • the arrow means you are leaving the site
  • its a courteous gesture in today's tab based browsing to open blank

if you feel strongly, please block it in future discussions

bmuenzenmeyer avatar Mar 26 '24 11:03 bmuenzenmeyer

that being said, some of the usage here is probably wrong (credit @ovflowd for mentioning this) image

bmuenzenmeyer avatar Mar 26 '24 11:03 bmuenzenmeyer