Skip to content

Conversation

@mandyHahn
Copy link
Contributor

@mandyHahn mandyHahn commented Sep 30, 2025

Based on the patch posted here: #88 (comment)

Update defer in renderer.rb to add an event listener for turbo:load.

  • creates chart on either turbo:load or load
  • on creating chart, adds an event listener for turbo:before-chache to destroy the chart before frame reload
  • charts are not rendered during turbo preview states

Added test to check for turbo integration.

Note: Not tested with turbo_streams, but based on documentation does not support partial page updates via turbo_stream.

Should work whether turbo is used or not.

@styd styd requested a review from exterm October 2, 2025 12:47
@styd
Copy link
Owner

styd commented Oct 2, 2025

@exterm @mandyHahn Do you guys use this ruby gem at Clockwork? If so, can you update the README to add your company in a new PR? Thank you.

@styd styd merged commit 6c65103 into styd:master Oct 4, 2025
35 of 36 checks passed
@exterm
Copy link

exterm commented Oct 6, 2025

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants