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 hotwired #98

Merged
merged 1 commit into from
Feb 4, 2022
Merged

add hotwired #98

merged 1 commit into from
Feb 4, 2022

Conversation

svenwltr
Copy link
Member

@svenwltr svenwltr commented Feb 4, 2022

#91

Hotwired Turbo is useful for dynamically updating websites without having to do JavaScript magic. We have a recurring use-case of status pages that could benefit of this. These status pages also have the trait that there is only one global state. Therefore I added a broadcast based on Redis with direct Hotwired integration.

A demo will follow soon.

Docs: https://turbo.hotwired.dev/handbook/introduction

@svenwltr svenwltr requested a review from a team as a code owner February 4, 2022 10:30
@svenwltr svenwltr self-assigned this Feb 4, 2022
@svenwltr svenwltr mentioned this pull request Feb 4, 2022
8 tasks
func HotwiredImportTemplateFunction() template.HTML {
return template.HTML(`
<script type="module">
import hotwiredTurbo from 'https://cdn.skypack.dev/@hotwired/turbo';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of CDN hosted JS & CSS, however I'm not sure how else we should handle that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'm not a big fan of CDN hosted JS & CSS

Why exactly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would require our own CDN then. Also our tools are not customer facing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't require your own CDN if you just put it in the source. But of course this would make it larger.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not mind putting that to s3/cf. Or ship it directly. Not great, but not terrible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just put it in the source

I'd like not to have a 22.6 kB text file in SCM (for Hotwired alone, not counting other deps like Bootstrap).

I would not mind putting that to s3/cf. Or ship it directly. Not great, but not terrible.

Would work for me, but would require some access protection in case someone else uses this library.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try Git LFS, but in another PR.

@svenwltr svenwltr merged commit de68fba into release-v4 Feb 4, 2022
@svenwltr svenwltr deleted the add-hotwired branch February 4, 2022 12:32
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