unabridged / motion

Reactive frontend UI components for Rails in pure Ruby
https://github.com/unabridged/motion
MIT License
697 stars 19 forks source link

Motion v0.5.0 does not work with ViewComponent >= v2.35.0 #111

Open bert-mccutchen opened 3 years ago

bert-mccutchen commented 3 years ago

Motion fails to serialize the component due to ViewComponent v2.35.0 changing some instance variable names: https://github.com/github/view_component/pull/967

This means @controller and @helpers are now @__vc_controller and @__vc_helpers, which are not excluded here: https://github.com/unabridged/motion/blob/v0.5.0/lib/motion/component/rendering.rb#L8-L29

As far as I can tell, this only happens when you have a form in the view component's HTML.

bert-mccutchen commented 3 years ago

Looking into this further... There are actually many more that are of issue, for example @variant is now @__vc_variant. The entire list will need to be reviewed and updated with a patch.