-
Notifications
You must be signed in to change notification settings - Fork 436
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
Perform scrolling prior to Visit completion #476
Merged
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
This is a draft in an attempt to resolve the issues causing #400. If these changes fix the issue, I'll create a browser test and upgrade this to Ready for Review. |
This was referenced Nov 25, 2021
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
2 times, most recently
from
November 26, 2021 17:08
ef92095
to
e828656
Compare
seanpdoyle
changed the title
Delay Visit page scrolling
Treat same-page anchor Visit like a request
Nov 26, 2021
seanpdoyle
changed the title
Treat same-page anchor Visit like a request
Treat same-page anchor Visit like a simulated request
Nov 26, 2021
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
2 times, most recently
from
November 27, 2021 06:16
33f562b
to
8af1d0b
Compare
seanpdoyle
changed the title
Treat same-page anchor Visit like a simulated request
Perform scrolling prior to Visit completion
Nov 27, 2021
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
from
November 27, 2021 06:26
8af1d0b
to
0406188
Compare
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
from
July 16, 2022 14:58
0406188
to
f542cd0
Compare
seanpdoyle
changed the title
Perform scrolling prior to Visit completion
Improve scroll retention test coverage
Jul 16, 2022
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
from
July 16, 2022 15:29
4baaa87
to
5000302
Compare
seanpdoyle
changed the title
Improve scroll retention test coverage
Perform scrolling prior to Visit completion
Jul 16, 2022
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
2 times, most recently
from
July 16, 2022 15:39
da86b09
to
89b0df7
Compare
This is awesome! We tested this branch and it fixes all problems we have in our chat app, where we need to scroll to the bottom after Turbo visit😇 |
Closes hotwired#400 When processing a `Visit`, invoke `Visit.performScroll()` while loading a response, loading a Snapshot, or executing a same-page anchor navigation. After in-lining those calls to more appropriate points in the Visit lifecycle, this commit removes the `performScroll()` call from the `Visit.render()` method.
seanpdoyle
force-pushed
the
synchronize-view-scroll
branch
from
July 28, 2022 22:56
89b0df7
to
6bec391
Compare
Resolves a [flaky test][] by replacing a call to `nextBeat()` with a helper that will wait until the target element (in this case, `turbo-frame#frame`) dispatches a particular event (in this case, `turbo:frame-load`). [flaky test]: https://github.com/hotwired/turbo/runs/7570036350?check_suite_focus=true#step:12:16
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.
Closes #400
When processing a
Visit
, invokeVisit.performScroll()
while loadinga response, loading a Snapshot, or executing a same-page anchor
navigation. After in-lining those calls to more appropriate points in
the Visit lifecycle, this commit removes the
performScroll()
call fromthe
Visit.render()
method.