Compatibility

If you encounter any compatibility issue, please signal it on repo.

Ruby on Rails

Coupdoeil is made for Ruby on Rails.

Forms

Form helper should work and correctly include CSRF token.

ViewComponent and Rendering API

Coupdoeil popovers can render ViewComponents or any object that implements ActionView rendering API.

class ContactPopover < Coupdoeil::Popover
  def details
    @contact = params[:contact]
    
    render ContactDetailsComponent.new(contact: @contact)
  end
end

Coupdoeil tag in ViewComponent

Up to ViewComponent 3, block capture within a ViewComponent template can trigger an unexpected behavior and ending up in duplicated content, inside and outside captured block. It seems that this issue arise when you use the default slot a component (calling content in template).

Fortunately, it seems that version 4 of ViewComponent finally got rid of this long-standing problem! Bravo!

At the time of writing, ViewComponent 4 is still at release candidate 2, but hopefully it will be fully released soon. Though, the v4.0.0.rc2 seems pretty stable.

If you can’t easily upgrade to ViewComponent 4,

Template languages

Coupdoeil should work with any templating language (ERB, Slim, Haml …).

Turbo

Coupdoeil detects if Turbo is used and ensure opened popover won’t be seen when Turbo renders cached pages.

Mobile & touch devices

Coupdoeil popovers have not developed with mobile or touch devices in mind. While some behavior may be ok, some popovers may provide a less than ideal user experience. Not much testing (on mobile) has been done so far and there is no built-in way to disable it on such devices (yet). If you think of something that might work, please share your thoughts on the dedicated issue! 🙏