Sylius version affected: 1.5.x
Description
https://github.com/Sylius/SyliusUiBundle/commit/74a103f85e6f3158db31da23b4b45d08cb55fcc2#diff-65a67b708dd2b789d2caa97d9cf123c2
In this commit UiBundle Hide filter by default on index pages
Steps to reproduce
When you use the administration in a habitual way it is very uncomfortable that the filters are hidden by default.
In order to understand the problem, I put a case of random use:
You have to modify 10 users:
1) You open the filter panel
2) You search for the user in question
3) You enter to edit the user, modify fields and save it
4) You return to the main list
5) You open the filter panel
6) You search for the user in question ....
To modify 10 users having to open the filter panel ... is a waste of time. You need open filters 10 times.
And the same thing happens if you want to modify 10 products, 10 orders ... etc ..
If you enter a list page in administration... the usual case is to have to filter...
Possible Solution
1) Undo commit and show filters by default.
2) Can configure if filters has visible, now I will have to override template to modify it.
3) Save in session storage if the user admin show or hide menu filters..
What is the opinion of the community?
I totally agree with you, and would go with the visible or not filter configuration option.
Hello @Chrysweel! Filters have been hidden by default on purpose, as they usually occupy a lot of space - and the primary goal of index pages should be showing the index of a specific entity. Half of the screen with filters is a little bit overwhelming (as explained in the PR that introduced this change).
I agree that it's not convenient for all cases, however, overriding only one template (src/Sylius/Bundle/UiBundle/Resources/views/Grid/_default.html.twig) does not seem like a huge deal...
I'm wondering, should something so simple be configured by some parameter? I see the pros and cons of such a solution, would be happy to see another's opinion 🖖
I think the point of the issue is the fact that filters are being used as a search box in many cases, and in any kind of search functionality, hiding the search box would have no point, but that's the case with hidden filters.
A good solution could be to maintain first line of the filter box in the line that actually hides them, witch is occupying space with no more purpose that hide filters, with an option button to display the entire filter box in the category.
I think the real problem is, you do filter and they are still hidden. They should be hidden just as long as no filter is applied and when you search show them.
@Zales0123 I think that in the page list the main action is FILTER.
When are you going to want to go to a list page of the administration and not need to filter? If you have more than 30 elements, the logical thing is that you need to filter.
It is easier once you have filtered, to collapse the filters to be able to see the list that forces to unfold the filters whenever you get to that page.
About overwriting the template, this option is not in a block, then the developer is obliged to overwrite the entire template, losing any changes that may be in future updates of the project.
Maybe the designs can be improved, but penalizing the administrator user I think it is an error....
And using browser storage? Sylius already does that in the taxons tree afaik
Good morning everyone! :)
When putting the hiding of filters into Sylius backlog, I would never have thought that it will be such an emotional move -> _penalizing the administrator_ 😱
Let me explain why we did this now. The index filters are suffering from a very poor UX, whoever sees them for the first time might get lost in the spaghetti of input fields and choice fields 🍝 . We have hidden the filters for now, in order to work on them in peace and come back one day after a UX rework to have them unfolded by default again. When you do renovation at home, you do not sit with your guests there in the dust and dirt 😉
👌 If you are struggling with this change now and would like to go back to the previous state please override the src/Sylius/Bundle/UiBundle/Resources/views/Grid/_default.html.twig template, as @Zales0123 has suggested.
I think it's not the best solution, but ok @CoderMaggie.
So I think it would be good to include some Twig block to be able to just overwrite the concrete filters and not have to overwrite the whole template.
What do you think?
@Chrysweel The filters behaviour has been adjusted, now they remain unfolded, while you are filtering :) This reduces the number of clicks in the scenario you have provided :) #10546
Closing, please reopen, if still willing to change that.
Most helpful comment
I think the point of the issue is the fact that filters are being used as a search box in many cases, and in any kind of search functionality, hiding the search box would have no point, but that's the case with hidden filters.
A good solution could be to maintain first line of the filter box in the line that actually hides them, witch is occupying space with no more purpose that hide filters, with an option button to display the entire filter box in the category.