[2.0.0-alpha1] Following Form Builder refactor: clean-up, tests & fixes

Created on 9 February 2024, 6 months ago
Updated 27 February 2024, 5 months ago

Problem/Motivation

After πŸ“Œ [2.0.0-alpha1] Add new Form Builder Needs work and before πŸ“Œ [2.0.0-alpha1] Form builder: Simpler sources selector Active , let's clean, tests & fixes.

User interface changes

No, we keep UI changes for the next ticket: πŸ“Œ [2.0.0-alpha1] Form builder: Simpler sources selector Active

API changes

API structure was defined in πŸ“Œ [2.0.0-alpha1] Add new Form Builder Needs work . But we may rename methods and plugins ID.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @pdureau
  • πŸ‡«πŸ‡·France pdureau Paris

    DONE:

    • Code sniffer
    • Restore buildComponentData and rename it buildComponentRenderable
    • Slots before props in form builder
    • Restore source_id in ComponentFormPropsBuilder

    TODO ComponentFormPropsBuilder:

    • Extract protected static function buildPropForm(FormStateInterface $form_state, string $prop_id, array $definition, array $configuration, array $contexts): arraycalled from $element[$prop_id] = self::buildPropForm($form_state, $prop_id, $prop, $configuration[$prop_id] ?? [], $contexts);
    • Extract protected static function buildSourceSelector(FormStateInterface $form_state, string $prop_id, string $wrapper_id, array $sources, SourceInterface $selected_source): array called from $element['dropdown_actions'] = self::buildSourceSelector($form_state, $prop_id, $wrapper_id, $sources, $selected_source);

    TODO ComponentFormPropsBuilder:

    • Extract protected static function buildSlotForm(FormStateInterface $form_state, string $slot_id, array $definition, array $configuration, array $options): array called from $element[$slot_id] = self::buildSlotForm($form_state, $slot_id, $slot, $configuration[$slot_id] ?? [], $options);
    • Extract protected static function buildSourceForm(FormStateInterface $form_state, string $slot_id, array $definition, array $configuration, int $delta, string $wrapper_id): array called from $element['sources'][$delta] = self::buildSourceForm($form_state, $slot_id, $definition, $source_configuration, $delta, $wrapper_id);

    TODO other:

    • Rename form elements?
    • Remove SourcePluginManager::buildPluginConfiguration()
  • πŸ‡«πŸ‡·France pdureau Paris
  • Assigned to Christian.wiedemann
  • Status changed to Needs review 6 months ago
  • πŸ‡«πŸ‡·France pdureau Paris

    I didn't have the time to do everything i wanted, but that's enough for this issue which is becoming big.

    Merge request is ready.

  • Issue was unassigned.
  • Status changed to Fixed 6 months ago
  • πŸ‡«πŸ‡·France pdureau Paris
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024