backdrop-contrib / gin

Admin theme with a strong focus on improving the Editorial Experience.
https://backdropcms.org/project/gin
GNU General Public License v2.0
5 stars 2 forks source link

List views page without disabled style #104

Closed olafgrabienski closed 6 months ago

olafgrabienski commented 8 months ago

Disabled views on the Views list page (admin/structure/views) look the same as enabled views. It would be nice to differentiate between them, so that disabled views are less prominent.

See the following screenshot where the "Promoted cards" view is disabled:

image

olafgrabienski commented 8 months ago

Maybe change opacity? Something like this:

table.views-list tr.disabled {
  opacity: 0.5;
}
table.views-list tr.disabled:hover,
table.views-list tr.disabled:focus-within {
  opacity: 0.85;
}
laryn commented 8 months ago

@olafgrabienski I was just thinking about this the other day! I think Drupal has disabled Views separated with a different table and its own header, which makes things pretty clear, and could be an alternative (core) issue which would improve it for all admin themes.

But if we stick with visuals that Gin can provide, I think opacity might be problematic from an accessibility/contrast point of view. I'll think on it a bit further. There is a custom property/variable for disabled background color, but I think it's not typically used on such a large swath of screen. Any thoughts on this?

CleanShot 2024-01-12 at 11 08 51@2x

CleanShot 2024-01-12 at 11 13 07@2x

olafgrabienski commented 8 months ago

Thanks for your reply, @laryn! I like the idea to put disabled views in a different table with an own header. There is even a core issue where the idea is discussed: https://github.com/backdrop/backdrop-issues/issues/4519 (needs more feedback, btw)

In the meatime, some visual indication for disabled views would definitely be helpful. When I disabled a view the other day, the first impression was it hadn't been disabled at all. And the variable for disabled background color would be better than nothing, in my opinion. (If it's feasible to adapt it a bit for larger spaces, even better.)

When I posted the opacity approach, I was aware of possible contrast issues. That's why I added the :hover and :focus-within part. It should make sure the contrast is high enough when you hover over (or tab into) a disabled row. Not sure if something like this is an eligible approach.

laryn commented 6 months ago

I am making a previous commit more broadly applicable for this use case, at least for now so there is a visual distinction on the disabled rows of tables generally.