-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for classes, rowspan, colspan and attributes on row headers #1367
Conversation
84060f2
to
cfb673d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix with some good cleanup 👍
Test restructuring is very difficult to review, but I'm assuming they passed before you restructured them? In future might be better to do that kind of refactoring separately.
Happy to split the last two commits out into a separate PR if you prefer? |
I think it's up to you depending on how confident you are about the new tests. |
cfb673d
to
03550eb
Compare
👍 I've split that work out and will raise another PR once this has been merged. |
03550eb
to
3e3351a
Compare
We used to append a scope="row" to the first table cell in a row, which we did by branching on whether loop.first was true. This was later removed (as scope is only valid on td elements) but the logic was not.
This change allows you to pass classes, rowspan, colspan and attributes to the first cell in each row when
firstCellIsHeader
istrue
.It also simplifies the logic of the table template, and tidies up the tests to use a single assertion per test, improve coverage and use a consistent format.(Split into a future PR)Fixes #1261