From 257a63646e7c54e55f425dbfbc99e8cfa3b58164 Mon Sep 17 00:00:00 2001 From: grahac <16552370+grahac@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:12:23 -0700 Subject: [PATCH] fix: Let navbar_item accept target navbar_item/1 declares attr :rest, :global, but target is not one of Phoenix's global attributes, so the target="_blank" the navbar passes to it was dropped at render time -- and Elixir 1.20 warned about it on every compile: warning: undefined attribute "target" for component ErrorTracker.Web.Layouts.navbar_item/1 Adding target to the global include list puts it into @rest, the attribute the interpolates, so it renders and the warning goes away. --- lib/error_tracker/web/components/layouts.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/error_tracker/web/components/layouts.ex b/lib/error_tracker/web/components/layouts.ex index f1fbe68..3e7bd0d 100644 --- a/lib/error_tracker/web/components/layouts.ex +++ b/lib/error_tracker/web/components/layouts.ex @@ -125,7 +125,7 @@ defmodule ErrorTracker.Web.Layouts do end attr :to, :string, required: true - attr :rest, :global + attr :rest, :global, include: ~w(target) slot :inner_block, required: true