-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the possibility of updating html through morphs #41
base: master
Are you sure you want to change the base?
Conversation
9cfcff7
to
d5e0cd4
Compare
d5e0cd4
to
ef17039
Compare
What is the state of this PR, can I help? |
I forked this and merged with master, seems to work great! 👍 |
@Danilodum Is there anything in the documentation that is unclear to you? Is there anything that you'd like to add there? |
docs/morph-mode.md
Outdated
|
||
```ruby | ||
yelling = element.value.upcase | ||
morph "#foo", ApplicationController.render(partial: "path/to/foo", locals: {message: yelling}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems liks there's some ruby related mumbo jumbo dangling around
A template/context example would be a good addition |
ef17039
to
b561c2d
Compare
f0de34b
to
1313e45
Compare
With morphs we more easily modify specific parts of the DOM directly in the reflex. We also got access to a broadcaster which means that we can use that to surgically alter certain DOM elements to our liking. In this commit we also drop the commitment to maintain Channels 2.4. Channels 2.4 should still work, but the CI showed weird issues and this added to a maintainence headache which wasn't worth it (unless explicitly asked for and paid by someone).
1313e45
to
631ae01
Compare
Description
With morphs we can make make updates to html without necessarily re-rendering any html if we know the selector. Which means that the update will take less time.
If a morph is executed we will not make a re-rendering of the template which would normally happen with a reflex.
Fixes #27
Why should this be added
It'll give us a faster way to update the page, because we don't need any re-rendering of the template.
Checklist