Skip to content

fix: redundant mobile menu close logic#992

Merged
danielroe merged 1 commit intonpmx-dev:mainfrom
NandkishorJadoun:fix/duplicate-close-button
Feb 5, 2026
Merged

fix: redundant mobile menu close logic#992
danielroe merged 1 commit intonpmx-dev:mainfrom
NandkishorJadoun:fix/duplicate-close-button

Conversation

@NandkishorJadoun
Copy link
Copy Markdown
Contributor

Description

Refactored the mobile menu trigger in the header to act strictly as an "Open" trigger. Previously, the button attempted to toggle between a hamburger and a close icon. However, because the HeaderMobileMenu overlay covers the header when active, the close icon was invisible/inaccessible, creating redundant logic and potential state confusion.

Changes

  • Updated the mobile menu button to always display the i-carbon:menu icon.
  • Simplified @click logic from a toggle to strictly setting showMobileMenu = true.
  • Standardized aria-label to always reflect "Open Menu" for better accessibility consistency.

Before & After

Before After
Screencast.from.05-02-26.12.01.01.PM.IST.webm
Screencast.from.05-02-26.12.04.15.PM.IST.webm

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 5, 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 5, 2026 6:57am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 5, 2026 6:57am
npmx-lunaria Ignored Ignored Feb 5, 2026 6:57am

Request Review

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 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!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

The mobile menu button in AppHeader.vue has been simplified. Previously, the button dynamically toggled aria-label and aria-expanded attributes based on menu state, switching between menu and close icons. The updated implementation removes this conditional logic. The button now always displays the menu icon and consistently uses the same aria-label for opening the menu, with showMobileMenu always set to true on click. These changes affect the menu's control flow and accessibility attribute handling. The package.json file has also been modified with 4 lines added and 9 removed.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the rationale for changes, outlines specific modifications to the mobile menu button behaviour, and includes before/after comparisons.

✏️ 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

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

@danielroe danielroe added this pull request to the merge queue Feb 5, 2026
Merged via the queue into npmx-dev:main with commit 7c8a637 Feb 5, 2026
16 checks passed
@NandkishorJadoun NandkishorJadoun deleted the fix/duplicate-close-button branch February 10, 2026 03:59
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.

2 participants