Redesigning Navbar Using TailwindCSS #589
Conversation
There was a problem hiding this comment.
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
CustomProductsDropdownandCustomBlogDropdownwith TailwindCSS styling. - Registers the new dropdowns in
ComponentTypes.jsand updatesdocusaurus.config.jsto 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
dropis ambiguous. Rename it toisDropdownOpen(andsetIsDropdownOpen) for clearer intent.
const [drop, setDrop] = useState(false);
src/theme/NavbarItem/CustomBlogDropdown.js:40
- [nitpick] The state updater
setDropand its usage are unclear. Consider renaming toisDropdownOpen/setIsDropdownOpento 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.
Add a trailing comma after the last property for consistency with the project's style guide.
| 'custom-blog-dropdown': CustomBlogDropdown | |
| 'custom-blog-dropdown': CustomBlogDropdown, |
| <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.
Add an aria-label to the toggle button (e.g. aria-label="Toggle products menu") to improve screen reader support.
Signed-off-by: Lawrence Sharma <che3zcake@gmail.com>
…#585) Signed-off-by: Neha Gupta <gneha21@yahoo.in>
Signed-off-by: Lawrence Sharma <che3zcake@gmail.com>
* docs: adding atg public docs for installation and explanation Signed-off-by: Neha Gupta <gneha21@yahoo.in> * docs: adding atg public docs for fix with ai Signed-off-by: Neha Gupta <gneha21@yahoo.in> * chore: atg operations (keploy#587) * chore: atg operations (keploy#587) * docs: adding atg public docs for fix with ai Signed-off-by: Neha Gupta <gneha21@yahoo.in> --------- Signed-off-by: Neha Gupta <gneha21@yahoo.in> Co-authored-by: Tvisha <tvisha.raji@keploy.io> Signed-off-by: Lawrence Sharma <che3zcake@gmail.com>
|
Hey @che3zcake Thanks for raising this PR, the nav ui looks slighlty better now. Just a few concerns in the preview:
|
|
@amaan-bhati hey really sorry I didn’t get notification for the comment you left, will work on the changes you mentioned above. |
|
@amaan-bhati I looked into the points you raised:
|
Signed-off-by: Lawrence Sharma <che3zcake@gmail.com>
Signed-off-by: Lawrence Sharma <che3zcake@gmail.com>
Signed-off-by: Lawrence Sharma <che3zcake@gmail.com>
|
Hey @che3zcake, thanks a lot for raising the PR! We’re planning to move away from Docusaurus, so we won’t be needing these changes right now and will be closing this one. We really appreciate your effort and would love for you to pick up another good first issue — your contributions are always welcome! 💛 |
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: