Redesign permissions page
fajerstarter - September 10, 2005 - 10:16
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | user.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Here's a mock-up of a javascript enhanced permissions page. Just wanted to share the idea with you; it's just an mock-up, no code yet. The idea is to give users with javascript the possibility to filter the permissions. Users without javascript gets the same page as before. It's similair to the collapsible form groups approach used in the upcoming Drupal 4.7.
This article is an example how it could be coded (unobtrusively).
Thoughts?
| Attachment | Size |
|---|---|
| permissions_UI.gif | 18.57 KB |

#1
#2
I really like the idea, but with a few comments:
We should not start introducing side-tabs. Ratheruse tabs across the top, in some manner. That is consistent.
The JAvascript must off course degrade well. In fact, it should by default not use any JS, just show links to pages. If it is proven that the browser supports it, js can be switched on (automatically, off course).
#3
Ofcourse it should degrade well, that's why I pointed to the article and also referenced to the collabsible form group already in core. The term unobtrusive is often used for that kind of behaviour.
#4
Good idea. We could use collapsible fieldsets as already used in the cvs head.
#5
In a way, I kind of like the side buttons. They might look weird and cluttered next to a left navigation menu - especially in a fixed-width theme - but it "scales" better.
Tabs along the top are going to be problematic. After a certain number of modules, you're pushing things out way too wide. A vertical arrangement does not suffer the same problems, which is why I wouldn't reject it outright.
My biggest problem with the access page now is its height. After scrolling down to see options, I tend to forget which column belongs to which role. Also, when we add a number of roles, the screen gets way too wide.
Breaking them up by module is useful, and perhaps this can lead to folding the roles so they don't "push out" too much. Great Start!
#6
Adding another column to a matrix that is already very wide if you have more than just the basic roles doesn't really seem to be a good idea.
#7
I agree.
IMNSHO we should get rid of that matrix. OR better: leave the matrix there for thos who thing they need it, but come upp with a new idea/concept.
The matrix does not scale, we all know that. And I am not talking about five modules and thre roles. But about fifteen roles and twleve modules with /loads/ of permuissions.
Let us please first think about this a little more. (mockups are great for this, hint)
#8
Just to point out the obvious, the matrix makes it easy to compare permissions for roles. It also allows bulk editing of permissions for multiple roles at a glance. We will lose these when we junk it. It does not scale though.
As far as keeping two interfaces, it may end up being confusing, and add to code bloat.
#9
This mock-up adresses the left too right scaling issue.
For non javascript users we provide a filter button, so the filtering can be done with regular POST.
It would be usefull if the role filtering was accomplished with AJAX for javasript users (no page reload when a role is disabled or enabled in the matrix).
I still feel that the side-tabs is best suited to adress the scaling issue with a lot of modules (and I kind of like it :) ). But I guess the collabsible form group approach could be used instead.
#10
#11
Just some realated issues to take in account:
http://drupal.org/node/28301
http://drupal.org/node/25530 (especially comment #9)
And some background/motivation
http://drupal.org/node/30711
#12
fajerstarter: The javascript permission groups by module are not really my cup of tea. I personally *like* having all the permissions visible at once.
However, I find your group checkboxes mockup really great. Now, if *that* was dynamic, as in show/hide columns with JS, it would roxr.
Just my ¢2.
#13
Maybe it's a bit too bold to call this handcoded example a patch, but it can be made to one...
Anyway, I've been playing with some javascript on the permissions page. I used some of the ideas in my mock-ups. Even though I like the side-tabs in the first mock-up I went for the already established form group approach.
Some things are missing in the javascript (like auto-collapse) but that should be easily fixed. The css could be cleaned up as well.
My biggest problem so far is how to "inject" the tbody tags that are used to group the table rows (they are hancoded in my example). Currently the table theme function doesn't allow that. Someone want's to give it a go?
The role toggle is plain javascript in this example. In order to have this functionality for non-javascript users it has to be a regular form. We could of course also just hide it for non javascript user. AJAX could also be considered.
#14
Yeah, a bit bold. I nevertheless like it. However, you need to make sure to not display the selection bar, if JS is not available.
#15
Why not always have the role name column headers displayed rather than on hover?
I tried the colors using a contrast checker at http://www.snook.ca/technical/colour_contrast/colour.html. #AAAAAA and #E9E9E9 have a difference of 189 when the W3C recomends 500. I'd recomend making the text #424242, which makes a difference of 501.
#16
Oh and I made a patch for tbody: http://drupal.org/node/28777
#17
Regarding thead, that JUST hit HEAD tonight:
http://drupal.org/node/28777
Functionality-wise, the page looks great. On my system, however (Konqueror 3.4.2 web browser), scrolling the page is then very slow. My hardware is reasonably modern, so I'm assuming the Javascript is slowing it down somehow. Something to look into.
Wouldn't making each module its own fieldset, though, work as well? We'd lose the massive-table, but that may or may not be a bad thing.
#18
The css hover makes the interface much less cluttered. It can be noted that it's not supported by IE6 without some lines of javascript.
I know, I discussed that in a previous post :) What are your opinions on that; should we make this functionality avalible for non javascript users or is it enough to just see it as an enhancement for javascript users, similar to auto-collapse and auto-complete?
Have you tried it with javascript and/or css turned off? Might give some valuable info.
Good point... Needs some thinking.
#19
From what I can understand from the tbody patch now in HEAD it doesn't allow grouping of rows, which is needed in this situation.
I made a feature request, so if someone is willing to give it a go it would be great, it's a bit above my head and currently the only thing holding back a proper patch of this permissions page.
#20
I like the idea of hidding some roles from the matrix and having collapsible groups. Side tabs are OUT! I can't affort an Apple with a 30" LCD display yet.
#21
Moving to 6.x-dev.
#22
Well since 6.x is out and I personally would like to see this added in a more friendly way I will mark this for 7.x.
My viewpoint towards this would not to add a side bar but a horizontal group of dropdowns where admins could sort based on there criteria. Similar to how Views 2 handles finding views blocks/pages/etc... for drupal 6.