Remove Legal module from core (extracted to phoenix_kit_legal) - #458
Merged
Conversation
All module admin views (customer_service, storage, db, referrals, maintenance, sitemap) were wrapped in LayoutWrapper.app_layout, but they render inside admin live_session which already applies the admin layout. This caused double sidebar rendering. Remove the redundant wrapper from 16 .heex templates and 1 .ex file, keeping only the inner content div.
Register /dashboard/billing-profiles routes conditionally when phoenix_kit_billing package is installed. Follows the same Code.ensure_loaded? pattern used for shop user routes. Adds index, new, and edit routes for both localized and non-localized variants.
- Delete lib/modules/legal/ (8 files), cookie_consent component, consent_config_controller, phoenix_kit_consent.js, legal_templates/ - Add Code.ensure_loaded? guards in integration.ex, layout_wrapper.ex, root.html.heex, dashboard.html.heex, auth.ex, layouts.ex - Remove CookieConsent import from phoenix_kit_web.ex core_components - Remove phoenix_kit_consent.js from assets_controller static map - Add @compile {:no_warn_undefined} for Legal modules in integration.ex, layout_wrapper.ex, layouts.ex, auth.ex - Update .dialyzer_ignore.exs for extracted Legal references
Missed in previous commit: 4 storage templates and maintenance settings.ex still had the duplicate LayoutWrapper wrapper.
ddon
added a commit
that referenced
this pull request
Mar 28, 2026
…w docs Dashboard layout loaded consent JS but never rendered the widget component. Users on /dashboard/* pages would never see the cookie consent banner. Added the widget block matching the pattern in root.html.heex. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ddon
added a commit
that referenced
this pull request
Mar 28, 2026
…w docs The dashboard.html.heex layout loaded phoenix_kit_consent.js but never rendered the cookie consent widget component. Users on /dashboard/* pages would not see the consent banner even with phoenix_kit_legal installed. Also standardizes the consent component attribute order to match layout_wrapper.ex and adds dashboard.html.heex to dialyzer ignore list. Co-Authored-By: Claude Opus 4.6 <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
phoenix_kit_legal(repo: BeamLabEU/phoenix_kit_legal)Code.ensure_loaded?guards for all Legal integration points in coremix qualitywithout Legal package installedChanges
Deleted from core (moved to package)
lib/modules/legal/— 8 files (context, structs, schema, service, LiveView, README)lib/phoenix_kit_web/controllers/consent_config_controller.ex— API controllerlib/phoenix_kit_web/components/core/cookie_consent.ex— Phoenix componentpriv/static/assets/phoenix_kit_consent.js— consent widget JSpriv/legal_templates/*.eex— 7 legal page templatesModified in core (guards added)
integration.ex— conditional routes +@compile {:no_warn_undefined}layout_wrapper.ex— conditional consent widget + JS script tagroot.html.heex/dashboard.html.heex— conditional consent blockslayouts.ex—@compile {:no_warn_undefined}for Legal.CookieConsentassets_controller.ex— removed consent.js from static mapauth.ex— removed Legal tab mapping +@compile {:no_warn_undefined}phoenix_kit_web.ex— removed CookieConsent importmodule_registry.ex— removed Legal from internal_modules.dialyzer_ignore.exs— updated for extracted Legal referencesPackage features (in phoenix_kit_legal repo)
PhoenixKit.Modules.Legal.*phoenix_kit ~> 1.7+phoenix_kit_publishingTest Plan
mix qualitypasses (format + credo + dialyzer)