Fix/mobile menu resize bug#455
Open
pari-dubey1 wants to merge 3 commits into
Open
Conversation
|
@pari-dubey1 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary [required]
This PR fixes a responsive navigation issue where the mobile hamburger menu remained open when resizing the browser window from mobile view to desktop view. This caused both the mobile and desktop navigation menus to appear simultaneously.
The fix adds a resize listener that automatically closes and resets the mobile navigation state once the viewport crosses the desktop breakpoint, ensuring consistent responsive behaviour across screen sizes.
Additionally, while testing and debugging the issue, several unintended JavaScript syntax and duplicated logic issues in
script.jswere identified and cleaned up to restore proper functionality of the navbar and overall client-side interactions.Related Issue [required]
Closes #285
Type of Change [required]
data/projects.jsonWhat Was Changed [required]
static/js/script.jsstatic/js/script.jsstatic/js/script.jsrenderResults()conditional logicstatic/js/script.jsHow to Test This PR [required]
Clone this branch:
Install dependencies:
Run the app:
Open:
Open browser responsive/mobile mode
Set viewport to mobile width
Open the hamburger menu
Resize the browser window to desktop width
Verify that:
Run tests:
Expected result:
Test Results [required]
Screenrecording
Screen.Recording.2026-05-22.144304.mp4
Self-Review Checklist [required]
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
While implementing the responsive navbar fix, some pre-existing duplicated JavaScript blocks and syntax inconsistencies in
script.jswere discovered that prevented the navbar interactions from functioning correctly. These were cleaned up to restore stable client-side behaviour and ensure accurate testing of the assigned issue.