Account created on 13 January 2008, over 17 years ago
#

Merge Requests

More

Recent comments

🇫🇷France goz

By default, we have only one story by component, and display variants.

Can we define variants and props on which to loop to define stories ?

🇫🇷France goz

Sorry for the false positive, i forgot to remove some tests in core which make my instance not relevant.
I spend a big part of my weekend on it... and burn too much neurons.

Finally, took less time this afternoon to fix it once i reproduce again.

🇫🇷France goz

I have no warnings :/

Can you give me more informations to reproduce ?

Which theme do you use, do you start from a fixture, on which component ?
May be a screencast will help

Thanks

🇫🇷France goz

I rebased my branch to not get other commits.

This issue was very hard, hope there will be no more errors.
Fingers crossed.

🇫🇷France goz

Difference between 2 versions :

In 1.0.x, UiStylesPanel build form is called only when island is panel island is displayed when clicking on the icon.
In MR, UiStylesPanel build form is called when page is loaded

So MR change more things that expected

🇫🇷France goz

My bad, digging for the error, it seems i previously met this, but certainly fix it in ui_patterns or elsewhere which is not in display_buider... and forgot about it.

The following error

     Warning: Uninitialized string offset 0 in Drupal\Core\Render\Element::property() (line 29 of /var/www/html/web/core/lib/Drupal/Core/Render/Element.php)

comes from a radio element with an option with empty key :

{
  "#type": "radios",
  "#title": "Typography",
  "#options": {
    "": "- None -",
    "h1": "<span class=\"ui-styles-source-select-plugin-option h1\">\u0391\u03b1<\/span>Heading 1",
(...)
  },
  (...)
  "#id": "edit-styles-wrapper-text-ui-styles-typography",
  "#name": "styles[wrapper][text][ui_styles_typography]",
  "#value": "",
  "": {
    "#type": "radio",
    "#title": "- None -",
    "#return_value": "",
    "#default_value": "",
    (...)
    "#name": "styles[wrapper][text][ui_styles_typography]",
    "#value": "",
    "#ajax_processed": false,
    "#sorted": true,
    "#isDisplayBuilder": true
  },
  (...)
  "#isDisplayBuilder": true
}

Strangely, i have this issue only for this MR, not from 1.0.x and in 1.0.x, this radios element is not loaded (so no error). BUT the radios element is not displayed, so i guess the MR process something which should not

🇫🇷France goz

PHPStan fails on code which is not part of this MR.

🇫🇷France goz

It would be nice to have @instance has been updated: @diff

Is way more complicated, may be we could move it in another issue like discussed during meeting ?

🇫🇷France goz

I can't figure out what i can load from instance id.
Btw, i think it should be more accurate to not display label instance, but path change from to (with labels).

Not : Globe icon has been attached to horizontal card's prefix
But :

  • Globe icon has been attached to Grid Row 1 col (Bootstrap) > horizontal card's prefix
  • Grid Row 1 col (Bootstrap) > Globe icon has been attached to Grid Row 1 col (Bootstrap) > Grid Row col (Bootstrap) > horizontal card's prefix

Anyway, i still missing how to get label from ids or path

🇫🇷France goz

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

🇫🇷France goz

If merged, it should be done in new major release since it make breaking changes.

🇫🇷France goz

Here are screenshots applying those modifications

🇫🇷France goz

goz created an issue.

🇫🇷France goz

This should be done in major release since it provide breaking changes

🇫🇷France goz

I like the idea to make this available for others entities. It's really an UX improvement !

I'd like to see this for media entities.

🇫🇷France goz

Drupal core now provides an Icon API. I guess it can be used (for the display), and ui_icons for the widget.

🇫🇷France goz

Digging, here is what i find :

  1. user 1 is first created with placeholder for username, email, password
  2. than config is updated, so User entity has now new fields definitions.
  3. When user is updated to add configured username, email and password, it's loaded from cache, which was generated before we update the field definition.

So i suggest to reset cache for the user before loading it to update datas.

🇫🇷France goz

I have the same issue.
I use drush site:install minimal --existing-config

In my config, i define field for user entity. Example: field.storage.user.field_firstname.yml
This fields was created first with the ui and configured with views_display, form_display etc.

If i want to reinstall site based on existing configuration, i have the issue :

 [notice] Performed install task: install_import_translations

In SqlContentEntityStorage.php line 815:
                                    
  Field field_firstname is unknown.  
                                    

In ContentEntityBase.php line 617:
                                    
  Field field_firstname is unknown.  

Here is the backtrace :

SqlContentEntityStorage.php:815, Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
EntityBase.php:370, Drupal\Core\Entity\EntityBase->save()
SiteConfigureForm.php:305, Drupal\Core\Installer\Form\SiteConfigureForm->submitForm()
FormSubmitter.php:105, call_user_func_array:{/var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php:105}()
FormSubmitter.php:105, Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
FormSubmitter.php:43, Drupal\Core\Form\FormSubmitter->doSubmitForm()
FormBuilder.php:589, Drupal\Core\Form\FormBuilder->processForm()
AutosaveFormBuilder.php:144, Drupal\autosave_form\Form\AutosaveFormBuilder->processForm()
FormBuilder.php:495, Drupal\Core\Form\FormBuilder->submitForm()
install.core.inc:977, install_get_form()
install.core.inc:611, install_run_task()
install.core.inc:564, install_run_tasks()
install.core.inc:122, install_drupal()
(...)

I doesn't seem to have the issue using UI installation.

🇫🇷France goz

I don't reproduce, in an instance without this MR, nor in instance with this MR.
I hadn't loading fixtures before, may be you were on an existed fixture ?

🇫🇷France goz

Testing again, icon is missing with

  • Drupal 11.2.2
  • Dashboard 2.0.0
  • Gin 4.0.6
  • No Gin toolbar
  • No toolbar

BUT navigation is now using icon API to display icons, so i suggest to do the same.

🇫🇷France goz

I was reproducing #13, i don't reproduce it anymore.
Are you sure you are up to date with the MR ?
Or may be you make another test than #13 which fails ?

🇫🇷France goz

It's strange, in the last commit, i take care of taking value from _third_party_settings.

In IslandPluginBase::build() :

    // First, get specific data for the plugin.
    if (isset($data['_third_party_settings'][$this->getPluginId()])) {
      $this->data = $data['_third_party_settings'][$this->getPluginId()];
    }
🇫🇷France goz

I see two ways to deal with that.

  1. Add a left margin with same size of the navigation collapsed or expanded but not for sub-level
  2. Drawer can be closed, so we can choose to open it in front of navigation (or everything else), so we can use all width of the screen

What do you think about this ?

🇫🇷France goz

There is no xhr call when click does not work.

Screenshot of console :

Video attached.
Click works when previously clicked on token, even closing drawer.
Doesn't work when clicked on alert component then close drawer and click again on alert component (not token)

🇫🇷France goz

modules/display_builder_entity_view/fixtures/default_entity_view.yml is empty.
Should be removed ?

🇫🇷France goz

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

🇫🇷France goz

It's not so easy.

The twig is called when the display builder is loaded. Contextual islands are not loaded yet,and no contextual island plugin is loaded.
Islands Plugins are loaded once an instance is triggered, but only plugins are updated, not the contextual area.

Events seem to be triggered on islands plugins, not on the contextual area.

I look forward, but may be someone with more knowledge about how display_builder works has an idea ?

🇫🇷France goz

Everything is green except css lint. Yipee !

I take a look on ResetButton and we are good

🇫🇷France goz

Why did you add IslandPluginFormTrait to ResetButton?

You are right, i miss this one.
It's a plugin, i should add plugin form logic here to.

Instead of adding $current_island_id on onUpdate() method, is there an other way of passing the data? Ideally, this MR will only alter the 4 island plugins with forms.

Unfortunatelly not, or may be using another static service...

🇫🇷France goz

@nod_ can you be more specific when you talk about "unusual things" so we can fix it ?

🇫🇷France goz

After MR, active link in gin toolbar :

And not active :

And finally default toolbar :

🇫🇷France goz

In the MR, i remove dashboard-active.svg part since mask automatically change color on active links.

🇫🇷France goz

Yes you are right.
As you can see, i want to have a configurable field group form with an icon.
Icon widget output is complex data which needs to be manipulated to be stored.

🇫🇷France goz

It's a performance solution, but, in my opinion, a bad thing for UX.
The idea is still great, may be we can find something to solve UX.

UX issue:
It's a button, we are not used to have a button in a form to display a select list / other options to configure switch a field. If i saw this button, i will don't know why it's here and what is its purpose. It's not intuitive.

Proposal:
1/ May be we could add some things with this button so we understand it's a default source and we can change it. May be adding an arrow inside the button, at right like a select list does ?
2/ Be more verbose, with text AND a button : <span>Current source : URL</span><button>Change source</button>

🇫🇷France goz

Sorry, i have a lot to do those days.

I'll take a loot at your proposal (and will take time to review the 3.x compatibility)

🇫🇷France goz

Nice, it works !

Agreed to rename token source, but replacing Token by String, we are missing the "token" feature.
May be something with both ?
"String and token" ?

🇫🇷France goz

My bad, you are right, adjustments are cleared and recalculated. I forgot that. Checked again and everything is fine

🇫🇷France goz

With last patch, no error is thrown, i can list adjustments for orders and order items, but i cannot create them.

GET /jsonapi/commerce_order/default?filter[drupal_internal__order_id]=3807'

{
    "jsonapi": {
        "version": "1.0",
        "meta": {
            "links": {
                "self": {
                    "href": "http://jsonapi.org/format/1.0/"
                }
            }
        }
    },
    "data": [
        {
            "type": "commerce_order--default",
            "id": "ad15f584-05f7-43a8-bd55-ab18a4eaba2c",
            "links": {
...
            },
            "attributes": {
                "drupal_internal__order_id": 3807,
                "order_number": "3807",
...
                "adjustments": [
                    {
                        "type": "shipping",
                        "label": "Expédition",
                        "amount": {
                            "number": "4.95",
                            "currency_code": "EUR",
                            "formatted": "4,95 €"
                        },
                        "percentage": null,
                        "source_id": "1058",
                        "included": false,
                        "locked": false
                    }
                ],
                "total_price": {
                    "number": "28.950000",
                    "currency_code": "EUR",
                    "formatted": "28,95 €"
                },
                "total_paid": null,
                "balance": {
                    "number": "28.950000",
                    "currency_code": "EUR",
                    "formatted": "28,95 €"
                },
                "state": "completed",
                "locked": false,
                "created": "2025-03-14T08:13:38+00:00",
                "changed": "2025-03-14T13:53:41+00:00",
                "placed": "2025-03-14T13:53:41+00:00",
                "completed": "2025-03-14T13:53:41+00:00",
                "customer_comments": null,
                "cart": false,
                "checkout_step": "complete",
...
            },
            "relationships": {
...
            }
        }
    ],
...
}

But creating new order doesn't :

{
    "data": {
        "type": "commerce_order_item--abonnement_single",
        "attributes": {
                            "title": "Abonnement individuel - 1 an",
                            "quantity": "1.00",
                            "unit_price": {
                                "number": "15.000000",
                                "currency_code": "EUR",
                                "formatted": "15,00 €"
                            },
                            "total_price": {
                                "number": "15.000000",
                                "currency_code": "EUR",
                                "formatted": "15,00 €"
                            },
                            "adjustments": [
                                {
                                    "type": "tax",
                                    "label": "TVA",
                                    "amount": {
                                        "number": "0.31",
                                        "currency_code": "EUR"
                                    },
                                    "percentage": "0.021",
                                    "source_id": "france|0|0",
                                    "included": true
                                }
                            ]
        },
        "relationships": {
            "uid": {
                "data": {
                    "type": "user--user",
                    "id": "565a095e-d398-4ebb-9030-f877d9301601"
                }
            },
            "order_id": {
                "data": {
                    "type": "commerce_order--default",
                    "id": "f1fe4660-dba4-4c90-8c0e-4090310a1e78"
                }
            },
            "store_id": {
                "data": {
                    "type": "commerce_store--online",
                    "id": "1adc9d7c-c976-4951-9cd4-38413b150a51"
                }
            },
            "purchased_entity": {
                "data": {
                    "type": "commerce_product_variation--abonnement_single",
                    "id": "e12569c7-24a4-4a5c-844f-d67ea1e01a21"
                }
            }

        }
    }
}

Result :

{
    "jsonapi": {
        "version": "1.0",
        "meta": {
            "links": {
                "self": {
                    "href": "http://jsonapi.org/format/1.0/"
                }
            }
        }
    },
    "data": {
        "type": "commerce_order_item--abonnement_single",
        "id": "cea7ce7c-84c2-4154-85b6-e65c87bf233c",
        "links": {
...
        },
        "attributes": {
            "drupal_internal__order_item_id": 5932,
            "title": "Abonnement individuel - 1 an",
            "overridden_title": false,
            "quantity": "1",
            "unit_price": {
                "number": "15.000000",
                "currency_code": "EUR",
                "formatted": "15,00 €"
            },
            "overridden_unit_price": false,
            "total_price": {
                "number": "15.00",
                "currency_code": "EUR",
                "formatted": "15,00 €"
            },
            "adjustments": [],
            "uses_legacy_adjustments": false,
            "data": null,
            "locked": false,
            "created": "2025-05-16T10:34:03+00:00",
            "changed": "2025-05-16T10:34:03+00:00"
        },
..
}

Same thing creating order_item.

Production build 0.71.5 2024