- Issue created by @ultimike
- π©πͺGermany jurgenhaas Gottmadingen
These are all valid points, thanks for discussing this. Unfortunately, most of it is difficult to provide due to missing context information during modelling.
For example, in the "Set field value" action, the 2 fields "Entity" and "Field name" are related, as the field name needs to be one, that's available for the entity this action operates upon. However, while building the model, it is not always known what entities are available at the time of execution of that action. E.g. if working with an event "Insert content entity", there can be any entity type available to the action. And while the content type is unknown, the property panel cannot provide a drop-down list of available field names.
So, for now, we only seem to be able to provide better field descriptions on how to find more information what to put into these configuration fields. However, there are plenty of issues in the issue queue for the roadmap to ECA 2.0, where we want to better support these settings forms with Drupal form API features like auto-complete. Once that's available, we may then be able to provide some more context-sensitive helpers to better support site builders to know what to fill in for these fields. However, there will always be limits, as ECA models can be so generic, that not enough context can be known while building them.
When it comes to field values, it's mostly text (strings) that will be used there. And as part of such strings, tokens play a major role. There are read-only tokens provided by modules, all those can be found in the token browser. In addition to that, ECA models can create new tokens on the fly, they are only always available within the process where they get created. When creating such tokens in ECA, a name needs to be provided, and that's really "just a name", i.e. no brackets or other special syntax. Only when tokens are used as placeholders, i.e. when we expect the token to be replaced by its real value, it's where that
[token-name]
syntax comes in.The whole concept of tokens needs a comprehensive chapter in the ECA Guide and there is an issue just for that: https://gitlab.lakedrops.com/drupal/documentation/eca/-/issues/41
There's also an issue to validating the input of the configuration forms to verify the token syntax where possible and provide feedback to the user when it's not as expected. For details, see β¨ Add token syntax validation where possible Fixed
Having said all that, I don't want to turn down the idea of UX improvements. Just the contrary is the case, we really want to do what's possible, to make ECA easier for new users.
- πΊπΈUnited States ultimike Florida, USA
Thanks for the explanations - none of it is very surprising, I clearly understand the challenges in what I was asking about.
I figure that others will have the same questions/challenges that I do/did, so I wanted to get it documented in here so that others looking for answers can at least get some context.
-mike