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

Bump live_view to 1.0 #90

Closed
wants to merge 1 commit into from
Closed

Conversation

Munksgaard
Copy link
Contributor

@Munksgaard Munksgaard commented Dec 6, 2024

LiveView 1.0 adds support for interpolation using curly braces ({...}) instead of angle brackets (<%= ... %>)[0]. This caused a compilation error in ShowcaseLive, because we return literal curly braces in the HTML. The fix is to either use &lbrace; or <%= "{" %>[1]. I think the former is nicer, so that's what I've done here. If you disagree, I'm happy to change it.

I've also changed some instances of live_flash/2 to Phoenix.Flash.get/2, as live_flash/2 is now deprecated[2]

Fixes: #88

0: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#sigil_H/2-interpolation

1: phoenixframework/phoenix_live_view#3554

2: https://hexdocs.pm/phoenix_live_view/changelog.html#deprecations-1

LiveView 1.0 adds support for interpolation using curly braces (`{...}`) instead
of angle brackets (`<%= ... %>`)[0]. This caused a compilation error in
`ShowcaseLive`, because we return literal curly braces in the HTML. The fix is to
either use `&lbrace;` or `<%= "{" %>`[1]. I think the former is nicer, so that's
what I've done here. If you disagree, I'm happy to change it.

I've also changed some instances of `live_flash/2` to `Phoenix.Flash.get/2`, as
`live_flash/2` is now deprecated[2]

Fixes: maxmarcon#88

0: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#sigil_H/2-interpolation

1: phoenixframework/phoenix_live_view#3554

2: https://hexdocs.pm/phoenix_live_view/changelog.html#deprecations-1
@Munksgaard
Copy link
Contributor Author

It seems like liveview 1.0 requires elixir 1.14.1. In particular, the error that CI is reporting is that this macro doesn't exist, and it was added in 1.14.1. What do you want to do @maxmarcon?

@maxmarcon
Copy link
Owner

Thanks for the PR, I noticed only now. Sorry about that... I just added support for LV 1.0.0 and published a new version

@maxmarcon maxmarcon closed this Dec 7, 2024
@Munksgaard
Copy link
Contributor Author

No worries, thanks for the release :)

@Munksgaard Munksgaard deleted the bump-liveview branch December 7, 2024 20:11
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.

Publish new version that is compatible with LiveView 1.0?
2 participants