-
Notifications
You must be signed in to change notification settings - Fork 446
Comparing changes
Open a pull request
base repository: hotwired/turbo
base: v8.0.0-beta1
head repository: hotwired/turbo
compare: v8.0.0-beta.2
- 18 commits
- 31 files changed
- 9 contributors
Commits on Nov 27, 2023
-
Avoid infinite recursion from
window.fetch
name collisionCloses [#526][] Prevent naming collisions between the new `Turbo.fetch` function and the built-in `window.fetch` function. To do so, create a module-local reference to `window.fetch`, and define the exported function as `fetchWithTurboHeaders`. At export-time, rename to `fetch` so that consumers can continue to import it as `Turbo.fetch`. [#526]: hotwired/turbo-rails#526
Configuration menu - View commit details
-
Copy full SHA for 9a4c994 - Browse repository at this point
Copy the full SHA 9a4c994View commit details -
Page refreshes: Use pathname instead of href to detect if locations a…
…re equal Before this commit, URLs had to be exactly the same for the possibility of a refresh with morphing. Now, it only checks that the paths are equal, regardless of whether they have different search params.
Configuration menu - View commit details
-
Copy full SHA for e7a2c7a - Browse repository at this point
Copy the full SHA e7a2c7aView commit details -
Merge pull request #1077 from seanpdoyle/avoid-fetch-name-collisions
Avoid infinite recursion from `window.fetch` name collision
Configuration menu - View commit details
-
Copy full SHA for 325216e - Browse repository at this point
Copy the full SHA 325216eView commit details -
Export StreamActions as property of window.Turbo (#1073)
* Export StreamActions as property of window.Turbo This was removed in #1049 but it's still used in the turbo-rails test suite. https://github.com/hotwired/turbo-rails/blob/c3ca7009c0759563ec65ecf1bc60a9af1ff33728/test/system/broadcasts_test.rb#L137 * Remove circular dependency * Assert that Turbo interface is exposed via window global
Alberto Fernández-Capel authoredNov 27, 2023 Configuration menu - View commit details
-
Copy full SHA for 4f334da - Browse repository at this point
Copy the full SHA 4f334daView commit details -
Restructure to avoid internal
window.Turbo
accessReplace accessing the `recentRequests` property through the `window.Turbo.session` object. In its place, restructure the object's dependency graph so that the `http/fetch` module constructs the `LimitedSet` instance, and the `Session` accepts that instance as a property.
Configuration menu - View commit details
-
Copy full SHA for 23d0cb4 - Browse repository at this point
Copy the full SHA 23d0cb4View commit details -
Merge pull request #1078 from seanpdoyle/replace-window-turbo-access-…
…from-fetch Restructure to avoid internal `window.Turbo` access
Configuration menu - View commit details
-
Copy full SHA for 5d7ff7c - Browse repository at this point
Copy the full SHA 5d7ff7cView commit details
Commits on Nov 29, 2023
-
Include idiomorph as a dev dependency (#1086)
The library is bundled within Turbo so there's no need for apps using Turbo to install it.
Alberto Fernández-Capel authoredNov 29, 2023 Configuration menu - View commit details
-
Copy full SHA for f92fb0f - Browse repository at this point
Copy the full SHA f92fb0fView commit details
Commits on Dec 1, 2023
-
Import
session
instead of readingwindow.Turbo.session
Follow-up to [#1049][] Follow-up to [#1073][] Related to [#1078][] Replace an internal `window.Turbo.session` access with an `import { session }` statement. Prior attempts at this change introduced circular dependencies. This attempt does not. Additionally, this change maintains the ability for consumers to access StreamActions through `window.Turbo.StreamActions`, while also enabling `import { StreamActions } from "@hotwired/turbo"` (or `from "@hotwired/turbo-rails"`). [#1049]: #1049 [#1073]: #1073 [#1078]: #1078
Configuration menu - View commit details
-
Copy full SHA for 7a7c6e2 - Browse repository at this point
Copy the full SHA 7a7c6e2View commit details
Commits on Dec 2, 2023
-
Merge pull request #1094 from seanpdoyle/remove-window-turbo-reference
Import `session` instead of reading `window.Turbo.session`
Configuration menu - View commit details
-
Copy full SHA for 5c48398 - Browse repository at this point
Copy the full SHA 5c48398View commit details -
Configuration menu - View commit details
-
Copy full SHA for b95162f - Browse repository at this point
Copy the full SHA b95162fView commit details
Commits on Dec 4, 2023
-
Communicate Visit direction with
html[data-turbo-visit-direction]
(#……1007) * Add direction detail to turbo:visit events * Test restorationIndex is persisted between reloads * Add data-turbo-visit-direction to html element * Versatile Visit direction API. Use html[data-turbo-visit-direction] attribute to communicate visit direction rather than using an event detail * Remove "test" prefix from test description * Fix typos * Remove "test" prefix from test description * Clean up assertions * Read the mutation logs to assert the direction attribute change It's less dependent on the timing of the mutation. Even if the attribute is no longer present, we can still assert that it was present at some point. --------- Co-authored-by: Alberto Fernández-Capel <afcapel@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ac00359 - Browse repository at this point
Copy the full SHA ac00359View commit details
Commits on Dec 7, 2023
-
Merge pull request #1096 from hotwired/scroll-only-page-refresh
Don't preserve scroll position unless it's a page refresh
Configuration menu - View commit details
-
Copy full SHA for b493fca - Browse repository at this point
Copy the full SHA b493fcaView commit details -
Merge pull request #1079 from brunoprietog/use-pathname-for-refreshes
Page refreshes: Use pathname instead of href to detect if locations are equal
Configuration menu - View commit details
-
Copy full SHA for 06ee1fe - Browse repository at this point
Copy the full SHA 06ee1feView commit details -
Replace remaining calls to nextAnimationFrame by nextRepaint (#1102)
This ensures that page refreshes work properly when the page is in the background.
Configuration menu - View commit details
-
Copy full SHA for db310ef - Browse repository at this point
Copy the full SHA db310efView commit details
Commits on Dec 8, 2023
-
Guard
[data-turbo-preload]
with conditionals (#1033)Prior to this change, _any_ `<a>` element with `[data-turbo-preload]` would be preloaded. With that behavior comes some risk: * if an element is nested within a `[data-turbo="false"]` element, the preloading would occur unnecessarily * if an element has `[data-turbo-stream]`, the preloaded request won't be the same as the ensuing request due to differences in the `Accept:` header * if an element has `[data-turbo-method]`, the preloaded request won't be the same as the ensuing request due to differences in the method * if an element is within a `<turbo-frame>` or driving a frame via `[data-turbo-frame]`, the preloaded request won't be the same as the ensuing request due to differences in the `Turbo-Frame:` header This commit extends the `Preloader` delegate interface to include a `shouldPreloadLink(link: HTMLAnchorElement)` predicate method to give delegates an opportunity to opt-out of preloading. The `Session` implementation of the delegate class adds rejects `<a>` elements that match any of those cases. Co-authored-by: Julian Rubisch <julian@julianrubisch.at>
Configuration menu - View commit details
-
Copy full SHA for 098aafc - Browse repository at this point
Copy the full SHA 098aafcView commit details
Commits on Dec 14, 2023
-
Dispatch
turbo:before-fetch-{request,response}
during preloading (#……1034) Closes [#963][] Replace the raw call to `fetch` with a new `FetchRequest` instance that treats the `Preloaded` instances as its delegate. During that request's lifecycle, dispatch the `turbo:before-fetch-request` and `turbo:before-fetch-response` events with the `<a>` element as its target. Prepare the request with the [Sec-Purpose][] header in the `prepareRequest` delegate callback. Write to the snapshot cache from within the `requestSucceededWithResponse` delegate callback. [#963]: #963 [Sec-Purpose]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Purpose#prefetch
Configuration menu - View commit details
-
Copy full SHA for af16eee - Browse repository at this point
Copy the full SHA af16eeeView commit details
Commits on Dec 18, 2023
-
Set aria-busy on the form element during a form submission (#1110)
This is useful for styling the form while it is submitting. Before this change, we were only setting aria-busy on frames while they were loading and on the html element while Turbo was processing a visit.
Alberto Fernández-Capel authoredDec 18, 2023 Configuration menu - View commit details
-
Copy full SHA for df7f982 - Browse repository at this point
Copy the full SHA df7f982View commit details
Commits on Dec 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2a638e0 - Browse repository at this point
Copy the full SHA 2a638e0View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v8.0.0-beta1...v8.0.0-beta.2