Problem/Motivation

TBD

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

christian.wiedemann created an issue. See original summary.

christian.wiedemann’s picture

Category: Bug report » Feature request

christian.wiedemann’s picture

Assigned: Unassigned » christian.wiedemann
pdureau’s picture

Title: Draft for UI Patterns UI » [2.1.x] Draft for UI Patterns UI
goz’s picture

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'
christian.wiedemann’s picture

Title: [2.1.x] Draft for UI Patterns UI » [2.1.x] UI Patterns UI
Assigned: christian.wiedemann » just_like_good_vibes
Status: Active » Needs review
goz’s picture

@Christian, i think you miss my comment #6

christian.wiedemann’s picture

@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).

goz’s picture

Status: Needs review » Needs work

Thanks @Christian, i miss that.

MR has to be rebased

goz’s picture

Issue summary: View changes
StatusFileSize
new103.73 KB
new34.29 KB

Weight of fields is different between configuration and display.

In configuration :

In display :

christian.wiedemann’s picture

Status: Needs work » Needs review

@goz: Thanks! I fixed the issues.

just_like_good_vibes made their first commit to this issue’s fork.

christian.wiedemann’s picture

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

just_like_good_vibes’s picture

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

christian.wiedemann’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

christian.wiedemann’s picture