Skip to content

Commit a14caf9

Browse files
authored
merge: Fix Search Popup Overflow on Large Screens (#8256)
📌 Description This PR fixes the desktop search popup overflowing beyond the viewport on large screen sizes. Previously, the search dropdown used fixed widths and right-side positioning, which caused the popup to extend outside the visible viewport under certain desktop layouts. This affected the responsiveness and overall user experience. ✨ Changes Made Replaced fixed-width styling with responsive viewport-based sizing. Improved popup positioning to ensure it remains fully visible within the viewport. Preserved the existing desktop and mobile search behavior. Maintained the current UI design and animations. 🐛 Problem Solved Prevents the search popup from overflowing on large desktop screens. Ensures the entire search interface remains accessible and visible. Improves responsive behavior across different screen sizes. 🧪 Testing ✅ Tested on large desktop screens ✅ Tested on laptop resolution ✅ Tested on tablet viewport ✅ Verified mobile layout remains unaffected ✅ No console errors ✅ Existing search functionality works as expected 📸 Screenshots Before <img width="1366" height="766" alt="image" src="https://github.com/user-attachments/assets/8a3f1a99-6a52-4b3d-a8e7-12c44973789e" /> After <img width="1366" height="766" alt="image" src="https://github.com/user-attachments/assets/a699c57e-3976-4776-9f75-07de74f820b8" /> Checklist Code follows the project's coding standards. Responsive behavior has been verified. No existing functionality was broken. Ready for review. closes #7884
2 parents 320530d + b9bc028 commit a14caf9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/NavbarSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export default function NavbarSearch({ variant = 'desktop', onNavigate }: Navbar
169169

170170
{/* Desktop Search Panel */}
171171
{variant === 'desktop' && open && (
172-
<div className="absolute right-0 top-full mt-2 z-50 w-[calc(100vw-2rem)] max-w-[520px] sm:w-[450px] md:w-[520px] rounded-2xl border border-black/10 bg-white/95 p-3 shadow-2xl backdrop-blur-xl dark:border-white/10 dark:bg-[#0a0a0a]/95 animate-in fade-in slide-in-from-top-2 duration-200">
172+
<div className="absolute left-0 right-0 top-full mt-5 z-50 w-[calc(100vw-2rem)] max-w-[520px] sm:w-[450px] md:w-[520px] rounded-2xl border border-black/10 bg-white/95 p-3 shadow-2xl backdrop-blur-xl dark:border-white/10 dark:bg-[#0a0a0a]/95 animate-in fade-in slide-in-from-top-2 duration-200">
173173
{/* Search Input inside the dropdown */}
174174
<div className="relative flex items-center rounded-xl border border-black/10 bg-black/5 px-3 dark:border-white/15 dark:bg-white/5">
175175
<Search size={16} className="flex-shrink-0 text-gray-400 dark:text-gray-500" />

0 commit comments

Comments
 (0)