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

feat(search): Enhance shortcut key transition for OS detection

Open edereagzi opened this issue 2 years ago • 3 comments

Description

This pull request introduces a smoother transition for the shortcut key display within the search component. Previously, the shortcut key would abruptly change from "Ctrl K" to "Cmd K" (or vice versa) based on the operating system detection. This behavior caused a visual flash that was jarring to the user.

Validation

Before:

https://github.com/nodejs/nodejs.org/assets/81780268/3dbf1ebd-46eb-4f44-a135-050d819a3507

After:

https://github.com/nodejs/nodejs.org/assets/81780268/f4de5878-21c2-4b8e-bc41-4151efc53824

Related Issues

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.

edereagzi avatar Mar 26 '24 15:03 edereagzi

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Mar 26, 2024 5:49pm

vercel[bot] avatar Mar 26 '24 15:03 vercel[bot]

Lighthouse Results

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

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

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 83%
79.33% (453/571) 76.06% (143/188) 69.91% (79/113)

Unit Test Report

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

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