Posted by dawehner on February 19, 2012 at 11:25am
2 followers
| Project: | Views |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Issue Summary
Currently the grouping options are shown all the time, though this is a) quite confusing b) it's not really clear that this options are connected with the grouping field just by looking at it visually.
What about adding a dependency for a selected field.
Here are some screenshot
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| grouping.png | 10.76 KB | Ignored: Check issue status. | None | None |
| grouping1.png | 22.88 KB | Ignored: Check issue status. | None | None |
Comments
#1
Here is a small patch doing it.
#2
Dreditor likes the patch. Code seems fine so far ;-) Thanks dereine!
Tested on views latest --dev here on a Drupal 7.12 Ubuntu testing stage with no errors. And I assume that it works as expected. If there is no field selected, the two other options below (Use rendered output to group rows and Remove tags from rendered output are not shown until a field is selected to group. Perfect.
Additional comment: But what I still worry for usability experience initiative is an intuitive understandable description for the way the user can prevent the field showing twice, if it is used for grouping. This is not obvious from the two descriptions at the two checkable options, how to achieve this. 1.) The user could be missleaded from the term "tags" and, 2.) since he is not on the edit point of the field itself where he can exlude it from display, he will still see the field twice, no matter if he checks the Use rendered output option or not. Only the experienced user knows, that he has to check the first option, even if he doesn't see the final result yet, and has to go into the single field edit afterwards to "exclude it from display" to achieve the final result. In the case you don't like the longer description, ignore the attached patch below.
But as I sad, the patch at its own works and the code is clean. So, RTBC from me.
dereine++
#3
*grmf *...
removed additional white space in the description.
By that chance I made the text a little shorter and added patch version.
Sorry
(not sure about the use of the terminus "checked" here. We may should prever "enabled".)
#4
'#description' => t('If enabled the rendered output of the grouping field is used to group the rows. To prevent the field showing twice, it should be checked and the field should be set to -excluded from display- in the field edit form.'),Beside the fact that your patch doesn't apply i think it would make more sense to add this description to the select not to the group rendered checkbox, as this checkbox sets whether you want to group by the actual value in the DB or by the rendered output.
#5
Okay commited without the new description. Maybe create an additional issue if the description should be added.
#6
Not sure if I would move the description elsewhere. I would leave it exactly there where the checkbox affects the described scenario. But you are right: maybe this should be discussed in another issue.