Add the possibility of updating html through morphs#41
Open
jonathan-s wants to merge 1 commit intomasterfrom
Open
Add the possibility of updating html through morphs#41jonathan-s wants to merge 1 commit intomasterfrom
jonathan-s wants to merge 1 commit intomasterfrom
Conversation
9cfcff7 to
d5e0cd4
Compare
Repository owner
deleted a comment from
codecov-io
Dec 1, 2020
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! 👍 |
Owner
Author
|
@Danilodum Is there anything in the documentation that is unclear to you? Is there anything that you'd like to add there? |
Danilodum
reviewed
May 6, 2021
|
|
||
| ```ruby | ||
| yelling = element.value.upcase | ||
| morph "#foo", ApplicationController.render(partial: "path/to/foo", locals: {message: yelling}) |
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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