Issue Task Closed

#108936LocalizationWizard Refactoring

Tobias Wojtylak 02/11/26, 07:56 updated 03/31/26, 08:10

Description

Initial Situation

The current LocalizationWizard contains not only business-specific logic but also generic functionality for controlling the wizard workflow. This implementation is tightly coupled to the concrete use case and cannot be reused by other wizards.

Objective

The goal of the refactoring is to create a reusable base implementation for wizards. A generic abstract base class should be extracted from the existing LocalizationWizard, providing common functionality that can be reused by other wizard implementations.

Proposed Solution

As part of the refactoring, a new generic component will be introduced. This component will be responsible for:

  • General logic for handling wizard configuration/steps
  • Management and control of individual wizard steps
  • Unified display and update of progress information
  • Provision of generic methods for navigation and status management
  • This base class will serve as a common technical foundation for future wizards.

Configuration-from-Outside via Wrapper

const steps = [new ModeStep(context), new NameStep(context)]
    return `html
        <typo3-backend-wizard .steps=${steps}></typo3-backend-wizard>
    `;

✅ Pros

  1. Any component using a wizard can provide different steps without creating a new subclass.
  2. Easier to maintain/more robust as there are no child classes which might break on changes

❌ Cons

  1. May appear more complex due to the nesting of components.
  2. API more complex: Devs must understand the steps configuration

=> better maintainability

Next Steps

In a subsequent step, the new generic wizard implementation should replace the existing wizard used in the form extension.
Currently, this implementation still relies on the Bootstrap Carousel component for step navigation.
As part of the migration to the new base implementation, the Bootstrap Carousel will be removed entirely and replaced by the unified wizard logic.

In order for this to work with the FormWizard, reactive behavior must also be added for the Next button. Currently, the evaluation of whether a step is valid
only takes place during the initial rendering.

This will ensure a consistent technical foundation for all wizards and eliminate the dependency on outdated UI components.

Expected Benefits

  • Increased code reusability
  • Consistent architecture for all wizards
  • Reduction of code duplication
  • Improved maintainability and extensibility
  • Clear separation between generic and domain-specific logic

Result

After completion of the refactoring, a robust and generic wizard base implementation will be available, which can be used by any other wizards. The LocalizationWizard will be simplified and reduced to its specific functionality, resulting in a cleaner and more maintainable structure.

Reviews 1

Subtasks 1