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

Feature/core 8922 dropdown issue end of screen #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

irmakyz
Copy link
Contributor

@irmakyz irmakyz commented Dec 22, 2022

No description provided.

@irmakyz irmakyz requested review from dletran, fofi and Navas23 December 22, 2022 01:10
@vercel
Copy link

vercel bot commented Dec 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
design-system ✅ Ready (Inspect) Visit Preview Dec 22, 2022 at 1:10AM (UTC)

@@ -335,6 +335,10 @@ export default {
const fitsBelow = popupRect.height < availableHeightBelow
const fitsAbove = popupRect.height < availableHeightAbove

if (fitsAbove && (containerRect.top + availableHeightAbove > viewport.height)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this condition mean? let's try to include the second part (containerRect.top + availableHeightAbove > viewport.height) in a constant so it's easier to read

Copy link
Contributor

Choose a reason for hiding this comment

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

should we make this check for the 4 sides? top, bottom, left and right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes i think i need to add for bottom side as well. this is a condition that if the popup is higher then the container and excessing the end of screen, it detects and making the popup smaller and handles the translation

Copy link
Contributor Author

@irmakyz irmakyz Dec 22, 2022

Choose a reason for hiding this comment

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

  • include second part in the constant
  • check it for 4 sides

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.

2 participants