-
Notifications
You must be signed in to change notification settings - Fork 191
fix: navbar alignment for both initial and scrolled states (#3428, #3429) #262
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
Signed-off-by: Atul Chahar <chaharatul92@gmail.com>
amaan-bhati
left a comment
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.
Hi @Atul-Chahar Thanks for raising this pr, I reviewed the changes locally, and i have a few suggestions:
- The initial state of the navbar has the correct width, but the elements inside needs to be aligned well, they seem to be scatterred unevenly, the logo, nav elements and the buttons need to be together to maintain the ui. For the initial state you can take reference from the keploy.io landing page navbar, it segregates all the nav elements together (and there is one attention to detail that it aligns well with the other component's width when we scroll down to the sections)
I have attached a references that explain both the solutions:
(see how all the nav elements are segregated eventhough the bavbar has full width, and also how it aligns to the other section when we scroll down.
- The shrinked state when we scroll down, the subtle animation looks great but it needs to align with the other sections when we scroll down, it needs to have the samw width as the sections below when we scroll down. I have attached a reference image to explain the issue better:
Signed-off-by: Atul Chahar <chaharatul92@gmail.com>
a82d6bf to
4bae195
Compare
1128959 to
c1235e7
Compare
amaan-bhati
left a comment
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.
Hey @Atul-Chahar Thanks for folloeing up on the issue again, I think there has been a missed attention to detail here, The navbar is resized to the sections but there is more to it that is supposed to be taken care of, it needs to align with the content inside of the navbar, there is too much gap between the navbar and the elements inside of it, it needs to be reduced from the left and the right side, this way you can align the content of the navbar and make the navbar align with the sections, the idea is to have a consistent flow for the users. It can be seen as a widely used attention to detail best practice in terms of the ui, i have attached an image for better understanding and also a few references for you to take inspirations from:
- The issue i am talking about:
When we say the navbar aligns with the rest of the content, we are talking about the elemtents inside of it to align, more like in a straight line, the size of the navbar can be slightly more than the sections, but if we have the content aligned with the sections, it is perfect in terms of the ui and flow.
- References of the alignment property we see often:
See how all the elements/content is aligned in a straight line to maintain the flow for the eye
Refernece from vercel, see how the content inside of the search bar is aligned with the other elements:
Here is an example from sentry for the reference of making the navbar align with the rest of the sections, see how the elemtents/content is present there in a straight line. (I've marked it with a red line)
- I hope I was able to give nice references for you to make it more precise and perfectly aligned. Thanks for your patience!
Signed-off-by: Atul Chahar <chaharatul92@gmail.com>
e40381b to
7d7cf67
Compare
Sir @amaan-bhati, thanks for the detailed feedback and the references!
I've updated the alignment based on your screenshot. I realized the previous gap was caused by "double indentation" (the navbar had its own margin plus I had added extra inner padding). Fix Implemented: I removed the extra inner padding. |

Related Tickets & Documents
Fixes: #3428 keploy/keploy#3428
Fixes: #3429 keploy/keploy#3429
Description
keploy.ioby having the navbar start at 100% width (top-0,rounded-none) and smoothly transition to the existing "pill" shape (top-6,rounded-full) when the user scrolls down.Changes
w-fullandtop-0when unscrolled, and conditionally applyrounded-noneorrounded-fullbased on the scroll state.maxWidthcalculations to support the full-width navbar layout (using100vwinstead of96vwwhen unscrolled).Preview:
screenrecording-2026-01-09_22-30-41.mp4
Type of Change
Testing
npm run buildlocally to ensure there were no TypeScript errors or build failures with the new logic.w-fullis applied when!isScrolledandw-[82%]whenisScrolled.Demo
Environment and Dependencies
Checklist