-
Notifications
You must be signed in to change notification settings - Fork 430
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
Page Refreshes: allow them to happen on an "advance" action #1085
Comments
I understand the need but I have some concerns with using morphing for regular "advance" navigations. There is an internal implementation one: current snapshot caching in Turbo won't work, because the current implementation relies on managing different Also, this would also be an additional API in the library, more choice for the user, which is something that bothers me. We'll soon support page refreshes with different params in the URL, would that alleviate your use case here? You still wouldn't have browser history, but at least you could have meaningful URLs representing the state of the filter. |
Thanks for the reply!
I saw that PR! That is great, yes ❤️
I think this will mostly work, I could live with it, though in a data tables setup, you really should be able to navigate back.
Fair point! Though "you are changing regions of the screen" is case-by-case. In a data tables setup, it's expected that navigation won't change the screen position. The "data tables" examples is my motivating use-case. It can currently be handled with a frame, though the Cheers! |
Hi!
I've been testing out Turbo 8 because I'm super excited about the page refreshes. One use-case for "page refreshes" is a "data-tables" like setup, where you can search a table, click column links to sort, paginate, etc. Submitting the search form will work great with page refreshes.
But currently, the "column sorting" links and pagination links can't use page refreshes. That's the "action" must be
replace
:turbo/src/core/drive/page_view.js
Line 59 in 5d7ff7c
This was done on purpose in #1072 for sensible reasons. And there IS a workaround -
<a href="..." data-turbo-action="replace">
. However, this is a case where I DO want the history toadvance
so the user can click back to the previous page.Would it be reasonable to introduce a new
data-turbo-morph
attribute for the link to opt into morphing? The URL of the page would still need to match, this would just remove the requirement for the action to bereplace
.Cheers!
The text was updated successfully, but these errors were encountered: