Draft for UI Patterns UI

Created on 29 September 2024, 6 months ago

Problem/Motivation

TBD

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany Christian.wiedemann

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

Merge Requests

Comments & Activities

  • Issue created by @Christian.wiedemann
  • Merge request !230Resolve #3477625 "Draft for ui" → (Open) created by Christian.wiedemann
  • Assigned to Christian.wiedemann
  • 🇫🇷France goz

    Hi Christian. Good work on this !
    I have an issue installing this module.
    Looks like something is missing in entity type configuration, which do config_translation module complain.

    [10-Mar-2025 09:14:07 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getPath() on null in /var/www/html/web/core/modules/config_translation/src/ConfigNamesMapper.php:247
    Stack trace:
    #0 /var/www/html/web/core/modules/config_translation/src/Routing/RouteSubscriber.php(39): Drupal\config_translation\ConfigNamesMapper->getOverviewRoute()
    #1 /var/www/html/web/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php(37): Drupal\config_translation\Routing\RouteSubscriber->alterRoutes(Object(Symfony\Component\Routing\RouteCollection))
    #2 [internal function]: Drupal\Core\Routing\RouteSubscriberBase->onAlterRoutes(Object(Drupal\Core\Routing\RouteBuildEvent), 'routing.route_a...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
    

    Adding definition of edit_form in routing file fixes it

    
    entity.sdc_component_form_display.edit_form:
      path: '/admin/structure/component/{sdc_component_id}/form-display/{form_mode_name}/edit'
      defaults:
        _entity_form: 'sdc_component_form_display.edit'
        _title: 'Edit a component display'
      requirements:
        _permission: 'administer sdc_component_form_display'
  • 🇫🇷France goz

    @Christian, i think you miss my comment #6

  • 🇩🇪Germany Christian.wiedemann

    @goz no that is fixed. I removed the URL from the entity. The routes are added dynamicly so the route in the yml is wrong. (Core is doing the same in field_ui).

  • 🇫🇷France goz

    Thanks @Christian, i miss that.

    MR has to be rebased

  • 🇫🇷France goz

    Weight of fields is different between configuration and display.

    In configuration :

    In display :

  • 🇩🇪Germany Christian.wiedemann

    @goz: Thanks! I fixed the issues.

  • First commit to issue fork.
  • 🇩🇪Germany Christian.wiedemann

    I fixed the component_id logic and it works now everywhere. I tested Layout Field formatter and views. I also removed the base class. So I am fine now

  • 🇫🇷France just_like_good_vibes PARIS

    in addition to the work done today, i did the following changes :

     -  getSdcComponentId => getComponentId 
     - ComponentController::load => components are now sorted by provider and label 
    
     - BUGFIX in ComponentController,
        -  'component_form_display.' . $component->getPluginId() . '.add_form'; => 'entity.component_form_display.' . $component->getPluginId() . '.add_form';
     - Improve UiPComponentFormDisplayForm::buildForm
        - any source settings form not deriving from SourcePluginPropValue, was proposing widgets without titles.. i implemented a method to properly set a title in the other cases.
     - in ComponentFormDisplay, removed two functions not part of the interface and unused 
        - removed : public function getSdcComponentId():string {
        - removed : public function getSdcComponentDefinition():array {
     - renamed the hook "ui_patterns_component_prepare_view" to an alter hook "ui_patterns_component_pre_build" =>  hook_ui_patterns_component_pre_build_alter
     - add cache management to ui_patterns_ui_ui_patterns_component_pre_build_alter
    
    
  • Pipeline finished with Failed
    11 days ago
    Total: 894s
    #457559
  • Pipeline finished with Success
    11 days ago
    Total: 824s
    #457566
  • Pipeline finished with Success
    10 days ago
    Total: 640s
    #457958
  • Pipeline finished with Success
    10 days ago
    Total: 755s
    #458083
  • Pipeline finished with Failed
    9 days ago
    Total: 313s
    #458747
  • Pipeline finished with Canceled
    9 days ago
    Total: 126s
    #458753
  • Pipeline finished with Failed
    9 days ago
    Total: 1079s
    #458758
  • Pipeline finished with Success
    9 days ago
    Total: 645s
    #458963
  • Pipeline finished with Failed
    8 days ago
    Total: 627s
    #459752
  • Pipeline finished with Success
    8 days ago
    Total: 1107s
    #459804
Production build 0.71.5 2024