nodejs.org
nodejs.org copied to clipboard
fix: correct same level side navigation on breadcrumbs
Description
- Update side bar navigation key name to match with route path in
navigation.json - Add target side bar nav keys to HOC
withBreadcrumbs.tsxto get directly sidebar navigation data forAbout.tsxandLearn.tsxpage. - Update logic on matching route path in function
getBreadrumbsof HOCwithBreadcrumbs.tsx.
Validation
- Open page path
/en/about/, go through all items in side bar navigation to see it shows correct breadcrumbs data.
Related Issues
Fixes #6679
Check List
- [x] I have read the Contributing Guidelines and made commit messages that follow the guideline.
- [x] I have run
npm run formatto ensure the code follows the style guide. - [x] I have run
npm run testto check if all tests are passing. - [x] I have run
npx turbo buildto check if the website builds without errors. - [ ] I've covered new added functionality with unit tests if necessary.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nodejs-org | ✅ Ready (Inspect) | Visit Preview | May 4, 2024 5:11pm |
Lighthouse Results
| URL | Performance | Accessibility | Best Practices | SEO | Report |
|---|---|---|---|---|---|
| /en | 🟢 99 | 🟢 100 | 🟢 100 | 🟢 91 | 🔗 |
| /en/about | 🟢 99 | 🟢 100 | 🟢 100 | 🟢 91 | 🔗 |
| /en/about/previous-releases | 🟢 97 | 🟢 100 | 🟢 100 | 🟢 92 | 🔗 |
| /en/download | 🟢 98 | 🟢 100 | 🟢 100 | 🟢 91 | 🔗 |
| /en/blog | 🟢 99 | 🟢 100 | 🟢 96 | 🟢 92 | 🔗 |
Unit Test Coverage Report
| Lines | Statements | Branches | Functions |
|---|---|---|---|
| 90.04% (588/653) | 76.08% (175/230) | 92.18% (118/128) |
Unit Test Report
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 128 | 0 :zzz: | 0 :x: | 0 :fire: | 6.137s :stopwatch: |
thanks for this thoughtful contribution @tquocanvn - sorry for the delay!