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

[MLv2] [BE] Make displayInfo for column groups straightforward to use #37369

Closed
Tracked by #34112
ranquild opened this issue Jan 8, 2024 · 1 comment · Fixed by #37760
Closed
Tracked by #34112

[MLv2] [BE] Make displayInfo for column groups straightforward to use #37369

ranquild opened this issue Jan 8, 2024 · 1 comment · Fixed by #37760
Assignees
Labels
.metabase-lib Label for tracking all issues related to the shared CLJC metabase-lib .Team/QueryProcessor :hammer_and_wrench:
Milestone

Comments

@ranquild
Copy link
Contributor

ranquild commented Jan 8, 2024

Currently the FE has to use a utility function everywhere when displaying ColumnGroup:

export function getColumnGroupName(groupInfo: ColumnGroupDisplayInfo) {
  return groupInfo.fkReferenceName || groupInfo.displayName;
}

This is not straightforward. We never use fkReferenceName or its own, and we never use displayName for ColumnGroup outside of this function.

We should improve the API - only displayName should be used without additional checks on the FE. MLv2 should update displayName for ColumnGroup to be the result of this function under the hood.

Without this check when using raw displayName now:
Screenshot 2024-01-09 at 14 07 32

With this check:
Screenshot 2024-01-09 at 14 08 10

@ranquild ranquild added .metabase-lib Label for tracking all issues related to the shared CLJC metabase-lib .Team/QueryProcessor :hammer_and_wrench: labels Jan 8, 2024
@snoe
Copy link
Contributor

snoe commented Jan 9, 2024

See #37347 here for a good reproduction to make column group displays more useful

@snoe snoe self-assigned this Jan 9, 2024
@snoe snoe added this to the 0.49 milestone Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.metabase-lib Label for tracking all issues related to the shared CLJC metabase-lib .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants