Take LiveView 1.1.33 from Hex instead of a git pin

c9c8725 · Gabriel Morell · 2026-10-23 15:29

11 files +31 -21
Message
{commit_body(@commit)}

Files changed

modified assets/tailwind.config.js
+0 −1
@@ -42,7 +42,6 @@ module.exports = {
42 42 plugins: [
43 43 require("@tailwindcss/forms"),
44 44 require("daisyui"),
45 − plugin(({addVariant}) => addVariant("phx-no-feedback", [".phx-no-feedback&", ".phx-no-feedback &"])),
46 45 plugin(({addVariant}) => addVariant("phx-click-loading", [".phx-click-loading&", ".phx-click-loading &"])),
47 46 plugin(({addVariant}) => addVariant("phx-submit-loading", [".phx-submit-loading&", ".phx-submit-loading &"])),
48 47 plugin(({addVariant}) => addVariant("phx-change-loading", [".phx-change-loading&", ".phx-change-loading &"]))
modified lib/lambent_ex/schema/cronos.ex
+2 −0
@@ -55,6 +55,8 @@ defmodule LambentEx.Schema.Cronos do
55 55 def changeset(source, params) do
56 56 source
57 57 |> cast(params, ~w(name time action arg targets)a)
58 + # the multiple select's hidden "" placeholder, see CoreComponents.input
59 + |> update_change(:targets, &Enum.reject(&1 || [], fn target -> target == "" end))
58 60 |> validate_required([:name, :time, :action])
59 61 |> validate_targets()
60 62 |> validate_arg()
modified lib/lambent_ex_web/components/core_components.ex
+17 −9
@@ -278,7 +278,13 @@ defmodule LambentExWeb.CoreComponents do
278 278 end)
279 279 |> assign_new(:id, fn -> Phoenix.HTML.Form.input_id(f, field) end)
280 280 |> assign_new(:value, fn -> Phoenix.HTML.Form.input_value(f, field) end)
281 − |> assign_new(:errors, fn -> translate_errors(f.errors || [], field) end)
281 + |> assign_new(:errors, fn ->
282 + # LiveView 1.0 dropped phx-feedback-for, so errors on an input the
283 + # user hasn't touched yet are held back here instead of in the DOM
284 + if Phoenix.Component.used_input?(f[field]),
285 + do: translate_errors(f.errors || [], field),
286 + else: []
287 + end)
282 288 |> input()
283 289 end
284 290
@@ -286,7 +292,7 @@ defmodule LambentExWeb.CoreComponents do
286 292 assigns = assign_new(assigns, :checked, fn -> input_equals?(assigns.value, "true") end)
287 293
288 294 ~H"""
289 − <label phx-feedback-for={@name} class="flex items-center gap-4 text-sm leading-6 text-zinc-600">
295 + <label class="flex items-center gap-4 text-sm leading-6 text-zinc-600">
290 296 <input type="hidden" name={@name} value="false" />
291 297 <input
292 298 type="checkbox"
@@ -304,8 +310,11 @@ defmodule LambentExWeb.CoreComponents do
304 310
305 311 def input(%{type: "select"} = assigns) do
306 312 ~H"""
307 − <div phx-feedback-for={@name}>
313 + <div>
308 314 <.label for={@id}><%= @label %></.label>
315 + <%!-- a multiple select with nothing picked sends nothing, and then
316 + used_input? can never see it as used, even after a submit --%>
317 + <input :if={@multiple} type="hidden" name={@name} value="" />
309 318 <select
310 319 id={@id}
311 320 name={@name}
@@ -323,7 +332,7 @@ defmodule LambentExWeb.CoreComponents do
323 332
324 333 def input(%{type: "radio"} = assigns) do
325 334 ~H"""
326 − <div phx-feedback-for={@name} class="form-control">
335 + <div class="form-control">
327 336 <.label for={@id}><%= @label %></.label>
328 337 <div class="btn-group">
329 338 <input
@@ -345,7 +354,7 @@ defmodule LambentExWeb.CoreComponents do
345 354
346 355 def input(%{type: "textarea"} = assigns) do
347 356 ~H"""
348 − <div phx-feedback-for={@name}>
357 + <div>
349 358 <.label for={@id}><%= @label %></.label>
350 359 <textarea
351 360 id={@id || @name}
@@ -353,8 +362,7 @@ defmodule LambentExWeb.CoreComponents do
353 362 class={[
354 363 input_border(@errors),
355 364 "mt-2 block min-h-[6rem] w-full rounded-lg border-zinc-300 py-[7px] px-[11px]",
356 − "text-zinc-900 focus:border-zinc-400 focus:outline-none focus:ring-4 focus:ring-zinc-800/5 sm:text-sm sm:leading-6",
357 − "phx-no-feedback:border-zinc-300 phx-no-feedback:focus:border-zinc-400 phx-no-feedback:focus:ring-zinc-800/5"
365 + "text-zinc-900 focus:border-zinc-400 focus:outline-none focus:ring-4 focus:ring-zinc-800/5 sm:text-sm sm:leading-6"
358 366 ]}
359 367 {@rest}
360 368 >
@@ -367,7 +375,7 @@ defmodule LambentExWeb.CoreComponents do
367 375
368 376 def input(assigns) do
369 377 ~H"""
370 − <div phx-feedback-for={@name} class="form-control">
378 + <div class="form-control">
371 379 <.label for={@id}><%= @label %></.label>
372 380 <div class="input-group">
373 381 <%= render_slot(@icon_pre) %>
@@ -416,7 +424,7 @@ defmodule LambentExWeb.CoreComponents do
416 424
417 425 def error(assigns) do
418 426 ~H"""
419 − <p class="phx-no-feedback:hidden mt-3 flex gap-3 text-sm leading-6 text-rose-600">
427 + <p class="mt-3 flex gap-3 text-sm leading-6 text-rose-600">
420 428 <Heroicons.exclamation_circle mini class="mt-0.5 h-5 w-5 flex-none fill-rose-500" />
421 429 <%= render_slot(@inner_block) %>
422 430 </p>
modified mix.exs
+6 −9
@@ -42,16 +42,13 @@ defmodule LambentEx.MixProject do
42 42 {:phoenix, "~> 1.7", override: true},
43 43 {:phoenix_html, "~> 3.0"},
44 44 {:phoenix_live_reload, "~> 1.2", only: :dev},
45 − # {:phoenix_live_view, "~> 0.18.3"},
46 − {:phoenix_live_view,
47 − [
48 − env: :prod,
49 − git: "https://github.com/phoenixframework/phoenix_live_view.git",
50 − ref: "476d1cd288474d7acb33424a74b304b4e9495ff1",
51 − override: true
52 − ]},
53 − {:heroicons, "~> 0.5"},
45 + # override only for phoenix_live_editable, whose last release (and
46 + # its upstream HEAD, untouched since 2022) still asks for ~> 0.17
47 + {:phoenix_live_view, "~> 1.1.33", override: true},
48 + {:heroicons, "~> 0.5.7"},
54 49 {:floki, ">= 0.30.0", only: :test},
50 + # LiveViewTest parses with lazy_html since LiveView 1.1
51 + {:lazy_html, ">= 0.1.0", only: :test},
55 52 {:phoenix_live_dashboard, "~> 0.8.7"},
56 53 {:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
57 54 {:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
modified mix.lock
+6 −2
@@ -1,22 +1,26 @@
1 1 %{
2 2 "castore": {:hex, :castore, "1.0.21", "0a0e8330dc267a40a3b7ad86d39302764bb71758172904e6a59d5ad6443ce307", [:mix], [], "hexpm", "e42e22723e25dbd46876d056a03f685513d6e98f6b5e555dc551321decd76c5c"},
3 + "cc_precompiler": {:hex, :cc_precompiler, "0.1.11", "8c844d0b9fb98a3edea067f94f616b3f6b29b959b6b3bf25fee94ffe34364768", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3427232caf0835f94680e5bcf082408a70b48ad68a5f5c0b02a3bea9f3a075b9"},
3 4 "cowboy": {:hex, :cowboy, "2.18.0", "bff388eb4d6356cb3f88c26e65b515976bf04b401b805d31550c3e60eba8fe18", [:make, :rebar3], [{:cowlib, ">= 2.19.0 and < 3.0.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, ">= 1.8.0 and < 3.0.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "62d0b26abcf455054972b0da242389c69d5982ce5914afb8c344517f667b9600"},
4 5 "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},
5 6 "cowlib": {:hex, :cowlib, "2.21.0", "3ea757c79784bdbdebac7857ce3adf2290af6b8680d4248c75e40ced2e98c89e", [:make, :rebar3], [], "hexpm", "0960248773762a5319b3c17285028bc76f54f58ef0f9451367401bdf67b46274"},
6 7 "decimal": {:hex, :decimal, "3.2.0", "f1235f05d841a211fda78a08fdb9777f2ff51a71f18455233fae186ff76187c6", [:mix], [], "hexpm", "190bca80580ce61aa69bb0eacadd7677710205c770225c2c2c07e32a5c31b234"},
7 8 "ecto": {:hex, :ecto, "3.13.6", "352135b474f91d1ab99a1b502171d207e9db60421c9e3d0ecab4c7ab96b24d14", [:mix], [{:decimal, "~> 2.0 or ~> 3.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8afa059bc16cd2c94739ec0a11e3e5df69d828125119109bef35f20a21a76af2"},
9 + "elixir_make": {:hex, :elixir_make, "0.10.0", "16577e2583a79bb79237bbff349619ef5d80afffc07eac6e4faf0d00e2ddaf7d", [:mix], [], "hexpm", "dc1f09fb7fa68866b886abd5f0f3c83553b1a19a52359a899e92af1bb3b31982"},
8 10 "eqrcode": {:hex, :eqrcode, "0.2.1", "d12838813e8fc87b8940cc05f9baadb189031f6009facdc56ff074375ec73b6e", [:mix], [], "hexpm", "d5828a222b904c68360e7dc2a40c3ef33a1328b7c074583898040f389f928025"},
9 11 "esbuild": {:hex, :esbuild, "0.10.0", "b0aa3388a1c23e727c5a3e7427c932d89ee791746b0081bbe56103e9ef3d291f", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "468489cda427b974a7cc9f03ace55368a83e1a7be12fba7e30969af78e5f8c70"},
10 12 "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
11 13 "finch": {:hex, :finch, "0.24.0", "4022b6194e907b6d9b597c168001cac38e488a35fe36cef9d8297e3159782510", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.8", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "33ba40069c3587c2f99f9125b766e19dad87d6d54be3c6961db2304df04cef00"},
14 + "fine": {:hex, :fine, "0.1.6", "4bf7151493443c454aac9f2fa2f34f5fefd0346a83fb5586a016c4a135c63247", [:mix], [], "hexpm", "5638eb4495488e885ebec167fa57973e5c35e1a50c344eb7666c90ec1c4e3b12"},
12 15 "floki": {:hex, :floki, "0.34.0", "002d0cc194b48794d74711731db004fafeb328fe676976f160685262d43706a8", [:mix], [], "hexpm", "9c3a9f43f40dde00332a589bd9d389b90c1f518aef500364d00636acc5ebc99c"},
13 16 "gen_icmp": {:hex, :gen_icmp, "0.5.6", "13517841de433fdcfd97603c02ba991ee49b39f55f958dc8682c582e7a285e5c", [:rebar3], [{:pkt, "0.5.0", [hex: :pkt, repo: "hexpm", optional: false]}, {:procket, "0.9.6", [hex: :procket, repo: "hexpm", optional: false]}], "hexpm", "57daf2a4568e2f1cf928ed8b063a4d11fc16fb81faa8e3ba8f1f867598ee66a1"},
14 17 "gen_icmp_ex": {:hex, :gen_icmp_ex, "0.1.1", "29391cc9df79c5cc4c0fb9b878e4ba8b46c59e9b95ad1196aa5db4588e2537d7", [:mix], [{:gen_icmp, "~> 0.5.6", [hex: :gen_icmp, repo: "hexpm", optional: false]}, {:net_address, "~> 0.3.0", [hex: :net_address, repo: "hexpm", optional: false]}], "hexpm", "6bca5ebc1a81bcfaba7212b89b99e9e70b9c6545a21906372f95e7cfd32c45bb"},
15 18 "gen_state_machine": {:hex, :gen_state_machine, "3.0.0", "1e57f86a494e5c6b14137ebef26a7eb342b3b0070c7135f2d6768ed3f6b6cdff", [:mix], [], "hexpm", "0a59652574bebceb7309f6b749d2a41b45fdeda8dbb4da0791e355dd19f0ed15"},
16 19 "gettext": {:hex, :gettext, "0.20.0", "75ad71de05f2ef56991dbae224d35c68b098dd0e26918def5bb45591d5c8d429", [:mix], [], "hexpm", "1c03b177435e93a47441d7f681a7040bd2a816ece9e2666d1c9001035121eb3d"},
17 − "heroicons": {:hex, :heroicons, "0.5.1", "cca0dcca07af5f74d8a7d111e40418d3615d65e6773c0ea10e20cef070fd30aa", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.18.2", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "4b096d0a1d50e9054df9b12cc637c9f65c3972ff086791d3f2d1846f0653117e"},
20 + "heroicons": {:hex, :heroicons, "0.5.7", "28333b4a747e8d1081c769d67036b69f2a746040937886c744be54552d14711c", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 1.1", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "cbab7c9f20f4eef06083007361030d66ad74c21e80b96ebac19c956266e173b9"},
18 21 "hpax": {:hex, :hpax, "1.1.0", "782931867cc23217c68fb5f68fe1a11f5e7544c7fda82c8a7019a5df5a4a1cdf", [:mix], [], "hexpm", "0b8d0f05832f55571d65ac720f79bf8994138ffbb133209dc4685eae0ad456a8"},
19 22 "jason": {:hex, :jason, "1.4.5", "2e3a008590b0b8d7388c20293e9dcc9cf3e5d642fd2a114e4cbbb52e595d940a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b0c823996102bcd0239b3c2444eb00409b72f6a140c1950bc8b457d836b30684"},
23 + "lazy_html": {:hex, :lazy_html, "0.1.13", "860ea816f5bc7936d1ab5ccebc388f9d1031ba9c35ed81a4db9a1c3a50737704", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.9", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:fine, "~> 0.1.0", [hex: :fine, repo: "hexpm", optional: false]}], "hexpm", "9a8405d6785fe6f8423b86e0ec5f21806ef79941fe853eac3d14fbbb173c34e9"},
20 24 "mime": {:hex, :mime, "2.0.7", "b8d739037be7cd402aee1ba0306edfdef982687ee7e9859bee6198c1e7e2f128", [:mix], [], "hexpm", "6171188e399ee16023ffc5b76ce445eb6d9672e2e241d2df6050f3c771e80ccd"},
21 25 "mint": {:hex, :mint, "1.11.0", "a713551624815c0435237b93d90ea8b9b14254690c66f732d0ef8930f76ff1d9", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "c6279ba2d6aa3a383a1d4cfbe7b59f42e6efd400f58d8e2acfeac48a438693ab"},
22 26 "net_address": {:hex, :net_address, "0.3.0", "0fd8bdccdcb74986b7e808bc1f99a7cf4bbc8232bffd6958e18a963500adb541", [:mix], [], "hexpm", "678886a834e031009eda8a45f3e2cbda94a20a1e5fbc174e88e3f031eeb62c5f"},
@@ -29,7 +33,7 @@
29 33 "phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.8.7", "405880012cb4b706f26dd1c6349125bfc903fb9e44d1ea668adaf4e04d4884b7", [:mix], [{:ecto, "~> 3.6.2 or ~> 3.7", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_mysql_extras, "~> 0.5", [hex: :ecto_mysql_extras, repo: "hexpm", optional: true]}, {:ecto_psql_extras, "~> 0.7", [hex: :ecto_psql_extras, repo: "hexpm", optional: true]}, {:ecto_sqlite3_extras, "~> 1.1.7 or ~> 1.2.0", [hex: :ecto_sqlite3_extras, repo: "hexpm", optional: true]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.19 or ~> 1.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "3a8625cab39ec261d48a13b7468dc619c0ede099601b084e343968309bd4d7d7"},
30 34 "phoenix_live_editable": {:git, "https://github.com/andyl/phoenix_live_editable.git", "3d0256dc9ba69ae274a88a878001b13d15a4f265", [subdir: "apps/phoenix_live_editable", ref: "3d0256dc9ba69ae274a88a878001b13d15a4f265"]},
31 35 "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.4.0", "4fe222c0be55fdc3f9c711e24955fc42a7cd9b7a2f5f406f2580a567c335a573", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "bebf0fc2d2113b61cb5968f585367234b7b4c21d963d691de7b4b2dc6cdaae6f"},
32 − "phoenix_live_view": {:git, "https://github.com/phoenixframework/phoenix_live_view.git", "476d1cd288474d7acb33424a74b304b4e9495ff1", [ref: "476d1cd288474d7acb33424a74b304b4e9495ff1"]},
36 + "phoenix_live_view": {:hex, :phoenix_live_view, "1.1.33", "8350c8bebabfa318c9afb0970eacced9174cd72603c9be2240e99d550fcc2eed", [:mix], [{:igniter, ">= 0.6.16 and < 1.0.0-0", [hex: :igniter, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:lazy_html, "~> 0.1.0", [hex: :lazy_html, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0 or ~> 1.8.0-rc", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2030f7987f641a269634e021bcde9373e5dea993f9373e628a44da86b2330b6c"},
33 37 "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.2.0", "ff3a5616e1bed6804de7773b92cbccfc0b0f473faf1f63d7daf1206c7aeaaa6f", [:mix], [], "hexpm", "adc313a5bf7136039f63cfd9668fde73bba0765e0614cba80c06ac9460ff3e96"},
34 38 "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
35 39 "pkt": {:hex, :pkt, "0.5.0", "6dc345565dd7e8d80e56c1198e1ee07344f191782d9f1e66eca50b40c98b1720", [:rebar3], [], "hexpm", "c285cd1e5fb850d09f7fd98e1c9e291d1348ab41e4171c78fa99d04e04d84fb2"},

Parents: 58eeddf