Skip to content
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

[GEN-2203]: add dropdown direction handling to open upwards when near bottom of the viewport #2190

Merged
merged 3 commits into from
Jan 12, 2025

Conversation

BenElferink
Copy link
Contributor

@BenElferink BenElferink commented Jan 11, 2025

This pull request includes enhancements to the Dropdown component in the frontend/webapp/reuseable-components/dropdown/index.tsx file, focusing on improving its functionality and user experience. The most important changes include adding a feature to open the dropdown upwards if it is near the bottom of the screen and updating related styles and logic.

Enhancements to Dropdown component:

  • Introduced the openUpwards state and handleDirection function to determine the direction in which the dropdown should open based on its position relative to the viewport.
  • Passed the openUpwards state as a prop to the DropdownList component to control its rendering direction.
  • Updated the AbsoluteContainer styled component to conditionally apply the top or bottom style based on the $openUpwards prop.
  • Modified the DropdownList component to accept the openUpwards prop and pass it to the AbsoluteContainer for dynamic positioning.

Copy link

@BenElferink BenElferink added bug Something isn't working frontend labels Jan 11, 2025
@BenElferink BenElferink enabled auto-merge (squash) January 12, 2025 09:04
@BenElferink BenElferink merged commit 4576883 into odigos-io:main Jan 12, 2025
30 of 31 checks passed
@BenElferink BenElferink deleted the gen-2203 branch February 18, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants