-
Notifications
You must be signed in to change notification settings - Fork 215
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
There was a problem hiding this 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
andCustomBlogDropdown
with TailwindCSS styling. - Registers the new dropdowns in
ComponentTypes.js
and updatesdocusaurus.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 toisDropdownOpen
(andsetIsDropdownOpen
) 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 toisDropdownOpen
/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 |
There was a problem hiding this comment.
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.
'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 |
There was a problem hiding this comment.
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.
Signed-off-by: Lawrence Sharma <[email protected]>
…#585) Signed-off-by: Neha Gupta <[email protected]>
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]>
Hey @che3zcake Thanks for raising this PR, the nav ui looks slighlty better now. Just a few concerns in the preview:
|
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.
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
Checklist: