Skip to content

feat: Add activation block converter (core blocks β†’ DesignSetGo)Β #263

@jnealey88

Description

@jnealey88

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_Migrator architecture (AJAX scan β†’ modal β†’ batched conversion)
  • Show activation modal on plugins.php after plugin activation (use activated_plugin hook 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

πŸ€– Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions