was getting annoying with some views with 30-40 fields listed and many of them set to excluded that i couldn't tell without editing each field which were excluded.
thought i would look at how hard to add a class to the field link in the UI to highlight that the field was excluded.. not sure if proper way to do this; but only took 10 min and 3 lines of code.. so i like it :)
basically adds the class 'views-field-excluded' and an entry for this class to admin.css
http://screencast.com/t/pqXMD5qFaVTl
- the red fields are set as excluded
sorry, patch is against 7.x-3.0-rc3 but could redo for -dev if any interest in committing this
Comment | File | Size | Author |
---|---|---|---|
#16 | views-1405648-16.patch | 1.14 KB | tim.plunkett |
#9 | overridden.png | 20.88 KB | dawehner |
#9 | overridden-seven.png | 11.3 KB | dawehner |
#8 | views-1405648-8.patch | 1.49 KB | tim.plunkett |
#4 | views-show-excluded-fields.patch | 1.38 KB | liquidcms |
Comments
Comment #1
liquidcms CreditAttribution: liquidcms commentedoops.. and the patch
Comment #2
dawehnerI think the problem with red is that users will think it's broken.
Maybe some font style would help more
This should probably belong into .theme.css
Comment #3
liquidcms CreditAttribution: liquidcms commentedyea, didn't like red much either... thought just lighter to show disabled.. but that isn't really a css thing. i can try a font style instead. i guess once the class is added admin themers can do it as they like.
was sure it would go in admin.css but i can move to theme.css
Comment #4
liquidcms CreditAttribution: liquidcms commentedthis patch sets as italic and adds class to .theme.css - it doesn't show up as well as the red; but easy enough to override now that the class gets assigned.
Comment #5
liquidcms CreditAttribution: liquidcms commentedand just fyi for others.. i added this:
.views-displays .views-field-excluded {font-style: normal; color: gray;}
to my admin theme css to override italic and set to grey as i find it easier to see than italic.
Comment #6
dawehnerAdd a tag
Comment #7
mgiffordSeems like a nice, easy piece of additional functionality. Gives more meaning to the admin who's trying to make sense of complexity.
Comment #8
tim.plunkettCleaned up the code a bit.
Comment #9
dawehnerHere is a screenshot of seven and bartik.
It looks a bit more clear on seven, though this is caused by the font size of bartik.
Comment #10
tim.plunkettTriggering the testbot.
Comment #11
tim.plunkettMy only worry is confusion with overridden sections.
https://skitch.com/plnktt/8ei1n/events-content-d7
However, I think italic makes sense here, and overridden should just be using something different. See #1112788: The broken chain icon means overridden? Not broken? for more on this.
Comment #12
liquidcms CreditAttribution: liquidcms commentedyea, certainly don't think we need an icon here. i prefer colour coded to italics... http://screencast.com/t/ek001sDqBYG
but as long as i can override (as is being done in that screenshot)
Comment #13
dawehnerWhat about using colors and italic?
I really like the different color, as it makes things really easy to spot.
Comment #14
tim.plunkettWe can combine both, but we definitely can't just do color for accessibility reasons.
Comment #15
mgiffordUsing colours isn't a problem. It's using colour as the only indication. If it's a matter of just italics or italics + colour then the latter wins. Assuming you've got sufficient contrast in the text. However, that's easy to do.
I think though it might be useful to get this patch in without colours first. The CSS class can be styled as folks like.
I think it might be useful to set up a new issue to think about colours & views. It's such a dense UI it would be useful to have more user queues to refer to. It might well do to think out how to best deal with this though as to not add confusion.
Comment #16
tim.plunkettWhat about just adding the class, with no style yet? If we need to go back and forth over this in the meantime, at least people can start using it in their admin themes.
Comment #17
mgiffordYup.. Makes sense to me. Thanks Tim!
Comment #18
tim.plunkettComment #19
dawehnerSmall steps are good, but i think if people should profit most, it has to be in the css itself.
Committed the patch to 7.x-3.x
Is there already another issue for color/italic discussion?
Comment #20
Everett Zufelt CreditAttribution: Everett Zufelt commentedThe current solution is a good start, however, there is no amount of CSS styling that will communicate semantics to someone using a screen-reader.
There is no semantic element that conveys the concept that we are working with here, so we would need to use a hidden .element-invisible annotation.
Comment #21
mgifford@dereine - thanks for committing this.
@Everett - Good point. So we're looking for some hidden text to be appended like "is excluded." How should it be conveyed to a screen reader?
Comment #22
liquidcms CreditAttribution: liquidcms commented@mike, @tim thanks for the push on this
@dereine thanks for getting this committed
does seem a bit odd to not have any css go with it as no one other than the handful of people stumbling upon this post will know it is possible to "enable" this feature, but i guess all in good time.
Comment #23
mgiffordSo this is fixed I assume.