fix(ui): don't use tab label as prefix on tabs which have no name.
What?
Currently when showing available columns to filter on it will show fields inside tabs prepended with the tab name and an angle bracket as separator.
Why?
This makes sense when the tab has a name and also acts like a group. But in my opinion it does not make sense when tab does not have a name and is only used for presentational purposes. This shows very well with the SEO plugin where the SEO fields are inside a group field, so when used as a tab as well the SEO is shown double.
How?
Check for tab name and only include the tab label as prefix when the tab has a name
Before
After
@andershermansen hmm is there ever a case where we'd want to display unnamed tab labels as the field prefix? Like if the unnamed tab is nested within another unnamed tab, for example. There might be edge cases here we need to consider. Could we alternatively remove the label from the group field within the SEO plugin config?
@andershermansen hmm is there ever a case where we'd want to display unnamed tab labels as the field prefix? Like if the unnamed tab is nested within another unnamed tab, for example. There might be edge cases here we need to consider.
@jacobsfletch I'm not sure in which scenarios people use two nested unnamed tab and would still want the label. You would get flat fields in the types, api output and (most important) the column list header. Why would you want something different in the filter list?
At least one other user also think this should be changed: https://discord.com/channels/967097582721572934/1141012046385795143/1316857322793992254
Could we alternatively remove the label from the
groupfield within the SEO plugin config?
Honestly, this was just an example of an unwanted side effect of current logic. I think the current setup of the SEO plugin is fine (I use the same logic in some of my code as well). And would expect the current setup to render with only the SEO group label.
@jacobsfletch I mean here:
we show the fields without prefix of unnamed tab, I think that it should be same in filter dropdown.