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

Created on 9 February 2024, 10 months ago
Updated 27 February 2024, 10 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
  • Merge request !62Resolve #3420517 "2.0.0 alpha1 follwoing form" → (Merged) 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()
  • Assigned to Christian.wiedemann
  • Status changed to Needs review 10 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 10 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024