[2.0.0-alpha2] Feedbacks about Views module

Created on 3 May 2024, about 2 months ago
Updated 10 June 2024, 19 days ago

Bugs

Tested with and without πŸ› [2.0.0-alpha2] Prevent unexpect ajax trigger on Compoennt Form Fixed patch.

When adding a source in a slot:

TypeError: Drupal\Core\Theme\ComponentPluginManager::find(): Argument #1 ($component_id) must be of type string, null given, called in src/Element/ComponentElementBuilder.php

View style

  • Component & variant selectors works well
  • Issues with props:
    • View title: i get the component name instead of the view titile
  • Issues with slots:
    • View title: also InvalidComponentDataException but that's normal because it is not a source for slots.
    • View rows: empty renderable even when results
    • Wysiwyg: InvalidComponentDataException: Unable to render component "ui_suite_bootstrap:alert". A render array or a scalar is expected for the slot "message" when using the render element with the "#slots" property (when used with plani text format ?) but maybe it is not related to Views module but to the source plugin itself

View row

When selecting the Component view row:

The specified #ajax callback is empty or not callable in Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse()

The view fields are not available as sources for slots.

Architecture

There is logic about sources in https://git.drupalcode.org/project/ui_patterns/-/blob/2.0.x/modules/ui_p... . Example:

    switch ($source_id) {
      case 'view_rows':
        $output = $group['#rows'] ?? '';
        break;

      case 'view_group_title':
        $output = $group['#title'] ?? '';
        break;

      case 'view_title':
        $output = $this->view->getTitle();
        break;
    }

That's not a good place for this logic. That may explain why some source plugins are empty:

What is it https://git.drupalcode.org/project/ui_patterns/-/blob/2.0.x/modules/ui_p... ? A plugin manager ? It is confusing.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

UI Patterns Views

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
  • πŸ‡«πŸ‡·France Musa.thomas France πŸ‡«πŸ‡·

    Musa.thomas β†’ made their first commit to this issue’s fork.

  • πŸ‡«πŸ‡·France Musa.thomas France πŸ‡«πŸ‡·
    1. For this error :
      TypeError: Drupal\Core\Theme\ComponentPluginManager::find(): Argument #1 ($component_id) must be of type string, null given, called in src/Element/ComponentElementBuilder.php
      

      , should appear only when you choose ui patterns views plugins inside views (the first time when choose on the radios button "Component (UI patterns)", this error seems to be related to views, for example with better exposed filter I'v got the same issue (enable BEF, expose pager, select the BEF plugin, the select of pager ajax not working at the first popup ) I try to debug but it's very complicated, I think I will try to resolve this at the end of develop. I also started an issue on Core https://www.drupal.org/project/drupal/issues/3447838 πŸ› Ajax callback inside views plugin doesn't work. Active Status : wip

    2. Issues with props:
      View title: i get the component name instead of the view titile : Status : didn't reproduce
    3. View title: also InvalidComponentDataException but that's normal because it is not a source for slots. : Status fix (I don't understand why title is not source of slots?)
    4. View rows: empty renderable even when results Status : fix
    5. Wysiwyg: InvalidComponentDataException[...] Status : didn't reproduce (where do you choose the plain text format ?)
    6. The view fields are not available as sources for slots. Status : fix
    7. Architecture Status : fix BUT, we add lot of (big) object inside the configuration mapping, hope will not causing any performance issue but should not be. Also now when something is empty et should not be render it return something empty, before it was unset of mapping=> maybe in this case some extra empty tag should not be render
  • πŸ‡«πŸ‡·France pdureau Paris
  • Assigned to pdureau
  • Status changed to Needs review about 1 month ago
  • πŸ‡«πŸ‡·France pdureau Paris

    View style

    View title: i get the component name instead of the view titile : Status : didn't reproduce

    Fixed βœ…

    View title: also InvalidComponentDataException but that's normal because it is not a source for slots. : Status fix (I don't understand why title is not source of slots?)

    Fixed βœ…

    Title is not a source of slot because it is a string scalar. However, it will be possible to inject it to slots thanks to πŸ“Œ [2.0.0-alpha3] Implement PropTypeInterface::convertFrom() Needs review

    If we add manually slot here, we will need to add it to all sources for string props

    View rows: empty renderable even when results Status : fix

    ❌ I still see the issue:

    1. I create a view of articles. I have at least one published article in my site.
    2. I chose "Component (UI Patterns)" as view style & "content: teaser" as view rows
    3. I chose Bootstrap 5's Alert components and I put "View rows" source in the message slot
    4. I save the view
    5. FAIL: I don't see the rows in front

    But, if I add another source in the same slot of an other slot, it appears ! So it may be a cache issue.

    Let's talk about that in Alpha3.

    Wysiwyg: InvalidComponentDataException[...] Status : didn't reproduce (where do you choose the plain text format ?)

    Fixed βœ…

    TypeError: Drupal\Core\Theme\ComponentPluginManager::find(): error should appear only when you choose ui patterns views plugins inside views (the first time when choose on the radios button "Component (UI patterns)", this error seems to be related to views, for example with better exposed filter I'v got the same issue (enable BEF, expose pager, select the BEF plugin, the select of pager ajax not working at the first popup ) I try to debug but it's very complicated, I think I will try to resolve this at the end of develop. I also started an issue on Core https://www.drupal.org/project/drupal/issues/3447838 πŸ› Ajax callback inside views plugin doesn't work. Active

    Let's follow this in alpha3.

    View row

    The view fields are not available as sources for slots. Status : fix

    ❌ I have this issue:

    Call to undefined method Drupal\ui_patterns_views\Plugin\UiPatterns\Source\ViewFieldSource::getSettings() in Drupal\ui_patterns_views\Plugin\UiPatterns\Source\ViewFieldSource

    Architecture

    Architecture Status : fix BUT, we add lot of (big) object inside the configuration mapping, hope will not causing any performance issue but should not be. Also now when something is empty et should not be render it return something empty, before it was unset of mapping=> maybe in this case some extra empty tag should not be render

    Let's talk about that in Alpha3.

  • πŸ‡«πŸ‡·France pdureau Paris

    Remaining subjects moved to πŸ› [2.0.0-alpha3] Feedbacks about Views module Active

    Lets merge once the MR is created (I do the merge, because i have a few commits to add)

  • Merge request !103Issue #3445079: Feedbacks about Views module β†’ (Merged) created by pdureau
  • Issue was unassigned.
  • Status changed to Fixed about 1 month ago
  • πŸ‡«πŸ‡·France pdureau Paris
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024