Improve blogging and entity UX with autosave, slug handling, and module page polish - #195
Merged
Conversation
* add PhoenixKit.Utils.Slug and reuse it from the blogging storage layer so slug generation/uniqueness is centralized and honors the current post’s slug * keep track of last auto-generated slug vs manual edits in the blogging editor, keep generating slugs after autosaves, and push_patch to the new edit path when a slug/path change occurs * teach entity data forms to share the slug helper, enforce the slug pattern, and de-duplicate against existing records (excluding the current one) * overhaul entity field modal state: normalize field maps, auto-generate keys from labels until the slug input is touched, and throttle all inputs with phx-debounce
Fixed an issue where the JavaScript warning banner would reappear after LiveView updates (e.g., when opening/closing the media selector modal). Changes: - Wrap warning banner in parent div with phx-update="ignore" - Prevents LiveView from re-rendering the banner on updates - Banner hides once on initial load and stays hidden across all updates - Preserves intended behavior: banner only shows when JS is disabled The previous implementation without phx-update would re-render the banner on every LiveView patch, but the hide script wouldn't re-execute, causing the banner to become visible again. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move blogging paths from info section to stats section for better visual hierarchy - Remove bullet points from blogging paths and add break-all for proper wrapping - Simplify blogging button labels from "Open Blogging"/"Manage Blogging" to "Open"/"Configure" - Remove redundant "Key paths & URLs" heading from blogging module - Move SEO noindex status from badge to stats section for consistency - Simplify SEO status badges by removing "Module" prefix - Remove unnecessary info section from SEO module - Change SEO button from "Configure SEO" to "Configure" - Standardize all module cards to use consistent "Configure" button text
- Fix alias ordering in entity_form.ex and data_form.ex (alphabetize Utils aliases) - Reduce cyclomatic complexity in blogging editor slug update function - Extract helper functions: no_slug_update, update_slug_from_content, apply_new_slug - Improve code readability and maintainability
Remove unnecessary 'title || ""' guard that Dialyzer flagged as always being a binary. The extract_title_from_content function always returns a string, never nil, making the fallback to empty string redundant and causing a type mismatch warning.
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.
TL;DR
Comprehensive UX improvements to blogging editor and entity forms: centralized slug generation with autosave support, featured image autosave,
fixed JavaScript warning persistence, cleaner module cards with better mobile responsiveness, and resolved all code quality issues.
🎯 Overview
This PR enhances the blogging and entity modules with better autosave behavior, unified slug handling, and improved UI consistency across the admin
modules page.
✨ Key Changes
Blogging Editor Improvements
auto-generated slugs
Centralized Slug Utilities
Entity Forms Enhancement
Admin Modules Page Polish
🔧 Code Quality
📝 Files Changed
🧪 Testing
Ready for review! All changes maintain backward compatibility and improve user experience across the board.