Skip to content

addded search icon in in header#45

Merged
nitinmohan18 merged 1 commit into
mainfrom
improve-header
Jul 4, 2026
Merged

addded search icon in in header#45
nitinmohan18 merged 1 commit into
mainfrom
improve-header

Conversation

@nitinmohan18

@nitinmohan18 nitinmohan18 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Refined the Footer layout for a more premium, minimalist aesthetic and completely overhauled the Mobile Navbar Search experience for better usability and cleaner UI.


Related Issue

Closes #


Type of Change

  • Feature
  • Bug Fix
  • Documentation
  • Refactor
  • UI/UX Improvement
  • Performance Improvement
  • CI / Build
  • Other

What Changed?

  • Footer Redesign:
    • Replaced the bulky feature cards with an elegant, minimalist text layout ("Built for Engineering Students") with clean checkmarks.
    • Refined the heading typography ("Platform" and "Company") from heavy UPPERCASE to a cleaner Title Case with subtle letter spacing.
    • Optimized the grid column gaps to give the footer more premium breathing room while maintaining its original padding and structural top border.
  • Mobile Navbar Search Experience:
    • Removed the bulky search bar from inside the mobile hamburger menu drawer.
    • Added a dedicated, clean Search Icon directly to the left of the hamburger menu in the mobile header.
    • Clicking the search icon now smoothly slides open a dedicated search drawer below the header.
    • Fixed a clipping issue by making the search results dropdown flow naturally in the document, allowing it to seamlessly push the drawer open using framer-motion rather than getting cut off.

Screenshots (UI Changes Only)


Testing

Verified the mobile search toggle and dropdown expansion across different screen sizes to ensure animations run smoothly without clipping. Confirmed the mobile menu auto-closes when the search drawer is opened and vice-versa. Validated the typography and layout changes in the footer across desktop and mobile breakpoints.


Checklist

  • My branch is up to date with the latest main.
  • My code follows the project's coding standards.
  • I have formatted the modified files (npx prettier --write <file>).
  • npm run format:check passes.
  • npm run lint passes.
  • npm run typecheck passes.
  • npm run build passes.
  • I have updated documentation if required.
  • I have tested my changes locally.
  • This Pull Request focuses on a single feature or fix.

Summary by CodeRabbit

  • New Features

    • Added a mobile search drawer in the navbar, giving users quick access to university search on smaller screens.
    • Introduced separate mobile controls so opening search and opening the menu no longer interfere with each other.
  • Enhancements

    • Mobile search now uses the same search experience as desktop, including results, navigation, and feedback behavior.
    • Improved mobile search result formatting for clearer university details.

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hyper-learning-tech Ready Ready Preview, Comment Jul 4, 2026 4:38am

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The navbar component gains a separate mobile search drawer state, independent from the mobile menu toggle. New mobile action buttons open one drawer while closing the other. Mobile search results now display name and full name on one line with status below, and the mobile menu block is repositioned after the search drawer.

Changes

Mobile Search Drawer

Layer / File(s) Summary
Mobile search drawer state and UI
components/navbar.tsx
Adds isMobileSearchOpen state, mobile action toggles that mutually exclude the menu and search drawer, an animated search drawer with input and filtered dropdown wiring, and updated result text layout showing name - fullName and status on separate lines.
Mobile menu render order update
components/navbar.tsx
Moves the mobile navigation menu block (id="mobile-menu") to render after the new mobile search drawer, preserving existing animated open/close behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant MobileActions
  participant SearchDrawer
  participant MobileMenu

  User->>MobileActions: tap search icon
  MobileActions->>SearchDrawer: open (isMobileSearchOpen=true)
  MobileActions->>MobileMenu: close (isOpen=false)
  User->>SearchDrawer: type query
  SearchDrawer->>SearchDrawer: filter universities
  User->>SearchDrawer: select result
  SearchDrawer->>User: navigate / show toast
Loading

Possibly related PRs

Suggested reviewers: imuniqueshiv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the main mobile header change by mentioning the new search icon in the header.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-header

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nitinmohan18 nitinmohan18 merged commit ed0a6c5 into main Jul 4, 2026
5 checks passed
@nitinmohan18 nitinmohan18 deleted the improve-header branch July 4, 2026 04:39
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

🎉 Congratulations @nitinmohan18!

Thank you for contributing to HyperLearningTech.

Your pull request has been successfully merged into main.

📦 Merge Summary

🚀 Keep Contributing

  • Follow the CONTRIBUTING.md guidelines.
  • Keep each Pull Request focused on a single feature or fix.
  • Run formatting, linting, type checking, and a production build before opening a PR.

Thank you for helping make HyperLearningTech better.

Happy Coding! 🚀

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/navbar.tsx (1)

108-126: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Enter key won't close the mobile search drawer.

handleSearchKeyDown is reused for both the desktop bar and the new mobile drawer input (Line 469), but on Enter it only calls setIsOpen(false) (menu state) — it never touches isMobileSearchOpen. Since the mobile drawer opens by setting isOpen to false already (Line 421), this call is a no-op for the mobile drawer, leaving it open after submitting a search via Enter.

🐛 Proposed fix
   const handleSearchKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
     if (e.key === "Enter") {
       const element = document.getElementById("Universities");
       if (element) {
         element.scrollIntoView({ behavior: "smooth", block: "start" });
       } else {
         router.push("/#Universities");
       }
       setIsOpen(false);
+      setIsMobileSearchOpen(false);
     }
   };

Also applies to: 463-471

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/navbar.tsx` around lines 108 - 126, The Enter key handler in
handleSearchKeyDown only closes the desktop menu state, so it does not dismiss
the mobile search drawer when the same handler is used there. Update
handleSearchKeyDown to also close the mobile search state used by the drawer
(isMobileSearchOpen) when Enter is pressed, while keeping the existing
scroll/navigation behavior intact. Make sure the mobile input path that reuses
this handler is covered so submitting a search via Enter always closes the
drawer.
🧹 Nitpick comments (2)
components/navbar.tsx (2)

450-537: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Mobile dropdown duplicates the desktop dropdown almost verbatim.

The mobile search drawer's dropdown (Lines 473-533) reimplements the same filtering, selection handler, and result-item markup as the desktop dropdown (Lines 266-324), differing only in styling/animation. Consider extracting a shared SearchResultsDropdown component that both the desktop and mobile drawers render, to avoid the two copies drifting apart over time.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/navbar.tsx` around lines 450 - 537, The mobile search dropdown
duplicates the desktop search results logic and markup, which will drift over
time. Extract the shared filtering/selection UI into a reusable
SearchResultsDropdown component (or equivalent) and have both the desktop search
and the mobile search drawer render it with their respective styling/animation
wrappers. Keep the existing behavior in navbar.tsx by reusing the same handlers
and result item rendering via unique symbols like handleSearchChange,
handleSearchKeyDown, filteredUniversities, and the university click action.

417-427: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Mobile search toggle missing aria-expanded/aria-controls.

The menu toggle (Lines 435-437) exposes aria-expanded and aria-controls, but the new search toggle button only has aria-label. Add the equivalent attributes (and an id on the search drawer) for consistent screen-reader affordance.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/navbar.tsx` around lines 417 - 427, The mobile search toggle in
the navbar button is missing the same accessible state wiring used by the menu
toggle. Update the Search button in the mobile navbar controls to expose
aria-expanded and aria-controls, and add a matching id to the search
drawer/panel that it opens so screen readers can associate the control with the
content.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/navbar.tsx`:
- Around line 418-427: The mobile search toggle in the navbar does not fully
reset search state when closing, so the Universities section can remain filtered
after the drawer disappears. Update the button handler in `navbar.tsx` to clear
`searchQuery` and dispatch the same `university-search` event with `detail: ""`
when `isMobileSearchOpen` is turned off, matching the cleanup used after result
selection. Keep the existing `setIsMobileSearchOpen` and `setIsOpen` behavior,
but ensure the close path resets all mobile search state.

---

Outside diff comments:
In `@components/navbar.tsx`:
- Around line 108-126: The Enter key handler in handleSearchKeyDown only closes
the desktop menu state, so it does not dismiss the mobile search drawer when the
same handler is used there. Update handleSearchKeyDown to also close the mobile
search state used by the drawer (isMobileSearchOpen) when Enter is pressed,
while keeping the existing scroll/navigation behavior intact. Make sure the
mobile input path that reuses this handler is covered so submitting a search via
Enter always closes the drawer.

---

Nitpick comments:
In `@components/navbar.tsx`:
- Around line 450-537: The mobile search dropdown duplicates the desktop search
results logic and markup, which will drift over time. Extract the shared
filtering/selection UI into a reusable SearchResultsDropdown component (or
equivalent) and have both the desktop search and the mobile search drawer render
it with their respective styling/animation wrappers. Keep the existing behavior
in navbar.tsx by reusing the same handlers and result item rendering via unique
symbols like handleSearchChange, handleSearchKeyDown, filteredUniversities, and
the university click action.
- Around line 417-427: The mobile search toggle in the navbar button is missing
the same accessible state wiring used by the menu toggle. Update the Search
button in the mobile navbar controls to expose aria-expanded and aria-controls,
and add a matching id to the search drawer/panel that it opens so screen readers
can associate the control with the content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f272636-4773-4db5-a2ec-12999e54c814

📥 Commits

Reviewing files that changed from the base of the PR and between 1410294 and de28113.

📒 Files selected for processing (1)
  • components/navbar.tsx

Comment thread components/navbar.tsx
Comment on lines +418 to +427
<button
onClick={() => {
setIsMobileSearchOpen(!isMobileSearchOpen);
setIsOpen(false); // Close menu if search is opened
}}
aria-label="Toggle mobile search"
className="rounded-xl p-2 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1D4ED8]/50 dark:focus-visible:ring-white/50"
>
<Search className="h-5 w-5" />
</button>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the relevant component and locate search state/event dispatch logic.
git ls-files 'components/navbar.tsx'
ast-grep outline components/navbar.tsx --view expanded || true
rg -n "searchQuery|university-search|setIsMobileSearchOpen|setIsOpen|dispatchEvent|CustomEvent|search" components/navbar.tsx
sed -n '360,520p' components/navbar.tsx

Repository: imuniqueshiv/HyperLearningTech

Length of output: 10202


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '95,145p' components/navbar.tsx
printf '\n----\n'
sed -n '240,305p' components/navbar.tsx

Repository: imuniqueshiv/HyperLearningTech

Length of output: 5251


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "university-search|addEventListener\\(" .

Repository: imuniqueshiv/HyperLearningTech

Length of output: 932


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' features/landing/universities.tsx

Repository: imuniqueshiv/HyperLearningTech

Length of output: 5469


Clear the mobile search state when the toggle closes the drawer. Closing isMobileSearchOpen leaves searchQuery and the last "university-search" event in place, so the Universities section can stay filtered after the drawer disappears. Reset searchQuery and dispatch detail: "" on close, matching the result-selection cleanup.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/navbar.tsx` around lines 418 - 427, The mobile search toggle in
the navbar does not fully reset search state when closing, so the Universities
section can remain filtered after the drawer disappears. Update the button
handler in `navbar.tsx` to clear `searchQuery` and dispatch the same
`university-search` event with `detail: ""` when `isMobileSearchOpen` is turned
off, matching the cleanup used after result selection. Keep the existing
`setIsMobileSearchOpen` and `setIsOpen` behavior, but ensure the close path
resets all mobile search state.

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.

1 participant