Uh oh!
There was an error while loading. Please reload this page.
Add phoenix_kit_favicon component for parent-owned head - #504
Merged
Conversation
Until now the site_icon_file_uuid setting only reached the browser tab in PhoenixKit standalone mode — render_admin_only_layout injected the <link rel="icon"> inline, but render_admin_with_parent and fully public parent-owned layouts had no way to pick up the uploaded favicon. Extract that logic into PhoenixKitWeb.Components.Core.PhoenixKitFavicon so parent applications can drop <.phoenix_kit_favicon /> into their root.html.heex <head>. The component reads the cached setting, signs the storage URL, and renders nothing when the setting is empty so existing static favicons keep working. Also invoke the component next to <.phoenix_kit_globals /> in the render_admin_with_parent path so admin pages rendered inside a parent layout still get the uploaded icon even if the parent app hasn't added the helper yet.
timujinne added a commit
to timujinne/phoenix_kit
that referenced
this pull request
Apr 28, 2026
Brings in: - phoenix_kit_favicon component (PR BeamLabEU#504) - Per-user notifications module (V104) - dynamic_children/2 with locale (PR BeamLabEU#506) - arity-2 dynamic_children callbacks (PR BeamLabEU#505) - Bump to 1.7.101 - Claude review docs for PRs BeamLabEU#505/506
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Until now the
site_icon_file_uuidsetting (introduced in 1.7.97) only reached the browser tab in PhoenixKit standalone mode —render_admin_only_layoutinjected<link rel="icon">inline, butrender_admin_with_parentand fully public parent-owned layouts had no way to pick up the uploaded favicon. So in production setups where the parent application owns<head>, the icon was saved correctly but never rendered.Changes
PhoenixKitWeb.Components.Core.PhoenixKitFavicon. It readssite_icon_file_uuidfrom Settings viaget_setting_cached/2, signs a storage URL throughModules.Storage.URLSigner, and renders nothing when the setting is empty so existing static favicons keep working.<PhoenixKitWeb.Components.Core.PhoenixKitFavicon.phoenix_kit_favicon />in theirroot.html.heex<head>to get the uploaded icon.render_admin_only_layoutwith the new component (no behaviour change in standalone).<.phoenix_kit_globals />inrender_admin_with_parent, so PhoenixKit admin pages rendered inside a parent layout still pick up the uploaded icon even before the parent app adopts the helper in its own<head>.Test plan
mix compile --warnings-as-errors— cleanmix credo --stricton changed files — clean