Skip to content

feat:mobile nav empty space#8722

Open
igorrm19 wants to merge 8 commits intonodejs:mainfrom
igorrm19:feat/mobile-nav-empty-space
Open

feat:mobile nav empty space#8722
igorrm19 wants to merge 8 commits intonodejs:mainfrom
igorrm19:feat/mobile-nav-empty-space

Conversation

@igorrm19
Copy link

@igorrm19 igorrm19 commented Mar 14, 2026

Description

This PR fixes an issue where an unwanted empty space was rendered in the mobile navigation menu when the navigation bar did not contain any child elements. It resolves this by ensuring the navItems container is only rendered when the navItems array has a length greater than zero.

Validation

To verify this change, visually inspect the mobile navigation menu on a page or configuration where navItems is empty or not provided. The menu should no longer contain an empty padded area at the bottom.

Related Issues

Fixes #8719

Check List

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

igorrm19 and others added 3 commits March 7, 2026 02:50
Only render the navItems container when the array has items to prevent
an empty padded container from creating unwanted space in the mobile navigation.
@igorrm19 igorrm19 requested a review from a team as a code owner March 14, 2026 09:05
@vercel
Copy link

vercel bot commented Mar 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Mar 14, 2026 5:42pm

Request Review

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

Signed-off-by: Igor Rodrigues Machado <107290125+igorrm19@users.noreply.github.com>
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
Signed-off-by: Igor Rodrigues Machado <107290125+igorrm19@users.noreply.github.com>
Is this breaking the build with navItems?.length > 0 &&

Signed-off-by: Igor Rodrigues Machado <107290125+igorrm19@users.noreply.github.com>
Removed unnecessary blank line before the main navigation items div.

Signed-off-by: Igor Rodrigues Machado <107290125+igorrm19@users.noreply.github.com>
@ovflowd ovflowd changed the title Feat/mobile nav empty space feat:mobile nav empty space Mar 14, 2026
@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.07%. Comparing base (abe2187) to head (a55e468).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8722      +/-   ##
==========================================
- Coverage   75.10%   75.07%   -0.04%     
==========================================
  Files         104      104              
  Lines        9162     9167       +5     
  Branches      315      316       +1     
==========================================
+ Hits         6881     6882       +1     
- Misses       2279     2283       +4     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@igorrm19
Copy link
Author

@ovflowd Is there still a problem with this PR? It's extremely simple and the errors were fixed a long time ago. If you don't want people contributing to the project, just close it, because that's what it seems like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimize empty space in Mobile Navigation

2 participants