Closed (fixed)
Project:
UI Patterns (SDC in Drupal UI)
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2024 at 16:13 UTC
Updated:
2 Sep 2025 at 17:07 UTC
Jump to comment: Most recent
Comments
Comment #3
christian.wiedemann commentedI did this alread in https://www.drupal.org/project/ui_patterns/issues/3461274
Comment #4
christian.wiedemann commentedSorry did not read the other issue first. Fine you can merge.
Comment #5
just_like_good_vibesI will make a little round of UI tests with token in different contexts and plugins, and then merge :)
i don't know well this plugin.. good occasion
Comment #6
just_like_good_vibeshello,
for me the code for token is probably not totally ok.
For example it may not handle properly EntityTypeMappings (where for example a
taxonomy_termis usually refered asterm). this is not the case in our code.We may have add code compatible with token module only when enabled thanks to module handler service.
in that particular case, we could optionally call the usual token validation function and add the dependency to token module in the source calculateDependencies
Comment #7
just_like_good_vibesComment #8
just_like_good_vibesHello,
this is what i found :
some tokens may return complex markup (being actually result of a render arrays... ) like entity fields for exemple.
to support those token values, we cannot really declare them in a source with prop_type "string".
Tokensource is like that ...Therefore, i have introduced a new source
token_plainwhich really render plain text from a token (tagged with prop_typestringand still convertible to aslot, but it is a plain text value).The existing Token source is now tagged compatible with a slot, and it can return markup :)
I find this is a real improvement from the previous situation.
Also, as mentioned in a previous comment, i added some tests about the presence of token module.
when available, it is used. when unavailable, no problem and token type keys are the same, especially for specific cases like taxonomy vocabulary and terms.
Please review.
Comment #9
pdureau commentedComment #11
just_like_good_vibesComment #12
pdureau commentedComment #13
christian.wiedemann commented