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