-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
Summary
The current inline edit functionality for ad codes has limitations that make it difficult to provide a good UX for features like autocomplete. A dedicated edit page would provide:
- Better form UX - Full-page form with proper spacing and layout
- Autocomplete support - Select2 and other dynamic form elements work reliably without z-index/timing issues
- More intuitive workflow - Users can focus on editing one ad code at a time
- Easier maintenance - Separate edit page is simpler to maintain than inline edit JavaScript
Background
During the implementation of conditional autocomplete (#42), we found that the inline edit form has several challenges:
- Select2 dropdowns require special handling for z-index (dropdownParent option)
- Dynamically initializing autocomplete on existing values requires complex timing logic
- The inline edit form is generated dynamically, making it difficult to reliably initialize form enhancements
The autocomplete feature was scoped to the Add form only (PR #194), with a plan to revisit the edit experience via a dedicated page.
Proposed Solution
Create a new admin page at Tools > Ad Code Manager > Edit Ad Code (or similar URL structure) that:
- Loads when clicking "Edit" on an existing ad code
- Displays a full-page form similar to the Add form
- Pre-populates all fields with the existing ad code data
- Includes autocomplete for conditional arguments
- Redirects back to the main Ad Code Manager page after save
Implementation Notes
- Could reuse much of the Add form template
- Would need a new route/page registration
- The inline edit could be deprecated or removed once the dedicated page is implemented
- Consider whether to keep inline edit as a quick edit option for simple changes
Related
- Feature: Autocomplete/dropdown or any other assisted input with generic conditionals #42 - Autocomplete for conditional arguments
- feat: add autocomplete for conditional arguments #194 - Autocomplete implementation (Add form only)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels