- Issue created by @hproustacx
- 🇫🇷France pdureau Paris
Hi Hugo,
Some of UI Patterns sources plugins are not really data sources but context switchers:
It seems you are:
- Editing a "Component per item" formatter on a reference field (so, you start from the field context)
- Picking the same field in "Data from a field" (so you stay at the same field context, but you lost the "per item").
- And then you pick a field formatter
Don't you have a the choice to pick the same formatter directly at step2?
It looks like (without being identical) the yesterday situation when you were:
- Editing a "Component per item" formatter on a reference field (so, you start from the field context)
- Picking a "Referenced entities" source (so you move "up" to the content entity context)
- And then picking the same field "Data from a field"
Maybe our UX is confusing. So I am proposing to:
1. Add a label with the current context at the beginning of the component form
Only the most precise available context, as provided by to the configurable plugin:
- Component field formatter: [Field]
- Component per item field formatter: [Field item]
- Layout: [Entity] or nothing (or [Page] or [Content] when they will be added to UI Patterns 2]
- Block: [Entity] or nothing (or [Page] or [Content] when they will be added to UI Patterns 2]
I skip Views plugins because there is no context switching (yet) here.
1. Prefix the context sensitive source with the expected context
2. Rename our context switchers to make the switch more explicit
With an Unicode arrow in the label, for example:
Wrapping up
So, for the today example, you will have this:
- "Component per item" [Field item]
- "[Content] ➜ [Field]"
- The selected field formatter
To make it obvious we went from "Field item" to "Field".
For yesterday example:
- "Component per item" [Field item]
- [Content] ➜ Referenced [Content]
- [Content] ➜ [Field]
Is it clearer with this labelling? I am open to any suggestions or wanring ;)
- 🇫🇷France pdureau Paris
Checked with Hugo. No bugs found. It is only an UX issue, so let's go.
- 🇫🇷France hproustacx
After discussing with Pierre, indeed not a bug, but rather an UX / Label issue that might lead to confusion.
Proposed resolution
Introduce categories/group in the select output when selecting data from a field to further explain the context.To take it further
When already in a field context, remove the same field from the select options of Data from a field to avoid context loop/duplicate or display warning upon selection. - 🇫🇷France pdureau Paris
Before:
After:
It make the context tracking easier from a source to another:
a
- Merge request !385Issue #3525836 by hproustacx, pdureau: Improve context switching UX → (Open) created by pdureau
- 🇫🇷France pdureau Paris
Also, why all the Context Switchers are in the "Converted" group? why not in the main group or a specific "Context switching" group?
- 🇫🇷France pdureau Paris
Also, why all the Context Switchers are in the "Converted" group? why not in the main group or a specific "Context switching" group?
Mikael proposes to remove the "Converted" group because it seems users don't care about this.
And introduce a group by Context, so
- Component
- Block
- Wysiwyg
Entity
- [Entity] Link
- [Entity] -> Field
Field
- [Field] Formatter
- [Field] Label
- 🇫🇷France pdureau Paris
Finally, I am proposing to gather context switchers together;
- Component
- Block
- [Entity] Link
- [Field] Formatter
- [Field] Label
- Wysiwyg
-
- [Entity] -> Field