immich icon indicating copy to clipboard operation
immich copied to clipboard

fix(web): enhanced combobox display

Open stumpigit opened this issue 1 year ago • 2 comments
trafficstars

The combo box used to open the selection list only below the input field. If a combo box was previously displayed as the last element of the container, users had to scroll down to see the content. This PR fixes this problem. As soon as the selection list cannot be displayed, an attempt is made to display it above the input field. If there is no space there either, it is still displayed below with a scrollbar.

https://github.com/user-attachments/assets/6b8379cc-3499-4f55-b4fe-3a764ff088f6

This required a fix in the IntersectionObserver component. This allows containers to change their size and the IntersectionObserver updates itself.

stumpigit avatar Aug 15 '24 12:08 stumpigit

Nice! Is there any way we can avoid the flashing when opening the box, like calculating the location first before displaying

alextran1502 avatar Aug 15 '24 13:08 alextran1502

Do you mean the flashing in the combo box, which first opens at the bottom and then changes to the top? I only noticed this flashing in the video now. When I test it in the browser, I don't see it. Could you also observe this in ‘reality’ or only in the video? But it could be that it can be seen on slow browsers. I'll see if there's anything I can do about it. But it could still be tricky.

stumpigit avatar Aug 15 '24 13:08 stumpigit

Thank you for your contribution! Closing because a different implementation for this problem has been merged in #12848.

ben-basten avatar Sep 25 '24 16:09 ben-basten