feat(ui): show fields inside groups as separate columns in table
Description
Group fields are shown as one column, this PR changes this so that the individual field is now shown separatly.
Before change:
After change:
- [X] I have read and understand the CONTRIBUTING.md document in this repository.
Type of change
- [X] New feature (non-breaking change which adds functionality)
Checklist:
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] Existing test suite passes locally with my changes
- [ ] I have made corresponding changes to the documentation
@JarrodMFlesch Ref the comment you made in #7331, that this was not for now. I wanted to work more on it. Please let me know what you think about the approach, if it's fine I will work further on checking any side effects and work on tests to ensure it will be covered and look at any failing test.
I also wanted to know what you think about the column header/label. In filters this has a > for nested fileds. Like this:
I think that should also apply to the column header. What do you think?
@andershermansen I think this is a very welcome improvement š
As for labels, using the caret is probably wise in the column headers as well!
@JarrodMFlesch Great! Iām on leave for the rest of this week, will pick this up and implement the rest next week.
@JarrodMFlesch This is now ready for review. The lint error is in a file I have changed, but it's not my change. All other tests are green and I added test case for the new feature.
@JarrodMFlesch Did you (or anybody else in payload team) had a chance to take a look? I merged in latest beta branch now, the lint error is gone as it was fixed in another merged PR. But live-preview test broke. I think it's a flaky test, passes fine locally.
Maybe I can interest you with some more screenshots ;)
From dev fields
Before:
After:
Maybe | instead of > would be a bit more clear in the columns select toolbar?
Maybe
|instead of>would be a bit more clear in the columns select toolbar?
I think the > looks better and is more clear. Also consistent with how the filters is implemented.
Here is how it looks with the |
That's a great addition, thanks @andershermansen! I hope this gets reviewed and merged soon :)
This PR is stale due to lack of activity.
To keep the PR open, please indicate that it is still relevant in a comment below.
I came here looking for a way to display individual grouped columns. I hope this feature gets reviewed and merged in.
Hey @andershermansen! Thanks for your patience with this one and apologies for the delayed review.
I'll be reviewing this myself and helping get this awesome improvement to the finish line!
š This is included in version v3.39.0
@DanRibbens @andershermansen this is a great addition! However, it appears to be a breaking change. The previous group (data in json) column is not available any more. We had custom cell rendering for these fields. Since the aggregated column is not present anymore this completely breaks!
Previously:
Now:
Can we get a hoffix that restores compatibility with the old behaviour?