[AdminBundle] collapse collection items#2523
[AdminBundle] collapse collection items#2523JZuidema wants to merge 1 commit intoKunstmaan:masterfrom
Conversation
ProfessorKuma
left a comment
There was a problem hiding this comment.
Hi @, your PR needs some changes
- This PR seems to need a milestone of a minor release.
ProfessorKuma
left a comment
There was a problem hiding this comment.
Hi @, your PR passed all our requirements.
Thank you for contributing!
|
@JZuidema I like the idea, maybe we should also add a expand button in the grey collapsed indicating zone. Small box in the middle of this zone with a caret down icon? To make it more clear this zone can be expanded. |
| <i class="fa fa-chevron-down"></i> | ||
| </button> | ||
| {% endif %} | ||
| {% if obj.children | length > 5 %} |
There was a problem hiding this comment.
Would it make sense to make this number configurable?
There was a problem hiding this comment.
I'm actually not sure how. I can add it to the configuration and then add it to parameters, but you can't inject a parameter into twig, unless its been made available globally.
Okay well, I've looked into this but frontend is not really my area of expertise. Do you think one of you guys could look into it? |
ProfessorKuma
left a comment
There was a problem hiding this comment.
Hi @, your PR needs some changes
- This PR seems to need a milestone of a minor release.
|
This still needs some FE work to improve the look of this feature. I'm removing the milestone so we finish this somewhere in 6.x |

We ran into the problem that once you have a bunch of items in a collection type, while the item itself also has a lot of input fields, that you can't really find anything anymore. This merge requests automatically collapses items of a collection type if the item has more than 5 children.
For example:
Collection item has more than 5 children. Its automatically collapsed.

There is a button at the right top to expand it.

Button is clicked, and collection item is expanded to show all of its input fields
