Story #69617: FormEngine bugs
type select fields should not show icons below by default
IMO it is not useful to show the icons always, e.g. with tt_content and l18n_parent, this just doesn't add more value to the editor.
[!!!][FEATURE] Add showIconTable option for selectSingle fields
This patch introduces a new option "showIconTable" for select fields
with renderType "selectSingle". Furthermore it removes the functionality
for old options "noIconsBelowSelect" "foreign_table_loadIcons" and
The advantages is to have only one option which controls the visibility
of the icon table instead of having multiple ways.
A migration wizards sets the new property according to the old behavior
and generates deprecation messages for the tables and fields using old
Core TCA definitions are adjusted to use the new option. The language
fields are changed to show the icon table by default.
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>
Reviewed-by: Georg Ringer <email@example.com>
Tested-by: Georg Ringer <firstname.lastname@example.org>
#1 Updated by Christian Kuhn over 4 years ago
Well, this is a side effect since the data processing now finds more icons by default than before. The fact that more icons are resolved should be kept since it is helpful at other places.
I'm unsure on how to change current behavior in a sane way. There is the option "noIconsBelowSelect" than can be set to 1 to suppress this table display:
a) The easiest change is to just set this in TCA for those fields where we do NOT want the icons.
b) Another option is to interpret a missing "noIconsBelowSelect" as TRUE, this would change the default of this config option and it may have the side effect that lots of those icon phalanxes disappear since the option now needs to be explicitly set to FALSE to show the icon table again. This also has the effect that "noIconBelowSelect = FALSE" is hard to read and a double negative option then.
c) Another option would be to drop "noIconBelowSelect" altogether and either remove this icon table foo as well, or implement a new option "showIconTable" or similar that must be set to TRUE. In this case no 1:1 migration would be possible. And we may have a chat with the one or the other UX person to find out what they think about the icon stuff in the first place.
How to proceed?
#2 Updated by Christian Kuhn over 4 years ago
After discussion with Georg it seems the best option is c):
- Create a new option "showRecordIcons" or "showItemIconsAsClickField" or similar that triggers rendering of this table. Default is false (no table shown).
- Drop "noIconsBelowSelect"
- Add TcaMigration that drops "noIconBelowSelect" and writes deprecation
- Add a breaking.rst for the removal, add feature.rst for new option
- Add new option in core where we want it (eg. tt_content types).
- The vast majority of select drop downs does not want to have these icons, so it makes much more sense to explicitly enable it.
- The negative "no*" is not great and can be swapped along the way.
- The new option is easy to understand and there is no additional magic involved.