You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just implemented the popover above in a project and ended up using the toggle_controller instead of the popover_controller for several reasons.
The current implementation of the popover_controller uses style attributes to translate the popover, instead of Tailwind classes. But there are Tailwind classes for this purpose.
The hidden class is hard coded in the controller. The toggle_controller also uses the hidden class, but as a default, making it more flexible.
The methods in popover_controller are called mouseover and mouseout. This couples them tightly with the same events, even though one could imagine using other events to show and hide the popovers.
When the only thing the popover_controller does different from the toggle_controller can be solved in a better way using Tailwind classes, why keep it? I suggest adding a popover html example to the toggle_controller's documentation instead.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I just implemented the popover above in a project and ended up using the toggle_controller instead of the popover_controller for several reasons.
hidden
class is hard coded in the controller. The toggle_controller also uses thehidden
class, but as a default, making it more flexible.mouseover
andmouseout
. This couples them tightly with the same events, even though one could imagine using other events to show and hide the popovers.When the only thing the popover_controller does different from the toggle_controller can be solved in a better way using Tailwind classes, why keep it? I suggest adding a popover html example to the toggle_controller's documentation instead.
Beta Was this translation helpful? Give feedback.
All reactions