Skip to content

Redesigning Navbar Using TailwindCSS #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

che3zcake
Copy link

What has changed?

This PR addresses the feature request to redesign and implement the Navbar using TailwindCSS (or a UI library).
I have made all the necessary changes listed in the PR and completed the implementation as described.

I can revamp the whole navbar but I wasn't sure what design would be fitting and so i went with the mix of the previous navbar and custom tailwind implementation.

Keploy.Documentation.1.mp4

This PR Resolves #2769

Type of change

Please delete options that are not relevant.

  • [ ✅ ] New feature (non-breaking change which adds functionality).

How Has This Been Tested?

I have done both npm run build and npm run serve and both runs fine. I have attached the screenshot of the output of both commands

image

Checklist:

  • [✅ ] My code follows the style guidelines of this project.
  • [✅ ] I have performed a self-review of my own code.

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 22:01
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you and congratulations 🎉 for opening your very first pull request in keploy

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR revamps the site navbar by replacing static items with TailwindCSS-styled dropdown components and wiring them into the theme.

  • Introduces CustomProductsDropdown and CustomBlogDropdown with TailwindCSS styling.
  • Registers the new dropdowns in ComponentTypes.js and updates docusaurus.config.js to use them.
  • Adds small CSS modules and updates theme navbar item logic for consistency.

Reviewed Changes

Copilot reviewed 27 out of 33 changed files in this pull request and generated 2 comments.

File Description
src/theme/NavbarItem/CustomProductsDropdown.js Adds TailwindCSS-styled products dropdown component.
src/theme/NavbarItem/CustomBlogDropdown.js Adds TailwindCSS-styled blog dropdown component.
src/theme/NavbarItem/ComponentTypes.js Registers custom dropdown types in the component map.
docusaurus.config.js Switches navbar items to use new custom dropdown types.
Comments suppressed due to low confidence (3)

src/theme/NavbarItem/CustomProductsDropdown.js:6

  • [nitpick] The state variable drop is ambiguous. Rename it to isDropdownOpen (and setIsDropdownOpen) for clearer intent.
  const [drop, setDrop] = useState(false);

src/theme/NavbarItem/CustomBlogDropdown.js:40

  • [nitpick] The state updater setDrop and its usage are unclear. Consider renaming to isDropdownOpen / setIsDropdownOpen to improve readability.
            onClick={() => setDrop((prev) => !prev)}

src/theme/NavbarItem/CustomProductsDropdown.js:5

  • There are no tests for this new dropdown component. Consider adding unit tests to cover open/close behavior and keyboard interactions.
export default function CustomProductsDropdown() {

docsVersion: DocsVersionNavbarItem,
docsVersionDropdown: DocsVersionDropdownNavbarItem,
'custom-products-dropdown': CustomProductsDropdown,
'custom-blog-dropdown': CustomBlogDropdown
Copy link
Preview

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

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

Add a trailing comma after the last property for consistency with the project's style guide.

Suggested change
'custom-blog-dropdown': CustomBlogDropdown
'custom-blog-dropdown': CustomBlogDropdown,

Copilot uses AI. Check for mistakes.

<div ref={dropdownRef} className="relative font-inter font-medium mr-2 hidden lg:block">
<div className="flex flex-col relative">
<div className="w-max">
<button
Copy link
Preview

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

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

Add an aria-label to the toggle button (e.g. aria-label="Toggle products menu") to improve screen reader support.

Copilot uses AI. Check for mistakes.

che3zcake and others added 4 commits June 24, 2025 03:33
Signed-off-by: Lawrence Sharma <[email protected]>
* docs: adding atg public docs for installation and explanation

Signed-off-by: Neha Gupta <[email protected]>

* docs: adding atg public docs for fix with ai

Signed-off-by: Neha Gupta <[email protected]>

* chore: atg operations (keploy#587)

* chore: atg operations (keploy#587)

* docs: adding atg public docs for fix with ai

Signed-off-by: Neha Gupta <[email protected]>

---------

Signed-off-by: Neha Gupta <[email protected]>
Co-authored-by: Tvisha <[email protected]>
Signed-off-by: Lawrence Sharma <[email protected]>
@amaan-bhati
Copy link
Member

Hey @che3zcake Thanks for raising this PR, the nav ui looks slighlty better now. Just a few concerns in the preview:

  1. I think the ui of the nav after hover should be in dark mode when the dark mode is turned on, the nav ui is still in light mode even when the dark mode is on.
  2. The animation looks a bit slow to me, you can take references from the keploy landing page and match the speed of the animation if you want to.

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.

4 participants