Skip to content

Conversation

@andershermansen
Copy link
Contributor

@andershermansen andershermansen commented Jul 25, 2024

Description

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

Before change:
before change

After change:
after change

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@andershermansen
Copy link
Contributor Author

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

@JarrodMFlesch
Copy link
Contributor

JarrodMFlesch commented Jul 25, 2024

@andershermansen I think this is a very welcome improvement 😃

As for labels, using the caret is probably wise in the column headers as well!

@andershermansen
Copy link
Contributor Author

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

@andershermansen andershermansen force-pushed the separate-columns-for-group-fields branch 3 times, most recently from 6b7fcca to bcebda0 Compare July 29, 2024 20:03
@andershermansen andershermansen marked this pull request as draft July 29, 2024 20:53
@andershermansen andershermansen force-pushed the separate-columns-for-group-fields branch from bcebda0 to 52cf7f9 Compare July 30, 2024 07:39
@andershermansen andershermansen marked this pull request as ready for review July 30, 2024 10:41
@andershermansen
Copy link
Contributor Author

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

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

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

@linobino1
Copy link
Contributor

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

@andershermansen
Copy link
Contributor Author

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 andershermansen changed the title feat(ui): show nested fields in groups as separate columns in table feat(ui): show fields inside groups as separate columns in table Aug 20, 2024
@jhb-dev
Copy link
Contributor

jhb-dev commented Oct 30, 2024

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

@github-actions
Copy link
Contributor

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 github-actions bot added the stale label Dec 11, 2024
@sfivash
Copy link

sfivash commented Feb 11, 2025

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

@github-actions github-actions bot removed the stale label Feb 12, 2025
@github-actions github-actions bot added the stale label Mar 14, 2025
@PatrikKozak PatrikKozak changed the title feat(ui): show fields inside groups as separate columns in table feat: show fields inside groups as separate columns in the list view May 15, 2025
Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one suggestion for this

@DanRibbens DanRibbens merged commit 2a41d3f into payloadcms:main May 21, 2025
73 of 74 checks passed
DanRibbens added a commit that referenced this pull request May 21, 2025
Resolves conflicts from PR #7355 --------- Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com> Co-authored-by: Keisuke Ikeda <ksk1kd.dev@gmail.com> Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: Dan Ribbens <DanRibbens@users.noreply.github.com> Co-authored-by: Sasha <64744993+r1tsuu@users.noreply.github.com> Co-authored-by: Paul <paul@payloadcms.com> Co-authored-by: Germán Jabloñski <43938777+GermanJablo@users.noreply.github.com> Co-authored-by: Anders Semb Hermansen <anders.hermansen@gmail.com>
@github-actions
Copy link
Contributor

🚀 This is included in version v3.39.0

@1b0t
Copy link
Contributor

1b0t commented May 26, 2025

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

PatrikKozak added a commit that referenced this pull request May 27, 2025
…t view (#12530) ### What Continuation of #7355 by extending the functionality to named tabs. Updates `flattenFields` to hoist nested fields inside named tabs to the top-level field array when `moveSubFieldsToTop` is enabled. Also fixes an issue where group fields with custom cells were being flattened out. Now, group fields with a custom cell components remain available as top-level columns. Fixes #12563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

9 participants