-
Notifications
You must be signed in to change notification settings - Fork 125
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
v2.0 - improveing filters functionality #758
Comments
Dynamic filters improvementFilters will be moved above the list. This will make more space for the list and allow displaying more columns. The filters panel will be hidden by default, only the panel header will be visible. Clicking the header toggles show/hide filters panel. The filters form will be a collection of filter items. A filter item can represent either:
There will be a button to add "filter group" and a button to add "filter" for selected field. Between filters or filter groups there will always be a comparison operator (automatically added, when you add new filter or group). This will allow to dynamically construct ANY filtering query. For example, you could construct such filtering criteria for User:
|
👍 I would like to link to #580 as that would probably be fixed with this update. |
@bobvandevijver thanks, I've added it to TODO list, though right now I'm not sure how to implement this, but I'll definately try, once the base for this change (dynamic filters) is ready |
I have an idea how to implement filtering on related entities which may also solve filtering in translated content. |
@loostro If you need any help, let me know! |
@bobvandevijver When the first step and biggest change (dynamic filters) is ready, I will submit a PR, so you can (a) comment & discuss, (b) help me with ideas how to implement other features from the list. I hope to send the PR around this monday. |
Adding an old idea (#135) to link to prefiltered lists. However, my idea for this goes beyond what @hellomedia proposed. I think we need a way to configure prefiltered lists as in some cases we want to add credentials checks and add parameters. For example, a USER can access a prefiltered list of his own comments, but not someone else's. Also, we probably want to create a sub-route for each prefiltered view. Eg.
I have something like this in mind:
This behaviour can already be hand-written, but maybe adding a way to generate these is a good idea? This is something to discuss. |
As unfortunately I had to do a complete system reinstall I'll probably submit the PR later - probably around this wednesday. PS. No data was lost, just time wasted to fix my PC and probably got a few extra white hairs :P Update: reinstalling and reconfigureing takes longer than I expected. Thursday is more likely for the PR push. |
@loostro Good luck with the reinstall! I do not know for sure if the prefiltered lists are such an good idea. If you really want such behaviour, you can always add it yourself. This might give the programmer more control over these prefiltered lists. |
@bobvandevijver I've been thinking about that a few days ago and I came to a conclusion, that adding a new action to the controller (and a route for it) which mimics list action (except, it modifies the query) is actually quite easy. Actually I use AdminGenerator to power some backends with many users (regular, elevated, managers, and super-admins) and it works quite well thanks to |
I've decided to simplify the dynamic filters a bit and remove "infinite nesting". I've changed my mind becouse:
After rethinking, I've decided to redesign things, so that:
So, a filter form like that:
Would be translated to |
I'm going on holidays and will continue working on this when I'm back, 19th. |
Just a comment to say I have done filters on top + filter on related entities columns on our project. The code is not very clean and it only works with propel but I can send it if you want to have a look On the screenshot you can see the entreprise column filter which is related to user. Declaration looks like that :
|
@ruben-podadera the "advanced" filters were created on the As the result I plan to simplify the filters.. and I had something like on your screenshot in mind :)
For example, for
I'll be workin on it this week, I'll drop info here when I'm done. |
@loostro Actually we are only using filters for text columns, thus the default filter does exactly what we want, so no need for 2 rows for us. What we where interesting was the possibility to filter on related table column's. Anyway I'm looking forward to see your changes. Thanks for your work |
If i remind well you can set filterOn option to define a related table params:
|
@ruben-podadera I've reverted to old filters (one-per-column) in the new-unstable repo. Then I've changed the GUI to match your screenshot. Also added a few improvements (like custom filters, similar to custom scopes) which can be used to filter translatable content OR on related entity field. Also added "null" and "not null" filters. The new-unstable branch now is only missing good documentation and demo |
@cedriclombardot the maybe at some point when refactoring that functionality was lost? either way it should be reverted/or implemented somehow |
@loostro thanks for the feedback, I will give a try when I have some free time (but currently we are being a bit busy ...) |
If i remind well yes it was developed : i found some traces on https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/blob/c5471f8bd5d291becf7d9f7fc30cf0472bd5cb67/Generator/Column.php. Perhaps was brocken since ! |
Lately I'm focusing on improveing the filters functionality, which is the next milestone. I'm opening this issue to announce the incoming changes and make room for discussion and other ideas. The PR should be ready this week.
The improvements will introduce BC breaks, so the major version number will increase to
v2.0
. The next version will be based on newestv1.1
branch (Twitter Bootstrap 3).So to use it, you'll have to upgrade if you used the
v1.0
branch (however - I've done that myself lately, it's not really hard).Since I'll be refactoring the whole filters functionality - if you have any ideas what else I could improve, please share.
The text was updated successfully, but these errors were encountered: