Closed MaximBalaganskiy closed 4 years ago
I'm interested in this component, as it's quite a common scenario and normally is quite all by itself. Would love to see it.
cc @EisenbergEffect
The component calculates the best dropdown position. Bottom and right are preferred ones, top and left are selected when dropdown dimensions don't fit AND there is more space on the other side of the trigger.
This looks nice. Is the positioning service insufficient to handle the requirement of this component? cc @ben-girardet
As far as I understood, the service does not limit the dimensions of an element to fit in window. Am I right?
It's a component I would use but I question the name. Maybe it's my window's background showing, but I always think of a dropdown component displaying a list of values and letting the user choose one.
This is more like a popup to me.
I'm not insisting on the name :)
As far as I understood, the service does not limit the dimensions of an element to fit in window. Am I right?
You're right @MaximBalaganskiy but the plan is to add this in the service. It would make lots of sense to use the positioning service for such a component.
I can help with that if necessary, only it will be in two weeks or so as I have some personal things going on right now. Let me know if I can help ;-)
I'll probably leave that service to you guys, don't feel comfortable modifying it.
What do we do with the dropdown/popup?
Let's add it in. For the service, maybe this component can get it first, and will join the list of components that use the positioning service. More motivation for @ben-girardet to enhance it.
I have a couple of questions around the naming of this component. It's not my intention to bog down your work (which I'm sure this is). I just want to easily explain to someone which component to use when. This component is so flexible because of the use of \<slot> that it can be used for many scenarios.
Some other names I have seen: Popover - https://material-ui.com/components/popover/ https://getbootstrap.com/docs/4.0/components/popovers/
And to really geek out: https://uxdesign.cc/pop-up-popover-or-popper-a-quick-look-into-ui-terms-cb4114fca2a
@EisenbergEffect do you want to weigh in on naming?
window
.window
, unless autoclose
is falseSize can be controlled by setting the content size. I'm, personally, fine with popup - it reflects the intent.
I've got a dropdown component which works similar to lookup. It has also got default styles for items but not limited to them and can display random content.
I know this component is already being worked on. Is it worth submitting a PR?