-
Notifications
You must be signed in to change notification settings - Fork 432
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
Use 'will render' false for action 'replace' after GET redirect #516
Merged
Conversation
This file contains 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
blrB
changed the title
Use will render false for action 'replace' after GET redirect
Draft: Use will render false for action 'replace' after GET redirect
Jan 20, 2022
blrB
changed the title
Draft: Use will render false for action 'replace' after GET redirect
Draft: Use 'will render' false for action 'replace' after GET redirect
Jan 20, 2022
blrB
force-pushed
the
double_rendering_for_get_redirect
branch
from
January 20, 2022 22:39
2afffb9
to
c891dcd
Compare
blrB
force-pushed
the
double_rendering_for_get_redirect
branch
from
January 20, 2022 22:41
c891dcd
to
ba5a8a3
Compare
blrB
changed the title
Draft: Use 'will render' false for action 'replace' after GET redirect
Use 'will render' false for action 'replace' after GET redirect
Jan 20, 2022
In my project I've noticed the same problem with redirects. Looks like this PR fix it. @blrB thx a lot! |
blrB
force-pushed
the
double_rendering_for_get_redirect
branch
from
April 30, 2022 21:43
13e0cde
to
03b0f35
Compare
I fixed eslint errors in my code. All other errors in files not from my branch.
|
All eslint errors from other code was fixed too. (Beacuse GitHub CI can't be valide with any errors)
|
Thanks! This fixed this issue for me too! |
seanpdoyle
added a commit
to seanpdoyle/turbo
that referenced
this pull request
Aug 9, 2022
When redirecting to a page that contains elements marked with `[data-turbo-cache="false"]`, those elements are removed _before_ the initial render, instead of _after_ the render and _before_ the page is cached. This behavior seems to have stemmed from [hotwired#516][], which was shipped in response to [hotwired#515][]. As an alternative to the `willRender: false` option passed to `this.adapter.visitProposedToLocation` in `Visit.followRedirect`, the implementation can instead [rely on the presence of the `turbo-frame[complete]`][comment] to guard against double fetching. To guard against regressions, this commit adds coverage for the unwanted behavior by redirecting from `navigation.html` to `cache_observer.html`, and asserting the presence of a `[data-turbo-cache="false"]` element that resembles and application's Flash messaging. [hotwired#515]: hotwired#515 [hotwired#516]: hotwired#516 [comment]: hotwired#515 (comment) [hotwired#487]: hotwired#487
seanpdoyle
added a commit
to seanpdoyle/turbo
that referenced
this pull request
Aug 9, 2022
When redirecting to a page that contains elements marked with `[data-turbo-cache="false"]`, those elements are removed _before_ the initial render, instead of _after_ the render and _before_ the page is cached. This behavior seems to have stemmed from [hotwired#516][], which was shipped in response to [hotwired#515][]. As an alternative to the `willRender: false` option passed to `this.adapter.visitProposedToLocation` in `Visit.followRedirect`, the implementation can instead [rely on the presence of the `turbo-frame[complete]`][comment] to guard against double fetching. To guard against regressions, this commit adds coverage for the unwanted behavior by redirecting from `navigation.html` to `cache_observer.html`, and asserting the presence of a `[data-turbo-cache="false"]` element that resembles and application's Flash messaging. [hotwired#515]: hotwired#515 [hotwired#516]: hotwired#516 [comment]: hotwired#515 (comment) [hotwired#487]: hotwired#487
dhh
pushed a commit
that referenced
this pull request
Aug 11, 2022
When redirecting to a page that contains elements marked with `[data-turbo-cache="false"]`, those elements are removed _before_ the initial render, instead of _after_ the render and _before_ the page is cached. This behavior seems to have stemmed from [#516][], which was shipped in response to [#515][]. As an alternative to the `willRender: false` option passed to `this.adapter.visitProposedToLocation` in `Visit.followRedirect`, the implementation can instead [rely on the presence of the `turbo-frame[complete]`][comment] to guard against double fetching. To guard against regressions, this commit adds coverage for the unwanted behavior by redirecting from `navigation.html` to `cache_observer.html`, and asserting the presence of a `[data-turbo-cache="false"]` element that resembles and application's Flash messaging. [#515]: #515 [#516]: #516 [comment]: #515 (comment) [#487]: #487
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.
Todo list:
Closes #515