Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): don't use tab label as prefix on tabs which have no name. #9965

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andershermansen
Copy link
Contributor

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

before pages
before tabs

After

after pages
after tabs

@andershermansen andershermansen force-pushed the filters-tab-without-name branch from 4f8477c to 0823167 Compare December 16, 2024 08:53
@jacobsfletch
Copy link
Member

@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
Copy link
Contributor Author

@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 group field 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.

@andershermansen
Copy link
Contributor Author

@jacobsfletch I mean here:
Skjermbilde 2024-12-18 kl  19 48 26
we show the fields without prefix of unnamed tab, I think that it should be same in filter dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants