- Issue created by @just_like_good_vibes
- Merge request !171Improved Token source(s) + reported changes initially from issue 3461274 → (Merged) created by just_like_good_vibes
- 🇩🇪Germany Christian.wiedemann
I did this alread in https://www.drupal.org/project/ui_patterns/issues/3461274 📌 [2.0.0-beta1] No entity context in layout builder. Needs review
- 🇩🇪Germany Christian.wiedemann
Sorry did not read the other issue first. Fine you can merge.
- 🇫🇷France just_like_good_vibes PARIS
I 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 - 🇫🇷France just_like_good_vibes PARIS
hello,
for me the code for token is probably not totally ok.
For example it may not handle properly EntityTypeMappings (where for example ataxonomy_term
is 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 - Assigned to just_like_good_vibes
- Issue was unassigned.
- Status changed to Needs review
4 months ago 10:52am 7 August 2024 - 🇫🇷France just_like_good_vibes PARIS
Hello,
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".Token
source is like that ...Therefore, i have introduced a new source
token_plain
which really render plain text from a token (tagged with prop_typestring
and 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.
-
just_like_good_vibes →
committed 2762b6df on 2.0.x
Issue #3465823 by just_like_good_vibes, Christian.wiedemann: Token...
-
just_like_good_vibes →
committed 2762b6df on 2.0.x
- Status changed to Fixed
4 months ago 2:22pm 8 August 2024 - Status changed to Fixed
4 months ago 2:49pm 12 August 2024