Extract Emails module to standalone package - #447
Merged
Conversation
Group listing pages (/news, /legal) now use the most recent published post date as lastmod. Homepage (/) uses the latest date across all publishing entries. Other static pages use the sitemap generation date.
- Add PhoenixKit.Email.Provider behaviour and DefaultProvider (no-op) - Refactor Mailer to use email_provider() instead of hard Emails aliases - Remove send_test_tracking_email from core (moves to emails package) - Refactor UserNotifier to use email_provider(), strip HTML fallbacks - Add Emails to ModuleRegistry known_external_packages - Remove email/sqs_polling queues from core Oban config, add add_oban_queue/3 - Fix pre-existing dialyzer ignore for Sync MapSet opaque types - Fix pre-existing credo alias ordering in shop catalog modules
- New PhoenixKitWeb.AdminEditHelper module (supports both Plug.Conn and LiveView.Socket) - Fix Shop catalog: admin edit URL now only assigned for admin users (was assigned to all visitors) - Add admin edit links to Publishing controller (blog listing, post show, date URL) - Add conditional Edit button in Publishing templates (index + show)
- Delete lib/modules/emails/ (35 source files + web LiveViews/controllers) - Delete PhoenixKitWeb.Routes.EmailsRoutes and all email mix tasks (15 files) - Remove PhoenixKit.Modules.Emails from module_registry internal_modules - Add to known_external_packages for admin Modules page - Remove EmailsRoutes alias and safe_route_call references from integration.ex - Update billing.ex to use PhoenixKit.Mailer.send_from_template instead of Templates.send_email - Guard dashboard.html.heex Emails.enabled?() with Code.ensure_loaded? + apply - Update v15.ex and v31.ex migrations to use dynamic module dispatch - Clean up .dialyzer_ignore.exs entries for removed files Also: Add legal_links to cookie consent widget config for dynamic legal page links
…I toggle - Replace hardcoded cookie/privacy URLs with Routes.path() to fix double-slash bug - Add dynamic legal_links from published pages + single /legal index link - Use bg-base-100/70 backdrop instead of bg-black for light/dark theme compatibility - Improve glass opacity (0.95→0.98), card bg (50→80%), text contrast - Replace custom toggle with standard daisyUI toggle toggle-primary
…dule_card component
# Conflicts: # lib/phoenix_kit/install/oban_config.ex # lib/phoenix_kit/module_registry.ex
ddon
added a commit
that referenced
this pull request
Mar 24, 2026
- Remove Emails from internal_modules, add to known_external_packages - Remove email/sqs_polling queues and ensure_sqs_polling_queue from ObanConfig - Eliminate double get_active_template_by_name calls in Mailer and UserNotifier - Centralize email_provider() as Provider.current/0 - Update test counts for Emails+Posts extractions (20→18, 19→17, 24→22) - Add PR review docs for #447 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 free
to 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
PhoenixKit.Modules.Emailsfrom core into standalonephoenix_kit_emailspackagePhoenixKit.Email.Providerbehaviour +DefaultProvider(no-op fallback)MailerandUserNotifierto useemail_provider()instead of hard aliasesexternal_plugin_view?to recognizePhoenixKit.Modules.*.Webas external pluginsmodule_cardcomponent to render hero-* iconsChanges
Core behaviour refactor
PhoenixKit.Email.Provider— unified behaviour (14 callbacks)PhoenixKit.Email.DefaultProvider— no-op implementationPhoenixKit.Mailer— usesemail_provider(), removedsend_test_tracking_emailPhoenixKit.Users.Auth.UserNotifier— usesemail_provider(), text-only fallbacksModule infrastructure
ModuleRegistry— Emails added toknown_external_packagesObanConfig— removed email queues from core install, addedadd_oban_queue/3external_plugin_view?— recognizesPhoenixKit.Modules.*.WebnamespaceRemoved from core
lib/modules/emails/— 35+ source fileslib/phoenix_kit_web/routes/emails.exTest Plan
mix precommitpassesphoenix_kit_emailsas path depphoenix_kit_emailsas path deplive_view: