- Issue created by @musa.thomas
- First commit to issue fork.
- Assigned to pdureau
- Status changed to Needs review
7 months ago 9:51am 13 April 2024 - 🇫🇷France pdureau Paris
Same MR as 🐛 [2.0.0-alpha2] Formatters: functional feedbacks from alpha1 Needs review
- Issue was unassigned.
- Status changed to Needs work
7 months ago 1:05pm 15 April 2024 - 🇫🇷France pdureau Paris
Tested with a node's title field:
- For each: ❌ the form doesn't load
- For all: ✅ We see only field properties now. According to Mikael, it is a generic "universal" system instead of just covering views' context.
- Status changed to Needs review
7 months ago 3:05pm 15 April 2024 - 🇫🇷France just_like_good_vibes PARIS
For each: ❌ the form doesn't load
-> this is true when the field formatter "for each" is not applicable, when the cardinality of the storage is 1 at most.
if you select a field with cardinality superior or equal to 2, the for each will work in views.i have checked the code, i am not 100% sure, but the list of formatters which is proposed in the views field option form, do not reflect the result of the method "isApplicable" inside the field formatters.
according to what i have seen the line in class "Drupal\views\Plugin\views\field\EntityField" from views module.
$formatters = $this->formatterPluginManager->getOptions($field->getType());
so what do we do?
- Status changed to Needs work
7 months ago 3:23pm 16 April 2024 - 🇫🇷France pdureau Paris
A little update with my new batch of tests
- "For all" on a single value field: ✅
- "For all" on a multivalued field: ✅
- "For each" on a single value field: ❌ the form doesn't load
- "For each" on a multivalued field: ✅
Before fixing "For each on a single value field" let's talk about those 2 formatters.
Why do we have field properties source on "for all" ? It make sense when "For all" is applied to a single value field, but what is expected in a multivalued field?
Proposal
"Component (For all)" is renamed 'Component wrapper" (or something like that...) and has those sources:
- Field label
- Field formatter (with the full renderable)
"Component (For each)"is simply renamed 'Component", is available for both single value and multivalued fields, a has those sources:
- Field label
- Field formatter (if the render array is a list, we take the corresponding rendered item; if the render array is a single renderable, what do we do? We return it or we reurn nothing?)
- Field properties...
Both are available for multivalues & single value fields.
- 🇫🇷France just_like_good_vibes PARIS
About for each and for All,
why not just use the terms "Components"
(for each), and "Component"? - Assigned to just_like_good_vibes
- Merge request !111Issue #3440278 + bonus : various bugfixes to allow correct nesting, correct source plugins context filtering. super nice → (Merged) created by just_like_good_vibes
- Status changed to Needs review
6 months ago 9:30am 7 June 2024 - 🇫🇷France just_like_good_vibes PARIS
Hello,
as we discussed during the camp, i made the changes to allow better field formatter naming and working.
i think this MR is one of the toughest i have made during the last weeks, but it brings so much goodness :+ better source plugins management for slots and props, through a better handling of contexts. Especially custom contexts which are
specified by ui patterns sources and have constraints (views source plugins, field prop source plugins...etc). The magic really happens now
The modification allowed also to clean the ".module" of ui_patterns_views and put the right code at the right place inside each ui patterns views ' source plugins ;)+ some bugfixes on ui_patterns_field_formatters, which were appearing during nesting. the nested field formatter was not handling correction the field definition..
+ some renaming of the two field formatters which are "Single component" and "Component per item", to allow better understanding of what's happening when you render a field and its items with ui patterns.
+ renaming of field formatter PHP classes for better homogeneity
please review
-
pdureau →
committed 8b51a963 on 2.0.x authored by
just_like_good_vibes →
Issue #3440278 by just_like_good_vibes: Field Formatters: views, nesting...
-
pdureau →
committed 8b51a963 on 2.0.x authored by
just_like_good_vibes →
- Issue was unassigned.
- Status changed to Fixed
6 months ago 10:00pm 7 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.