Skip to content

Conversation

@GaneshPatil7517
Copy link

@GaneshPatil7517 GaneshPatil7517 commented Dec 23, 2025

@ChetanFTW

Description:
This PR improves the usability of the Enterprise Add-ons dropdown on the pricing page by implementing a floating dropdown that remains visible while scrolling.

Problem:
The original implementation used a standard Select component with position: sticky, which did not work due to layout constraints from parent containers. Users had to scroll back up to view their dropdown selection.

Solution:
Replaced the Select component with a TextField trigger and Menu component using position: fixed. The dropdown now:

Calculates its position dynamically using getBoundingClientRect()
Stays fixed on screen while the page scrolls
Maintains proper alignment with the input field
Updates position on window resize
Closes on outside click and Escape key
Preserves keyboard accessibility

Technical Implementation:

Added useRef to track trigger element position
Implemented position calculation with getBoundingClientRect()
Render Menu with position: fixed and dynamic top/left coordinates
Added event listeners for window resize and keyboard events

fix_enterpriseaddons_floating_dropdown.mp4

Maintained existing styling and responsive behavior

Testing:
✅ Dropdown stays visible while scrolling
✅ Responsive and accessible
✅ No console errors
✅ Proper keyboard navigation (Tab, Enter, Escape)

Signed-off-by: Ganesh Patil <7030871503ganeshpatil@gmail.com>
@l5io
Copy link
Contributor

l5io commented Dec 23, 2025

🚀 Preview for commit 7986d66 at: https://694a7100f6dac13605a9cb5e--layer5.netlify.app

@kishore08-07
Copy link
Contributor

@GaneshPatil7517
Thank you for your contribution!
Let's discuss this during the website call today at 6:30 PM IST | 7 AM CT
Add it as an agenda item to the meeting minutes, if you would :)

Copy link
Contributor

@kishore08-07 kishore08-07 left a comment

Choose a reason for hiding this comment

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

@GaneshPatil7517
Refer to https://cloud.layer5.io/account/plans for the expected behavior and implement accordingly.

Copy link
Contributor

@kishore08-07 kishore08-07 left a comment

Choose a reason for hiding this comment

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

@GaneshPatil7517
Always mention the related issue in your PR description.

@GaneshPatil7517 GaneshPatil7517 closed this by deleting the head repository Dec 31, 2025
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.

3 participants