unabridged / motion

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

Permanent attribute #30

Closed alecdotninja closed 4 years ago

alecdotninja commented 4 years ago

This PR adds a configurable marker attribute (data-motion-permanent) that can be used to signal to the reconciliation algorithm that a subtree of the DOM should be left alone.

This is important for supporting JavaScript libraries that need to modify that DOM and is inspired by the analogous feature in Turbolinks.

alecdotninja commented 4 years ago

I'm going to close this PR for now. Every use-case that I had in mind can't be addressed by this alone, so I'm not sure what point there is in adding this would a more structured system for effects.

If someone needs this feature, feel free to comment and we can reconsider merging.