Skip to content

chore: fix navigation to home#798

Merged
ghostdevv merged 3 commits intonpmx-dev:mainfrom
iiio2:chore/fix-navbar-navigation
Feb 12, 2026
Merged

chore: fix navigation to home#798
ghostdevv merged 3 commits intonpmx-dev:mainfrom
iiio2:chore/fix-navbar-navigation

Conversation

@iiio2
Copy link
Contributor

@iiio2 iiio2 commented Feb 3, 2026

This is for the mobile version.

In the Navbar we get logo + search icon in any page like "/about", "/compare" etc. When we click on the search icon it expands a searchbar. Currently when we click on the logo, it also expands a searchbar. I mean I think when we click on logo we should navigate to "/" page. In the desktop version, when we click on the logo, it navigates to "/" page.

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 12, 2026 4:46pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 12, 2026 4:46pm
npmx-lunaria Ignored Ignored Feb 12, 2026 4:46pm

Request Review

@danielroe
Copy link
Member

it's intentional, to reduce clicks when searching.

what we could do is add an additional search button in the header, that expands into the search bar when clicked. it could be located next to the mobile menu button on the right

@danielroe danielroe marked this pull request as draft February 3, 2026 09:48
@iiio2 iiio2 force-pushed the chore/fix-navbar-navigation branch from 7735fea to ea88a00 Compare February 3, 2026 10:00
@iiio2
Copy link
Contributor Author

iiio2 commented Feb 3, 2026

@danielroe , I think I've done it now.

image-search

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@ghostdevv ghostdevv added this pull request to the merge queue Feb 12, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The AppHeader.vue component has been refactored to improve mobile navigation handling. The mobile logo element was converted from a non-functional button to a NuxtLink for home navigation with updated accessibility labels. The inline search icon was removed from the logo area. A new mobile search trigger button (ButtonBase) was introduced, appearing conditionally when not on the home page and when search is not expanded. The desktop layout structure remains unchanged, though the logo section now consistently uses NuxtLink for navigation. Minor CSS class adjustments were made to the nav container.

Possibly related PRs

Suggested labels

front

Suggested reviewers

  • danielroe
  • serhalp
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, describing the mobile navbar logo navigation issue and the expected fix.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/components/AppHeader.vue (1)

276-284: Consider placing v-if before other attributes for consistency.

Vue style guides typically recommend placing directives like v-if near the top of the attribute list for better readability. This is a minor style suggestion.

♻️ Suggested reordering
       <ButtonBase
+        v-if="!isSearchExpanded && !isOnHomePage"
         type="button"
         class="sm:hidden ms-auto"
         :aria-label="$t('nav.tap_to_search')"
         :aria-expanded="isSearchExpanded"
         `@click`="expandMobileSearch"
-        v-if="!isSearchExpanded && !isOnHomePage"
         classicon="i-carbon:search"
       />

Comment on lines +275 to +284
<!-- Mobile: Search button (expands search) -->
<ButtonBase
type="button"
class="sm:hidden ms-auto"
:aria-label="$t('nav.tap_to_search')"
:aria-expanded="showMobileMenu"
@click="expandMobileSearch"
v-if="!isSearchExpanded && !isOnHomePage"
classicon="i-carbon:search"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Incorrect aria-expanded binding on mobile search button.

The aria-expanded attribute is bound to showMobileMenu, but this button controls search expansion, not the mobile menu. Screen readers will announce the wrong state.

🐛 Proposed fix
       <ButtonBase
         type="button"
         class="sm:hidden ms-auto"
         :aria-label="$t('nav.tap_to_search')"
-        :aria-expanded="showMobileMenu"
+        :aria-expanded="isSearchExpanded"
         `@click`="expandMobileSearch"
         v-if="!isSearchExpanded && !isOnHomePage"
         classicon="i-carbon:search"
       />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<!-- Mobile: Search button (expands search) -->
<ButtonBase
type="button"
class="sm:hidden ms-auto"
:aria-label="$t('nav.tap_to_search')"
:aria-expanded="showMobileMenu"
@click="expandMobileSearch"
v-if="!isSearchExpanded && !isOnHomePage"
classicon="i-carbon:search"
/>
<!-- Mobile: Search button (expands search) -->
<ButtonBase
type="button"
class="sm:hidden ms-auto"
:aria-label="$t('nav.tap_to_search')"
:aria-expanded="isSearchExpanded"
`@click`="expandMobileSearch"
v-if="!isSearchExpanded && !isOnHomePage"
classicon="i-carbon:search"
/>

Merged via the queue into npmx-dev:main with commit a725ea6 Feb 12, 2026
17 checks passed
@iiio2
Copy link
Contributor Author

iiio2 commented Feb 12, 2026

Thanks @danielroe , @ghostdevv .

@iiio2 iiio2 deleted the chore/fix-navbar-navigation branch February 12, 2026 17:22
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.

3 participants