Skip to content
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

Add turbo 8 meta helpers (#186) #188

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

BarnabeD
Copy link
Contributor

This PR :

issue : #186

Two new helpers for turbo-rails have been added :

  • TurboRefreshMethodTag
  • TurboRefreshScrollTag

This helper has not been included in this PR : turbo_refreshes_with , because I don't know how to correctly handle the erb equivalent of yeald :head with Phlex - sorry :/

helper source : turbo-rails/app/helpers/turbo/drive_helper.rb#L70

next step :

I can continue with all others helpers if it's help:

  • turbo_exempts_page_from_cache_tag
  • turbo_exempts_page_from_preview_tag
  • turbo_exempts_page_from_preview_tag

Note :

I'm still not very familiar with open source contributions, so if I've forgotten anything, I'm sorry.

@joeldrapper
Copy link
Collaborator

This is great! Thank you 🙏

I believe the turbo_refreshes_with can be implemented as a value helper, and it will work if you yield(:head) in the layout. This will only work with either an ERB layout or a layout including Phlex::Rails::Layout specified like this. https://www.phlex.fun/#layouts

@joeldrapper joeldrapper merged commit a8c7b58 into phlex-ruby:main Mar 29, 2024
13 checks passed
@BarnabeD
Copy link
Contributor Author

Hi @joeldrapper,
thank you for your feedback !
Thanks for the reference of the new doc, I admit, the yield explanation is crystal clear 😅 … once you read the doc.
I will try it and push it, maybe next week.

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.

2 participants