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

Integrate Templ's live reload with Air #368

Open
1 task done
leakedmemory opened this issue Jan 21, 2025 · 4 comments
Open
1 task done

Integrate Templ's live reload with Air #368

leakedmemory opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@leakedmemory
Copy link
Contributor

Tell us about your feature request

The project currently doesn't use the Live reload with other tools feature from Templ. This functionality enhances the developer experience a little by eliminating the need to manually refresh the page after every UI change.

If this is something that is considered to be worth implementing, I'm willing to do it and make a PR.

Disclaimer

  • I agree
@leakedmemory leakedmemory added the enhancement New feature or request label Jan 21, 2025
@Ujstor
Copy link
Collaborator

Ujstor commented Jan 21, 2025

@leakedmemory
Copy link
Contributor Author

That's what I'm talking about. It uses Air, but it not fully integrated with Templ, so I have to manually reload the page to update the UI.

In a just-created project, while running make watch:

  • Starts like:

<button type="submit" >Submit</button>
Image

  • After a change:

<button type="submit">Something</button>
Image

It still shows "Submit", even though it correctly built, so I have to reload the page to show the new version.

Image

Implementing the way is documented in the link of Templ's documentation, it updates by its own and faster, without the need of a page manual page reload. It's actually the the first line of the doc page:

Browser live reload allows you to see your changes immediately without having to switch to your browser and press F5 or CMD+R.

@Ujstor
Copy link
Collaborator

Ujstor commented Jan 21, 2025

Oh, I didn't get the issue... now things are clearer.... if someone opens a PR with the feature, it will be integrated into the project

@leakedmemory
Copy link
Contributor Author

In that case, I'll do it and make the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants