Active
Project:
Drupal core
Version:
main
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2015 at 13:03 UTC
Updated:
21 Jul 2020 at 04:58 UTC
Jump to comment: Most recent
The 'Add views row classes' option in views format settings does not change the output of the view, as documented in #4. The markup is the same whether this is on or off.
Assuming that not adding row classes is the expected behaviour (based on #6), remove this option from the UI.
Remove this checkbox from the UI.
n/a
n/a
Original IS:
When using the "Table" style plugin, the default_row_class setting is not respected and the classes are not added as expected. I would expect something like views-row-n, views-row-last etc
Add back the classes that used to be there in D7.
Review the proposed approach + write tests.
| Comment | File | Size | Author |
|---|---|---|---|
| views-row-table-classes.patch | 1.03 KB | benjy |
Comments
Comment #1
benjy commentedComment #2
dawehnerSo I'm confused: Didn't removed them as CSS 3 can cover all those usecases and we can rely on CSS 3?
Comment #3
benjy commentedWell sure CSS3 can cover most of that but what confused me is that the docs in the modal say that the classes will be added:
Maybe this issue should be a minor doc fix if the consensus is to remove those classes entirely? Although, they're behind a checkbox, I don't see any harm in keeping them.
Comment #4
jabberwooki commentedThe described problem is not limited to the table style format. Additional tests made (in collaboration with masdongar) on the "Add views row classes" checkbox in the Format setttings popup windows give the following heterogeneous results.
1 - Table
Checking/Unchecking has no effect. In both cases, html structure is
2 - Unformatted list
Checked box generates a "views-row" class.
Unchecked
Checked
3 - HTML list
No difference. Html structure is
4 - Grid
Checked box generates a "row-[row number]" class.
Unchecked
Checked
From this point, there are two possible solutions :
- The Drupal community definitely wants to remove class names generation and let CSS3 do the job. So a patch is needed to prevent Unformated list and Grid formats to generate the class names, and to remove the checkbox from the UI.
- The 4 views formats keep on generating their classes, but the checkbox's default value is unchecked. Patch is needed so that Table and HTML list formats generate their respective classes as well.
Comment #6
dawehnerSo the only problem here is the missing
views-rowclass? We certainly don't want to add the numbered css classes back. CSS3 totally solves that for us.Comment #7
duaelfrPer #4 I think it's more about consistency.
Having a checkbox that sometimes do something and sometimes not do not send a good signal to the site builders. As we cannot remove it now D8 landed, I suggest that we fix it.
Comment #15
pameeela commentedComment #16
pameeela commentedComment #17
pameeela commented