nanopop icon indicating copy to clipboard operation
nanopop copied to clipboard

Truncate when no viable match

Open julianjelfs opened this issue 1 year ago • 1 comments

It would be great if this could be extended such that in the case of failure to find any fit we could (optionally) discover the position-variant fit that has the smallest overflow and use that position but reduce the height / width of the popper so that it still fits on the screen.

Seems like in the case of a total miss, top & left of 0,0 is almost never what you want to happen.

julianjelfs avatar Dec 20 '23 13:12 julianjelfs

Good point, since this is very much an edge-case... did this happen in your case? We could also think about an fallback so that you can specify which position should be taken if there is no space (e.g. bottom center on mobile devices since you might rather want to scroll down than left / right)

simonwep avatar Jan 06 '24 13:01 simonwep