Releases: hotwired/turbo
v7.2.0
What's Changed
Turbo 7.2.0 is available to use with Rails via turbo-rails 1.3.0.
Features
- Add a
turbo:reload
event that returns the reason why turbo needed to do a hard reload. by @manuelpuyol in #556 - Pre-populate cache with views based on links with
turbo_preload
attribute by @hey-leon in #552 - Expose Frame load state via
[complete]
attribute by @seanpdoyle in #487 - Turbo stream source by @seanpdoyle in #415
- Allow Turbo Streams with GET via
data-turbo-stream
by @kevinmcconnell in #612 - Add original click event to 'turbo:click' details by @manuelpuyol in #611
- Add .php as a valid isHTML extension by @dhh in #629
- Allow frames to scroll smoothly into view by @npezza93 in #607
- Introduce client-side Turbo Cache Control API by @marcoroth in #632
- Support custom rendering in
turbo:before{-frame,}-render
events by @seanpdoyle in #431 - Add option to disable turbo for form or optin to forms. by @pythonandchips in #419
Turbo.visit(..., { frame: "frame" })
by @seanpdoyle in #649- Activate
<script>
in Turbo Streams by @seanpdoyle in #660 - Add turbo:fetch-request-error event on frame and form network errors by @srt32 in #640
- Introduce
turbo:frame-missing
event by @seanpdoyle in #445 - Preserve input values in cache by @seanpdoyle in #666
- Add support for data-turbo-action to link_to by @ondrej-zadnik in #636
turbo:frame-missing
: Dispatch for 4xx and 5xx by @seanpdoyle in #693- Add
render
toturbo:before-stream-render
event by @seanpdoyle in #684 - Expose FrameRenderer so we can extend its behavior, e.g. vDOM. by @botandrose in #568
- Await for confirm method results by @excid3 in #525
- Export Custom Elements and Stream Action Types by @marcoroth in #708 and @seanpdoyle in #479
- Make
StreamElement.templateElement
more flexible by @seanpdoyle in #665
Fixes
- Progress Bar Won't Render if CSP is Turned On by @rience in #501
- Set turbo-progress-bar z-index to max value by @keithamus in #531
- Make data-turbo-confirm work with multiple submitters inside a form by @feliperaul in #564
- Don't scroll to top of page on reload by @srt32 in #571
- Treat blank
[formaction]
like a blank[action]
by @seanpdoyle in #529 - Prevent silent restoration visits when previous visit request is in-flight by @domchristie in #595
- Restore focus when transposing Permanent Elements by @seanpdoyle in #436
- Use 'will render' false for action 'replace' after GET redirect by @blrB in #516
- Use
replaceChildren
in StreamActions.update by @seanpdoyle in #534 - Defensively create custom turbo elements by @dphaener in #483
- Do not declare global types/constants by @grncdr in #524
- fix(ie/edge): form.method='delete', raises Invalid argument. by @mfo in #586
- Only update history when Turbo visit is renderable by @manuelpuyol in #601
- Export Type declarations for
turbo:
events by @seanpdoyle in #452 - Fix
turbo:load
firing twice after a redirect and avoid double render by @feliperaul in #563 - Treat
[data-turbo-stream]
as boolean attribute by @seanpdoyle in #630 - Ensure Turbo does not interfere with IFrames by @seanpdoyle in #389
- Frame Visits: Cache Snapshot later in process by @seanpdoyle in #488
- Deprecate
Turbo.clearCache()
by @marcoroth in #634 - Clear cache on non-GET form submit by @tleish in #495
- Update the history before rendering promoted frames by @manuelpuyol in #618
- Prevent form links from submitting multiple requests by @seanpdoyle in #645
- Resolve Frame Visit caching issue by @seanpdoyle in #644
- Do not autofocus inert or hidden elements by @seanpdoyle in #654
- Encode Form Submitter
[name]
into submission by @seanpdoyle in #653 - Disabling Drive keeps Frames default behaviour by @rik in #648
- Wait for CSS to be loaded before replacing the Body by @manuelpuyol in #614
- Perform scrolling prior to Visit completion by @seanpdoyle in #476
- Bugfix: Form Mode opt-in should consider outside submitters by @seanpdoyle in #655
- Don't convert
data-turbo-stream
links to forms by @kevinmcconnell in #647 - Return
Promise<void>
fromFrameElement.reload
by @seanpdoyle in #661 - PageSnapshot: reduce cloning loop iterations by @seanpdoyle in #669
- Form Link Submissions: Don't remove
<form>
until submission is complete by @seanpdoyle in #678 - Add
submitter
toTurbo.setConfirmMethod
callback by @seanpdoyle in #676 - Bugfix: Redirects and
[data-turbo-cache=false]
by @seanpdoyle in #674 data-turbo-stream
links should not set aria-busy by @kevinmcconnell in #681- Prevent empty string warning by @kevinmcconnell in #680
- Use
element.localName
overelement.tagName.toLowerCase()
by @marcoroth in #696 - Turbo Streams: Preserve permanent elements by @seanpdoyle in #688
- Fix: Dispatch
turbo:click
when driving a Frame by @seanpdoyle in #729 - Don't toggle
turbo-frame[busy]
when navigating_top
by @seanpdoyle in #728
New Contributors
- @rience made their first contribution in #501
- @keithamus made their first contribution in #531
- @manuelpuyol made their first contribution in #553
- @botandrose made their first contribution in #568
- @feliperaul made their first contribution in #564
- @pythonandchips made their first contribution in #419
- @srt32 made their first contribution in #571
- @hey-leon made their first contribution in #552
- @blrB made their first contribution in #516
- @dphaener made their first contribution in #483
- @grncdr made their first contribution in #524
- @mfo made their first contribution in #586
- @kevinmcconnell made their first contribution in #612
- @npezza93 made their first contribution in #607
- @marcoroth made their first contribution in #632
- @rik made their first contribution in #648
- @ondrej-zadnik made their first contribution in #636
- @agrobbin made their first contribution in #627
- @akshayKhot made their first contribution in #569
Full Changelog: v7.1.0...v7.2.0
v7.2.0-rc.3
What's Changed
This ensures compatibility with the Turbo Native adapters. All features will be restored in 7.3.0 when the native issues have been worked out.
- Reintroduce
Visit
identifier
property by @kevinmcconnell in #718 - Revert "Dispatch visit events on the initiator link or form (#695)" by @kevinmcconnell in #723
- Revert "Return
Promise<void>
fromTurbo.visit
(#650)" by @kevinmcconnell in #724
Full Changelog: v7.2.0-rc.2...v7.2.0-rc.3
v7.2.0-rc.2
What's Changed
- Revert "allow customizing the element that Drive replaces (#627)" by @seanpdoyle in #715
- Dispatch
turbo:fetch-request-error
during Visits by @seanpdoyle in #685
Full Changelog: v7.2.0-rc.1...v7.2.0-rc.2
v7.2.0-rc.1
What's Changed
- Make
StreamElement.templateElement
more flexible by @seanpdoyle in #665 - Preserve input values in cache by @seanpdoyle in #666
- PageSnapshot: reduce cloning loop iterations by @seanpdoyle in #669
turbo:frame-missing
: Re-useFetchResponse
HTML by @seanpdoyle in #672- Form Link Submissions: Don't remove
<form>
until submission is complete by @seanpdoyle in #678 - Add
submitter
toTurbo.setConfirmMethod
callback by @seanpdoyle in #676 - Bugfix: Redirects and
[data-turbo-cache=false]
by @seanpdoyle in #674 data-turbo-stream
links should not set aria-busy by @kevinmcconnell in #681- Prevent empty string warning by @kevinmcconnell in #680
- Use
element.localName
overelement.tagName.toLowerCase()
by @marcoroth in #696 - Upgrade TypeScript to 4.8 by @marcoroth in #709
- Export Custom Elements and Stream Action Types by @marcoroth in #708
- Add support for data-turbo-action to link_to by @ondrej-zadnik in #636
- Allow customizing the element that Drive replaces by @agrobbin in #627
- Dispatch visit events on the initiator link or form by @domchristie in #695
turbo:frame-missing
: Dispatch for 4xx and 5xx by @seanpdoyle in #693- Opt-into Turbo Stream
GET
from Form submitter by @seanpdoyle in #690 - Turbo Streams: Preserve permanent elements by @seanpdoyle in #688
- Add
render
toturbo:before-stream-render
event by @seanpdoyle in #684 - Remove unused property
identifier
by @akshayKhot in #569
Full Changelog: v7.2.0-beta.2...v7.2.0-rc.1
v7.2.0-beta.2
What's Changed
- Replace FormInterceptor with FormSubmitObserver by @seanpdoyle in #382
- Clear cache on non-GET form submit by @tleish in #495
- Update the history before rendering promoted frames by @manuelpuyol in #618
- Return
Promise<void>
fromTurbo.visit
by @seanpdoyle in #650 - Prevent form links from submitting multiple requests by @seanpdoyle in #645
- Resolve Frame Visit caching issue by @seanpdoyle in #644
- Do not autofocus inert or hidden elements by @seanpdoyle in #654
- Encode Form Submitter
[name]
into submission by @seanpdoyle in #653 Turbo.visit(..., { frame: "frame" })
by @seanpdoyle in #649- Disabling Drive keeps Frames default behaviour by @rik in #648
- Wait for CSS to be loaded before replacing the Body by @manuelpuyol in #614
- Perform scrolling prior to Visit completion by @seanpdoyle in #476
- Change
elementDriveEnabled()
toelementIsNavigatable()
by @marcoroth in #656 - Bugfix: Form Mode opt-in should consider outside submitters by @seanpdoyle in #655
- Activate
<script>
in Turbo Streams by @seanpdoyle in #660 - Expand
Turbo.setFormMode
guards by @seanpdoyle in #658 - Don't convert
data-turbo-stream
links to forms by @kevinmcconnell in #647 - Replace LinkInterceptor with LinkClickObserver by @seanpdoyle in #412
- Return
Promise<void>
fromFrameElement.reload
by @seanpdoyle in #661 - Add turbo:fetch-request-error event on frame and form network errors by @srt32 in #640
- Introduce
turbo:frame-missing
event by @seanpdoyle in #445 - Dispatch
turbo:before-stream-render
with reference to<turbo-stream>
by @seanpdoyle in #662
Full Changelog: v7.2.0-beta.1...v7.2.0-beta.2
v7.2.0-beta.1
What's Changed
This is not a feature-complete release of Turbo 7.2.0. Follow along on the 7.2.0 milestone to track the pending PRs we hope to include in the final release. But please help us thoroughly test this very substantial update of new features and fixed bugs.
New
- Add pre-population of cache with views based on links with
turbo_preload
attribute by @hey-leon in #552 - Add support of custom rendering in
turbo:before{-frame,}-render
events by @seanpdoyle in #431 - Allow Turbo Streams with GET via
data-turbo-stream
by @kevinmcconnell in #612 - Add option to create custom stream actions by @seanpdoyle in #479
- Add client-side Turbo Cache Control API by @marcoroth in #632
- Add exposure of Frame load state via
[complete]
attribute by @seanpdoyle in #487 - Add a
turbo:reload
event that returns the reason why turbo needed to do a hard reload by @manuelpuyol in #556 - Add option to disable turbo for form or optin to forms. by @pythonandchips in #419
- Add await for confirm method results by @excid3 in #525
- Add turbo stream source by @seanpdoyle in #415
- Allow frames to scroll smoothly into view by @npezza93 in #607
- Add original click event to 'turbo:click' details by @manuelpuyol in #611
- Add .php as a valid isHTML extension by @dhh in #629
- Add exposing FrameRenderer so we can extend its behavior, e.g. vDOM. by @botandrose in #568
- Add export of type declarations for
turbo:
events by @seanpdoyle in #452
Fixed
- Fix
turbo:load
firing twice after a redirect and avoid double render by @feliperaul in #563 - Fix that progress bar wouldn't render if CSP was turned on by @rience in #501
- Fix hidden progress bar by setting turbo-progress-bar z-index to max value by @keithamus in #531
- Fix data-turbo-confirm to work with multiple submitters inside a form by @feliperaul in #564
- Fix scrolling to top of page on reload by @srt32 in #571
- Fix blank
[formaction]
should act like a blank[action]
by @seanpdoyle in #529 - Fix restoring focus when transposing Permanent Elements by @seanpdoyle in #436
- Prevent silent restoration visits when previous visit request is in-flight by @domchristie in #595
- Use 'will render' false for action 'replace' after GET redirect by @blrB in #516
- Use
replaceChildren
in StreamActions.update by @seanpdoyle in #534 - Defensively create custom turbo elements to prevent re-initialization errors by @dphaener in #483
- Do not declare global types/constants by @grncdr in #524
- fix(ie/edge): form.method='delete', raises Invalid argument. by @mfo in #586
- Only update history when Turbo visit is renderable by @manuelpuyol in #601
- Ensure Turbo does not interfere with IFrames by @seanpdoyle in #389
- Frame Visits: Cache Snapshot later in process by @seanpdoyle in #488
Full Changelog: v7.1.0...v7.2.0-beta.1
Using the beta in Rails
The beta/rc series of Turbo 7.2.0 is available to use in Rails via turbo-rails:
gem "turbo-rails", github: "hotwired/turbo-rails", branch: "turbo-7-2-0"
v7.1.0
What's Changed (Since 7.0.1)
- NEW: data-turbo-confirm overwriteable callback by @virolea in #379
- NEW: Toggle [disabled] on form submitter by @seanpdoyle in #386
- NEW: Push history state from frame navigations by @seanpdoyle in #398
- NEW: Toggle
[aria-busy="true"]
during requests by @seanpdoyle in #199, #442 - NEW: Add requestSubmit() polyfill by default by @dhh in #439
- FIXED: Allow programmatic visits to go cross-origin by @ParamagicDev in #410
- FIXED: Frames: Abort prior requests during navigation by @seanpdoyle in #418
- FIXED: Load data-turbo-method links within the correct turbo frame by @spohlenz in #411
- FIXED:
GET
Forms: firesubmit-start
andsubmit-end
by @seanpdoyle in #424 - FIXED: Ignore external
<form>
submissions by @seanpdoyle in #437 - FIXED: Fire
turbo:frame-load
event during form submission by @seanpdoyle in #425 - FIXED: Read
[data-turbo-action]
during Form Submissions by @seanpdoyle in #409 - FIXED: Skip form{,method}="dialog" when targetting frame by @seanpdoyle in #388
- FIXED: Integrate Frame-to-Page Visits with Snapshot Cache by @seanpdoyle in #441, #444
- FIXED: Frames: handle
GET
form submissions by @seanpdoyle in #449 - FIXED: Preserve page state while promoting Frame-to-Visit by @seanpdoyle in #448
- FIXED: Disconnect loaded Frame Element while rendering by @seanpdoyle in #454, #455
- FIXED: Frames: Ignore already cancelled
submit
events by @seanpdoyle in #459 - FIXED: Do not render cache after preloaded response by @tleish in #458
Full Changelog: v7.0.1...v7.1.0
v7.1.0-rc.3
What's Changed
- FIXED:
GET
form submissions handling ofsearchParams
by @seanpdoyle in #461, #464 - FIXED: Frames: Ignore already cancelled
submit
events by @seanpdoyle in #459 - FIXED: Do not render cache after preloaded response by @tleish in #458
Full Changelog: v7.1.0-rc.2...v7.1.0-rc.3
v7.1.0-rc.2
What's Changed
- FIXED: Frames: handle
GET
form submissions by @seanpdoyle in #449 - FIXED: Preserve page state while promoting Frame-to-Visit by @seanpdoyle in #448
- FIXED: Disconnect loaded Frame Element while rendering by @seanpdoyle in #454, #455
Full Changelog: v7.0.1-rc.1...v7.1.0-rc.2
v7.1.0-rc.1
What's Changed
We've now fully replaced all behavior that used to be offered by rails-ujs with data-turbo-confirm
and the automatic disabling of form submitters 🎉
- NEW: data-turbo-confirm overwriteable callback by @virolea in #379
- NEW: Toggle [disabled] on form submitter by @seanpdoyle in #386
- NEW: Push history state from frame navigations by @seanpdoyle in #398
- NEW: Toggle
[aria-busy="true"]
during requests by @seanpdoyle in #199, #442 - NEW: Add requestSubmit() polyfill by default by @dhh in #439
- FIXED: Allow programmatic visits to go cross-origin by @ParamagicDev in #410
- FIXED: Frames: Abort prior requests during navigation by @seanpdoyle in #418
- FIXED: Load data-turbo-method links within the correct turbo frame by @spohlenz in #411
- FIXED:
GET
Forms: firesubmit-start
andsubmit-end
by @seanpdoyle in #424 - FIXED: Ignore external
<form>
submissions by @seanpdoyle in #437 - FIXED: Fire
turbo:frame-load
event during form submission by @seanpdoyle in #425 - FIXED: Read
[data-turbo-action]
during Form Submissions by @seanpdoyle in #409 - FIXED: Skip form{,method}="dialog" when targetting frame by @seanpdoyle in #388
- FIXED: Integrate Frame-to-Page Visits with Snapshot Cache by @seanpdoyle in #441, #444
New Contributors
Full Changelog: v7.0.1...v7.1.0-rc.1