Skip to content

Conversation

@kanishka-commits
Copy link
Contributor

Description

Fixes #1017

Problem Summary

The issue was caused by a breakpoint mismatch between the custom CSS and Docusaurus’s default responsive behavior.
As a result, the hamburger menu appeared but did not function between screen widths of 1300px and 996px.

Why This Happened

  • In the custom stylesheet (Section 11), a media query @media (max-width: 1299px) was used to hide navbar items and show the hamburger icon.
  • However, Docusaurus’s internal logic only activates the mobile sidebar (the menu opened by the hamburger) at @media (max-width: 996px).
  • Between these two breakpoints (1300–996px), the hamburger button was visible but non-functional, since the mobile sidebar behavior wasn’t active yet.
  • This created a “dead zone” where navigation items were hidden and the hamburger didn’t respond — effectively breaking the navbar for medium-sized screens.

Solution Summary

The PR introduces a 3-step fix that completely resolves the dead zone and improves the overall responsiveness of the navbar.

1. Aligned Breakpoint (Core Fix)

Earlier

Screen.Recording.2025-10-25.at.12.11.53.AM.mov
  • Updated the media query in custom.css (Section 11) from
    max-width: 1299pxmax-width: 996px.
  • This synchronization ensures the hamburger menu only appears when Docusaurus’s mobile sidebar is actually active.
  • ✅ Eliminates the non-functional zone between 1300px and 996px.

2. Responsive UI Update

  • Added a new rule (e.g., @media (max-width: 1110px)) to hide the “Sign in with GitHub” text, keeping only the icon visible.
  • This ensures the navbar remains clean and uncluttered on medium-sized screens (≈1000–1200px), where space is limited.
  • ✅ Prevents text wrapping or layout shifts.

3. Button Consistency (UX Improvement)

Earlier
Screenshot 2025-10-25 at 12 15 39 AM

  • Verified that the GitHub sign-in button/icon is visible both in the main navbar (desktop) and inside the mobile sidebar (mobile view).
  • ✅ Ensures consistent access to authentication options across all devices.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • UI/UX improvement (design, layout, or styling updates)

Changes Made

Screen.Recording.2025-10-25.at.12.10.06.AM.mov
  • Synchronized custom breakpoint with Docusaurus default (996px)
  • Added responsive CSS to toggle GitHub button text/icon
  • Ensured login button consistency between navbar and sidebar
  • Verified full responsiveness across major viewport ranges

Dependencies

  • No new dependencies added
  • No version or configuration changes required

Checklist

  • My code follows the style guidelines of this project
  • I have tested my changes across major browsers and devices
  • My changes do not generate new console warnings or errors
  • I ran npm run build successfully and verified responsive behavior
  • This PR corresponds to an issue already assigned to me

@vercel
Copy link
Contributor

vercel bot commented Oct 24, 2025

@kanishka-commits is attempting to deploy a commit to the recode Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs.

In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊

Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv.

We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰

🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨

📚Your perks for contribution to this community 👇🏻

  1. Get free Consultation use code recode50 to get free: Mentorship for free.

  2. Get the Ebook for free use code recode at checkout: Data Science cheatsheet for Beginners.

  3. Check out this weekly Newsletter: Sanjay's Newsletter.

If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@github-actions github-actions bot added hacktoberfest-accepted recode this is label for leaderboard level 1 10 points labels Oct 24, 2025
@github-actions github-actions bot added this to the recode:launch 3.0 milestone Oct 24, 2025
@github-actions
Copy link

✅ Synchronized metadata from Issue #1017:

  • Labels: level 1, recode, hacktoberfest-accepted
  • Milestone: recode:launch 3.0

Copy link
Contributor

@sheikhlimon sheikhlimon left a comment

Choose a reason for hiding this comment

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

Good start though I don’t think this fully solves the problem as intended. It might be worth checking section 10. Try to find a sweet spot for both of them. I would suggest look a bit more into media query and how it should handle breakpoints in mobile and tablet as well as desktop

@sheikhlimon
Copy link
Contributor

@kanishka-commits this is what i see
screenshot-2025-10-25_09-12-07

i can see the github icon on medium screen
instead of showing it here i guess you can add one inside the hamburger menu
screenshot-2025-10-25_08-57-37

CC @sanjay-kv @iitzIrFan

@github-actions
Copy link

✅ Synchronized metadata from Issue #1017:

  • Labels: level 1, recode, hacktoberfest-accepted
  • Milestone: recode:launch 3.0

@github-actions
Copy link

✅ Synchronized metadata from Issue #1017:

  • Labels: level 1, recode, hacktoberfest-accepted
  • Milestone: recode:launch 3.0

@github-actions
Copy link

✅ Synchronized metadata from Issue #1017:

  • Labels: level 1, recode, hacktoberfest-accepted
  • Milestone: recode:launch 3.0

@github-actions
Copy link

✅ Synchronized metadata from Issue #1017:

  • Labels: level 1, recode, hacktoberfest-accepted
  • Milestone: recode:launch 3.0

@kanishka-commits
Copy link
Contributor Author

@sheikhlimon
Yes I completely agree, this commit doesn’t fully resolve the navbar issue for smaller viewports. I’ll review all the required sections, look more closely into media queries and raise a separate issue to optimize it further.

About the GitHub, I've made the necessary changes:

  • Added "Sign in" text instead of simple icon as updated earlier
  • Decreased the gap for smaller viewports, to fit the text for consistent UI

Kindly review the commits and let me know.

Changes made

505621649-cdc4beb7-5fbf-4e89-a296-59482dfb11a3.mov

Copy link
Contributor

@sheikhlimon sheikhlimon left a comment

Choose a reason for hiding this comment

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

Thanks for your hard work..
I can see the Sign in button
but on my normal screen.. i can still see the same thing
screenshot-2025-10-25_16-22-39

@kanishka-commits
Copy link
Contributor Author

@sheikhlimon
May I know, by the "same thing" you meant the inconsistent gaps in the dropdown for Docs?

@sheikhlimon
Copy link
Contributor

sheikhlimon commented Oct 25, 2025

@sheikhlimon May I know, by the "same thing" you meant the inconsistent gaps in the dropdown for Docs?

yes and this as well
screenshot-2025-10-25_16-35-40

Edit: I was able to achieve this when i tried to fix it but couldn't fix it after this point

@kanishka-commits
Copy link
Contributor Author

@sheikhlimon
About the dropdown, if that is the case, the navbar dropdown issue will be addressed in a separate PR, as this one was specifically for the hamburger gap.

Regarding the “Sign in” text, the changes have already been implemented in the latest commit, please take a look to see the updated version.
Screenshot 2025-10-25 at 4 13 29 PM

@sheikhlimon
Copy link
Contributor

this is the confusing part
so on live site i can see this on 95% zoom
screenshot-2025-10-25_16-40-25

after you changes its working for 95% zoom as well.. the issue is normally on 100% it should show what it shows on 95%
for your better understanding on 95% zoom the screen resolution is 1338p on 100% its 1268p
screenshot-2025-10-25_16-40-49

@sheikhlimon
Copy link
Contributor

sheikhlimon commented Oct 25, 2025

@sheikhlimon About the dropdown, if that is the case, the navbar dropdown issue will be addressed in a separate PR, as this one was specifically for the hamburger gap.

Regarding the “Sign in” text, the changes have already been implemented in the latest commit, please take a look to see the updated version. Screenshot 2025-10-25 at 4 13 29 PM

i can see the Sign in on medium screen that part is done.. im talking about normal screen the more and sign in is overlapping each other

@sheikhlimon
Copy link
Contributor

this is the confusing part so on live site i can see this on 95% zoom screenshot-2025-10-25_16-40-25

after you changes its working for 95% zoom as well.. the issue is normally on 100% it should show what it shows on 95% for your better understanding on 95% zoom the screen resolution is 1338p on 100% its 1268p screenshot-2025-10-25_16-40-49

@kanishka-commits I have attached the resolution here i see this on.. so check it out if you see the same

@kanishka-commits
Copy link
Contributor Author

@sheikhlimon
It's indeed confusing, as this's how my home page looks like, on your provided resolution.
Screenshot 2025-10-25 at 4 27 33 PM

As I can see, on both my local as well as deployed web-app, the gap between the left (docs->more) and right nav-items(github->toggle) are significant but on your local device, it looks as if it's not present there, May I know why is this the case?

@sheikhlimon
Copy link
Contributor

@sheikhlimon It's indeed confusing, as this's how my home page looks like, on your provided resolution. Screenshot 2025-10-25 at 4 27 33 PM

As I can see, on both my local as well as deployed web-app, the gap between the left (docs->more) and right nav-items(github->toggle) are significant but on your local device, it looks as if it's not present there, May I know why is this the case?

check on 1268.. 1338 is good

@kanishka-commits
Copy link
Contributor Author

@sheikhlimon Yes I completely agree, this commit doesn’t fully resolve the navbar issue for smaller viewports. I’ll review all the required sections, look more closely into media queries and raise a separate issue to optimize it further.

About the GitHub, I've made the necessary changes:

  • Added "Sign in" text instead of simple icon as updated earlier
  • Decreased the gap for smaller viewports, to fit the text for consistent UI

Kindly review the commits and let me know.

Changes made

505621649-cdc4beb7-5fbf-4e89-a296-59482dfb11a3.mov

@sheikhlimon
In this .mov file, I’ve demonstrated the viewports ranging from 1299px to 970px. Kindly take a look starting from 1268px, I hope this helps

@sheikhlimon
Copy link
Contributor

sheikhlimon commented Oct 25, 2025

now w

@kanishka-commits I just checked on multiple browsers, and the behavior is different on every single one of them... playing with media query in docusaurus is like fighting with it...lol.. the default docusaurus makes it look snappier i guess everything looks fine.. with your changes.. this seems like an ok fix... but not satisfactory to me..
@sanjay-kv @iitzIrFan might differ

But nonetheless, I really appreciate the work you put in.. Thank you..

@kanishka-commits
Copy link
Contributor Author

@sheikhlimon
Thanks a lot for checking across browsers!
Agreed, Docusaurus media queries might be a bit tricky
Since it worked well across all major browsers I’ve tested so far, I decided to go ahead with this fix for now.
Totally get your point though: open to refining it further if we find a cleaner solution.
Appreciate the feedback!

@vercel
Copy link
Contributor

vercel bot commented Oct 26, 2025

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

Project Deployment Preview Comments Updated (UTC)
recode-website Ready Ready Preview Comment Oct 26, 2025 2:03am

@sanjay-kv sanjay-kv merged commit fb7b92e into recodehive:main Oct 26, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted level 1 10 points recode this is label for leaderboard

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🐞[Bug]: Hamburger Menu Appears but Doesn't Display Content Between 1300px and 996px Screen Width

3 participants