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

Fix drop menu position with limited vertical screen space #8453

Merged
merged 4 commits into from Feb 16, 2023

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Feb 16, 2023

Description

This changes the way how drop menus are positioned when only limited vertical screen space is available. They now fully utilize the available vertical screen space.

The issue was noticeable when the available space above and below the drop-trigger-element was not enough to hold the menu. If that's the case, we now move the drop to the top of the current container.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Feb 16, 2023
@JammingBen JammingBen force-pushed the fix-dropdown-display-small-screens branch 3 times, most recently from 3b1389c to 8ab1f54 Compare February 16, 2023 15:43
@JammingBen JammingBen force-pushed the fix-dropdown-display-small-screens branch from 8ab1f54 to d72d5f7 Compare February 16, 2023 15:44
@sonarcloud
Copy link

sonarcloud bot commented Feb 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

80.0% 80.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

I have such an ultra nitpick that I'm nearly ashamed to post it, but here goes nothing.
If you resize your browser window to such a level that the respective OcDrop needs to be made scrollable the hover effect lacks margin on the right 😁 See screenshot.

Screenshot 2023-02-16 at 17 09 49

@JammingBen
Copy link
Collaborator Author

I guess it makes room for a vertical scrollbar - but why is there no vertical scrollbar?! 😄 I can only reproduce that having a vertical scrollbar visible.

@kulmann
Copy link
Member

kulmann commented Feb 16, 2023

I guess it makes room for a vertical scrollbar - but why is there no vertical scrollbar?! 😄 I can only reproduce that having a vertical scrollbar visible.

I only have the scroll bar visible during scrolling

@JammingBen
Copy link
Collaborator Author

I only have the scroll bar visible during scrolling

W00t. Which browser are you using? I tried FF and Chrome, both fine.

@kulmann
Copy link
Member

kulmann commented Feb 16, 2023

I only have the scroll bar visible during scrolling

W00t. Which browser are you using? I tried FF and Chrome, both fine.

Chrome

@tbsbdr
Copy link
Contributor

tbsbdr commented Feb 16, 2023

I only have the scroll bar visible during scrolling

W00t. Which browser are you using? I tried FF and Chrome, both fine.

Chrome

cant reproduce
looks good on my side in current FF & Chrome
image

@kulmann
Copy link
Member

kulmann commented Feb 16, 2023

I only have the scroll bar visible during scrolling

W00t. Which browser are you using? I tried FF and Chrome, both fine.

Chrome

cant reproduce looks good on my side in current FF & Chrome image

Congratulations though, because you did reproduce it. The blue background of the Viewer item is touching the scroll bar.

I didn't request changes with this nitpick, just commented it. No way I'm blocking this pull request for this small detail which is hardly ever relevant on a 720p+ display. ;-) (I also didn't fully review the PR, so that's why I didn't approve it yet)

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

😍

@kulmann kulmann merged commit 1e0d757 into master Feb 16, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix-dropdown-display-small-screens branch February 16, 2023 21:50
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.

[Web] Firefox: Dropmenu is partly hidden [Web] Contexmenu is partly hidden
3 participants