Incremental filter for the permissions page
Hello Development, I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov . The patch is pretty much ready to be reviewed, except for the fact that webchick has an issue with how it degrades. Currently, without JavaScript, the textfield for searching simply isn't there, and you can't use the incremental filter. Webchick would like it to be degradable. The issue with this is that we already have a 100-line search algorithm for searching in HTML, and we'd need another 150 or so search algorithm to do it server side, which would actually be quite different. CHX has an argument against needing a degradable version at http://drupal.org/node/229193#comment-1260194 : "I think this is fine with working only if JavaScript is there. Drupal works without JavaScript but with reduced functionality already. You can not resize a textarea without JS for example. Autocomplete does not work. This piece is similar." What do you guys think? Dmitri
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov .
Dmitri
Whether or not this thingy degrades, I don't really care. I wouldn't mind if it does not. But I care for whether this actually works on a full-blown Drupal site having 10-15 roles and countless modules exposing permissions (including CCK Field Permissions that adds 3 permissions per fields, f.e. for 125 fields). A previous attempt on parsing/filtering the permissions page on such a site resulted in a total browser freeze: #366442: Admin menu: Collapse modules on permissions page [1] It worked flawlessly on a stock Drupal core install. This needs to be tested before committing this. Thanks, Daniel [1] http://drupal.org/node/366442
Good point, Daniel. I develop for a bunch of sites with over 100 modules enabled and lot of CCK fields. My permissions page is huge. While a nicer UI for it would be nice, having it die because of Javascript overload would be worse. ..chris On Mon, Feb 16, 2009 at 7:55 PM, Daniel F. Kudwien <news@unleashedmind.com> wrote:
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov .
Dmitri
Whether or not this thingy degrades, I don't really care. I wouldn't mind if it does not.
But I care for whether this actually works on a full-blown Drupal site having 10-15 roles and countless modules exposing permissions (including CCK Field Permissions that adds 3 permissions per fields, f.e. for 125 fields).
A previous attempt on parsing/filtering the permissions page on such a site resulted in a total browser freeze:
#366442: Admin menu: Collapse modules on permissions page [1]
It worked flawlessly on a stock Drupal core install.
This needs to be tested before committing this.
Thanks, Daniel
On Feb 16, 2009, at 5:55 PM, Daniel F. Kudwien wrote:
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov .
Dmitri
Whether or not this thingy degrades, I don't really care. I wouldn't mind if it does not.
But I care for whether this actually works on a full-blown Drupal site having 10-15 roles and countless modules exposing permissions (including CCK Field Permissions that adds 3 permissions per fields, f.e. for 125 fields).
Fixed in the latest patch, and I provided a test module.
A previous attempt on parsing/filtering the permissions page on such a site resulted in a total browser freeze:
#366442: Admin menu: Collapse modules on permissions page [1]
It worked flawlessly on a stock Drupal core install.
This needs to be tested before committing this.
Thanks, Daniel
Looks like Its not taking in capital letters, is that out of scope? Commented on the issue http://drupal.org/node/229193#comment-1262332 Dipen Chaudhary http://www.dipenchaudhary.com http://playdrupal.com On Tue, Feb 17, 2009 at 10:31 AM, Dmitri Gaskin <dmitrig01@gmail.com> wrote:
On Feb 16, 2009, at 5:55 PM, Daniel F. Kudwien wrote:
I've been working on a patch that incrementally filters the
permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov .
Dmitri
Whether or not this thingy degrades, I don't really care. I wouldn't mind if it does not.
But I care for whether this actually works on a full-blown Drupal site having 10-15 roles and countless modules exposing permissions (including CCK Field Permissions that adds 3 permissions per fields, f.e. for 125 fields).
Fixed in the latest patch, and I provided a test module.
A previous attempt on parsing/filtering the permissions page on such a
site resulted in a total browser freeze:
#366442: Admin menu: Collapse modules on permissions page [1]
It worked flawlessly on a stock Drupal core install.
This needs to be tested before committing this.
Thanks, Daniel
That's not a discussion for the development list, but i've fixed it :-) Dmitri On Feb 16, 2009, at 9:50 PM, Dipen wrote:
Looks like Its not taking in capital letters, is that out of scope?
Commented on the issue http://drupal.org/node/229193#comment-1262332
Dipen Chaudhary http://www.dipenchaudhary.com http://playdrupal.com
On Tue, Feb 17, 2009 at 10:31 AM, Dmitri Gaskin <dmitrig01@gmail.com> wrote:
On Feb 16, 2009, at 5:55 PM, Daniel F. Kudwien wrote:
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov .
Dmitri
Whether or not this thingy degrades, I don't really care. I wouldn't mind if it does not.
But I care for whether this actually works on a full-blown Drupal site having 10-15 roles and countless modules exposing permissions (including CCK Field Permissions that adds 3 permissions per fields, f.e. for 125 fields).
Fixed in the latest patch, and I provided a test module.
A previous attempt on parsing/filtering the permissions page on such a site resulted in a total browser freeze:
#366442: Admin menu: Collapse modules on permissions page [1]
It worked flawlessly on a stock Drupal core install.
This needs to be tested before committing this.
Thanks, Daniel
2009/2/16 Dmitri Gaskin <dmitrig01@gmail.com>:
Hello Development,
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov.
The patch is pretty much ready to be reviewed, except for the fact that webchick has an issue with how it degrades. Currently, without JavaScript, the textfield for searching simply isn't there, and you can't use the incremental filter. Webchick would like it to be degradable. The issue with this is that we already have a 100-line search algorithm for searching in HTML, and we'd need another 150 or so search algorithm to do it server side, which would actually be quite different.
CHX has an argument against needing a degradable version at http://drupal.org/node/229193#comment-1260194: "I think this is fine with working only if JavaScript is there. Drupal works without JavaScript but with reduced functionality already. You can not resize a textarea without JS for example. Autocomplete does not work. This piece is similar."
In this case, degradable means that the form is not useless without JavaScript, and it surely is not. What I would like to see there is a reusable component, which other core and contrib modules could use. It would basically allow you to set jQuery selectors for "what to search" and "what to hide". Henrique
What do you guys think?
Dmitri
On Feb 16, 2009, at 7:56 PM, Henrique Recidive wrote:
2009/2/16 Dmitri Gaskin <dmitrig01@gmail.com>:
Hello Development,
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov.
The patch is pretty much ready to be reviewed, except for the fact that webchick has an issue with how it degrades. Currently, without JavaScript, the textfield for searching simply isn't there, and you can't use the incremental filter. Webchick would like it to be degradable. The issue with this is that we already have a 100-line search algorithm for searching in HTML, and we'd need another 150 or so search algorithm to do it server side, which would actually be quite different.
CHX has an argument against needing a degradable version at http://drupal.org/node/229193#comment-1260194: "I think this is fine with working only if JavaScript is there. Drupal works without JavaScript but with reduced functionality already. You can not resize a textarea without JS for example. Autocomplete does not work. This piece is similar."
In this case, degradable means that the form is not useless without JavaScript, and it surely is not.
What I would like to see there is a reusable component, which other core and contrib modules could use.
That'd currently done.
It would basically allow you to set jQuery selectors for "what to search" and "what to hide".
You have to do a bit more work than that but not much. I'm going to implement it for the modules page next, but that's going to be after this goes in.
Henrique
What do you guys think?
Dmitri
Hi, that's a pretty good and useful feature. I don't think that this feature (or lack of feature without JS) fulfills the criterias of functionality that should degrade: Search is currently not possible with or without JS; so the new feature is merely a progressive enhancement. That being said, searching the permissions (or the entire admin area for that matter) would be another useful feature request; but it certainly does not block this patch from getting in.
You have to do a bit more work than that but not much. I'm going to implement it for the modules page next, but that's going to be after this goes in.
Please do it in a generic way (e.g. you can mark tables as "filterable", like you can mark a table as "sticky table headers"). That way, we can save a lot of JS code. Konstantin
+1 for filter being unavailable with javascript disabled provided the filter itself can be disabled in a setting (in case javascript in browser X, OS Y, moon at Z causes fireworks). If an admin doesn't have javascript enabled on their own site it's their loss of productivity ;) -- Sammy Spets Synerger http://synerger.com Dmitri Gaskin wrote:
Hello Development,
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov.
The patch is pretty much ready to be reviewed, except for the fact that webchick has an issue with how it degrades. Currently, without JavaScript, the textfield for searching simply isn't there, and you can't use the incremental filter. Webchick would like it to be degradable. The issue with this is that we already have a 100-line search algorithm for searching in HTML, and we'd need another 150 or so search algorithm to do it server side, which would actually be quite different.
CHX has an argument against needing a degradable version at http://drupal.org/node/229193#comment-1260194: "I think this is fine with working only if JavaScript is there. Drupal works without JavaScript but with reduced functionality already. You can not resize a textarea without JS for example. Autocomplete does not work. This piece is similar."
What do you guys think?
Dmitri
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I like this, it looks great, and I agree that it should degrade. However my definition of degrade is that if you don't have js then the it should look like it does now with no filtering. Having filtering on it with no js would not be hard, but it will be cumbersome to use. You can still do what you need to do without js, but to get the best usability then you should have the js on. Much like how the table weighting works, it is much easier with js, but you can do it with js off as well. Gordon. On 17/02/2009, at 12:23 PM, Dmitri Gaskin wrote:
Hello Development,
I've been working on a patch that incrementally filters the permission page - patch at http://drupal.org/node/229193 and demo at http://dmitrizone.com/229193.mov .
The patch is pretty much ready to be reviewed, except for the fact that webchick has an issue with how it degrades. Currently, without JavaScript, the textfield for searching simply isn't there, and you can't use the incremental filter. Webchick would like it to be degradable. The issue with this is that we already have a 100-line search algorithm for searching in HTML, and we'd need another 150 or so search algorithm to do it server side, which would actually be quite different.
CHX has an argument against needing a degradable version at http://drupal.org/node/229193#comment-1260194 : "I think this is fine with working only if JavaScript is there. Drupal works without JavaScript but with reduced functionality already. You can not resize a textarea without JS for example. Autocomplete does not work. This piece is similar."
What do you guys think?
Dmitri
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkmaQegACgkQngavurZvkrzJZACgvIXiqMJGYzLAVf9KsMeSUj82 cw0AoIh2a8Qf5Zp7BSSxcVabfEL33sJx =eRm5 -----END PGP SIGNATURE-----
participants (8)
-
Chris Johnson -
Daniel F. Kudwien -
Dipen -
Dmitri Gaskin -
Gordon Heydon -
Henrique Recidive -
Konstantin Käfer -
Sammy Spets