Files
yidaima/RuoYi-Vue/docs/superpowers/plans/2026-07-10-carousel-page-block-plugin.md

2.0 KiB

Carousel PageBlock Feature Plugin Plan

Goal: Migrate the existing Carousel BusinessBlock into the first trusted, versioned page-block Feature Plugin without changing generated source output.

Task 1: PageBlock SPI

  • Add a specialized PageBlockFeaturePlugin contract on top of FeaturePlugin.
  • Add structured validation and deterministic generation contribution contexts.
  • Add a plugin type to the common manifest contract.
  • Publish page-block.carousel@1.0.0 as a trusted built-in Spring plugin.
  • Declare Adapter/schema compatibility, page-block capability, DSL extension, validator, definition, and seven existing templates.
  • Transfer ownership of the existing Carousel block.json definition to the plugin while retaining the resource file.

Task 3: Validation And Generation

  • Invoke the Carousel plugin validator from BusinessBlockRegistryService.
  • Reject Carousel instance configuration keys outside the published definition.
  • Move Carousel primary-key and optional-field Velocity variables out of the shared generation service and into the plugin contribution.
  • Preserve all existing generated paths and template output.

Task 4: ProjectSpec And Resolution

  • Detect Carousel blocks in page and embedded layouts during legacy ProjectSpec projection.
  • Add exact page-block.carousel@1.0.0 selection to projected ProjectSpec documents.
  • Reject manually supplied ProjectSpecs that use Carousel without selecting its plugin release.
  • Include the release in the existing resolved execution plan, fingerprint, and Generation Run snapshot.

Task 5: Verification

  • Add manifest, validator, generation contribution, registry ownership, projection, and resolver tests.
  • Run BusinessBlock/ProjectSpec compatibility tests, full Generator baseline, Admin tests, formatting checks, and frontend health check.
  • Document database publication prerequisites and remaining legacy BusinessBlocks.