-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
[AdminBundle] collapse collection items #2523
base: master
Are you sure you want to change the base?
[AdminBundle] collapse collection items #2523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @, your PR needs some changes
- This PR seems to need a milestone of a minor release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
@@ -195,10 +195,15 @@ | |||
<i class="fa fa-chevron-down"></i> | |||
</button> | |||
{% endif %} | |||
{% if obj.children | length > 5 %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to make this number configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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