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

Publish new version that is compatible with LiveView 1.0? #88

Closed
Munksgaard opened this issue Dec 4, 2024 · 2 comments
Closed

Publish new version that is compatible with LiveView 1.0? #88

Munksgaard opened this issue Dec 4, 2024 · 2 comments

Comments

@Munksgaard
Copy link
Contributor

Munksgaard commented Dec 4, 2024

LiveView 1.0 has just been released. I'd love to upgrade, but live_select requires phoenix_live_view ~> 0.19. I know that I can use override: true in my mix.deps, it would be nicer to release a new version of live_select that was fully compatible.

Related to #85.

Edit: And by the way, thank you for your work on this component. It is great!

@maxmarcon
Copy link
Owner

Thanks for the heads-up. I just updated to LV 1.0.0 and tried to compile, but I get this error:

Generated phoenix_live_reload app
==> phoenix_ecto
Compiling 7 files (.ex)
Generated phoenix_ecto app
==> live_select
Compiling 11 files (.ex)
error: undefined variable "my_form"
  lib/support/live_select_web/live/showcase_live.ex:244: LiveSelectWeb.ShowcaseLive.Render.live_select/1


== Compilation error in file lib/support/live_select_web/live/showcase_live.ex ==
** (CompileError) lib/support/live_select_web/live/showcase_live.ex: cannot compile module LiveSelectWeb.ShowcaseLive.Render (errors have been logged)

no time to investigate right now. If you have a clue, I'm all ears!

Thanks

Munksgaard added a commit to Munksgaard/live_select that referenced this issue 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: 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
@maxmarcon
Copy link
Owner

I just published a new version 1.4.4 compatible with LV 1.0.0

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 a pull request may close this issue.

2 participants