-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
Add the inverse of the deactivation block migrator: when activating DesignSetGo, offer to convert existing core blocks to their DesignSetGo equivalents.
Motivation
Users who install DesignSetGo on an existing site already have content using core blocks (Group, Row, Buttons). Converting these to DesignSetGo equivalents would let them immediately take advantage of DesignSetGo features (animations, shape dividers, icons, etc.) without manually replacing blocks.
Proposed Conversions
| Core Block | DesignSetGo Block | Notes |
|---|---|---|
core/group (constrained layout) |
designsetgo/section |
Map contentSize β contentWidth |
core/group (flex layout) |
designsetgo/row |
Map flexWrap, justifyContent, verticalAlignment |
core/group (grid layout) |
designsetgo/grid |
Map columnCount β desktopColumns |
core/buttons > core/button |
designsetgo/icon-button |
Map text, url, colors, styles |
Implementation Notes
- Mirror the existing
Block_Migratorarchitecture (AJAX scan β modal β batched conversion) - Show activation modal on
plugins.phpafter plugin activation (useactivated_pluginhook or transient flag) - Reuse batch processing pattern (50 posts per batch, client-driven via offset)
- Reuse focus trap and modal a11y patterns from deactivation modal
- WordPress auto-creates revisions for rollback
- Should be opt-in β user must explicitly choose to convert; default is to skip
Acceptance Criteria
- Activation modal appears after activating DesignSetGo (only if core blocks are detected)
- Scan shows count of convertible core blocks across all post types
- Conversion runs in batches with progress indicator
- All supported attributes/styles are preserved during conversion
- Post revisions are created for rollback
- Modal has proper a11y (focus trap, Escape to close, aria attributes)
- "Skip" option allows activation without conversion
References
- Deactivation migrator:
includes/admin/class-block-migrator.php - PR: Fix regex pattern in content generation testΒ #261 (deprecation transforms + deactivation migrator)
π€ Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels