-
Notifications
You must be signed in to change notification settings - Fork 519
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
feat(Popover): manual mode & horizontal offset #781
Conversation
Implement manual controls via simple `show` property, and add left and right padding when `offsetDistance` popper option is given.
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
Nice! Do you think it would be useful to do the same on |
A few hours after making this PR I remembered theres other components that could benefit. Definitely, I'll get those done too. |
Do you plan to do this in the same PR? |
Sure. Should I do documentation in this PR too? |
Yes that would be nice π |
@benjamincanac Think it would be better that I change Furthermore not sure how best to add manual controls to dropdown menu. Headless has their own sort of solution. Seems like there's sometimes very differing required methods for implementing manual control. Maybe I just stick to PopOver for just this PR, as PopOver is basically the most generic/least bells-and-whistles of all these overlay components? |
@@ -8,17 +8,17 @@ | |||
role="button" | |||
@mouseover="onMouseOver" | |||
> | |||
<slot :open="open" :close="close"> | |||
<slot :open="headlessOpen" :close="close"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be :open="(open !== undefined) ? open : headlessOpen"
for both slots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I think so. Made those changes.
Implement manual controls via simple
show
property, and add left and right padding whenoffsetDistance
popper option is given.π Linked issue
Resolves #721
β Type of change
π Description
Having the capability to manually control the popover panel seems like a no-brainer, and it seems a simple optional
show
property is really all that's needed.When testing the popper controls it was apparent the
offsetDistance
wasn't being used whenposition
was either left or right. Seemed as simple as adding the left and right padding to the already present top and bottom.π Checklist
I figure after a merge I can update the documentation accordingly.