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 rendering of closed field groups once openend #20185

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

paescuj
Copy link
Member

@paescuj paescuj commented Oct 25, 2023

Scope

What's changed:

In #19962 we didn't take into account that with closed field groups, once opened the pushGroupOptionsDown only receives a subset of fields (the nested ones), which means the referenced groups are missing in the set. This resulted into an infinite loop in the function.

To correctly handle such cases, we're now building a proper tree from the fields, which means the function does nothing if groups aren't part of the received array.

Corresponding test cases have been added.

Potential Risks / Drawbacks

N/A

Review Notes / Questions

Did a quick benchmark to ensure the new implementation is at least as fast as the previous one. In fact, it is slightly faster compared to a "patched version" of the previous implementation.


Fixes #20145

@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: c4f2b26

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@directus/app Patch
@directus/api Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rijkvanzanten rijkvanzanten merged commit 4fd6616 into main Oct 25, 2023
10 checks passed
@rijkvanzanten rijkvanzanten deleted the fix-closed-field-groups branch October 25, 2023 17:05
@github-actions github-actions bot added this to the Next Patch Release milestone Oct 25, 2023
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
* Fix rendering of closed field groups once openend

* Add changeset
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detail Group crashing pages
2 participants