Wednesday, June 3, 2020
1 change · master
Enhancements to existing features
Popovers are now easier and more reliable to use: they can be closed from within, toggled by clicking their target, and styled differently when open. The update also reduces display flicker, improves sizing for content, and helps prevent overlap with other interface elements.
Original PR description
Close can now be requested by children (slot content) with the event `o-popover-close`. This feature is necessary if we want a "close" button inside the popover itself, which is the case for mail.activity "Mark Done". Clicking on the popover target now acts as a toggle, which is also a feature that was expected from the previous popover implementation. Add a specific class (`o_is_open`) when the popover is displayed to be able to style its target depending on whether it is displayed or not. Ensure computed position is whole number of pixels to prevent flicker issue on Firefox. Remove forced width to let the component grow with its content. Add appropriate z-index to prevent overlap issue with the rest of our interface.