payload icon indicating copy to clipboard operation
payload copied to clipboard

feat(ui): show fields inside groups as separate columns in table

Open andershermansen opened this issue 1 year ago • 10 comments

Description

Group fields are shown as one column, this PR changes this so that the individual field is now shown separatly.

Before change: before change

After 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

andershermansen avatar Jul 25 '24 13:07 andershermansen

@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: Skjermbilde 2024-07-25 kl  15 35 17 I think that should also apply to the column header. What do you think?

andershermansen avatar Jul 25 '24 13:07 andershermansen

@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 avatar Jul 25 '24 13:07 JarrodMFlesch

@JarrodMFlesch Great! I’m on leave for the rest of this week, will pick this up and implement the rest next week.

andershermansen avatar Jul 25 '24 13:07 andershermansen

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

andershermansen avatar Jul 30 '24 10:07 andershermansen

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

andershermansen avatar Aug 05 '24 18:08 andershermansen

Maybe I can interest you with some more screenshots ;)

From dev fields

Before: admin group fields before

After: admin group fields after 1 admin group fields after 2

andershermansen avatar Aug 05 '24 18:08 andershermansen

Maybe | instead of > would be a bit more clear in the columns select toolbar?

linobino1 avatar Aug 20 '24 19:08 linobino1

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 | Skjermbilde 2024-08-20 kl  22 14 06

andershermansen avatar Aug 20 '24 20:08 andershermansen

That's a great addition, thanks @andershermansen! I hope this gets reviewed and merged soon :)

jhb-dev avatar Oct 30 '24 07:10 jhb-dev

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.

github-actions[bot] avatar Dec 11 '24 05:12 github-actions[bot]

I came here looking for a way to display individual grouped columns. I hope this feature gets reviewed and merged in.

sfivash avatar Feb 11 '25 18:02 sfivash

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!

PatrikKozak avatar May 13 '25 15:05 PatrikKozak

šŸš€ This is included in version v3.39.0

github-actions[bot] avatar May 22 '25 14:05 github-actions[bot]

@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: Screenshot 2025-05-26 at 10 13 54 Now: Screenshot 2025-05-26 at 10 14 53

Can we get a hoffix that restores compatibility with the old behaviour?

1b0t avatar May 26 '25 08:05 1b0t