-
Notifications
You must be signed in to change notification settings - Fork 428
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
(Alt.) Refactor BoundColumn attributes to allow override of class names. #349 #370
Conversation
|
||
return attrs | ||
|
||
def get_td_class_name(self, td_attrs): |
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.
shouldn't this be get_td_class_names
or just get_td_class
?
Thanks for working on this secont option, I think I like this one better, API is simpler. Not totally sure about:
|
I fixed the things you mentioned and added more documentation. I agree with your third point, it is still a bit weird to have a completely different API for this. I was also thinking about how we could get this into the attributes, but the only option I saw would be to allow passing a function (or lambda) into that, which is also a bit messy. |
At least with this version the (eventual) removal of the name class and migration path is very clear. We just have to remove the line |
Decided to merge, thanks @graup! |
I just did a pre-release of 2.0.0 with version 2.0.0a0. Please help by testing and report any issues. |
Related issue: #349
Original PR: #367
So now I added
Table.get_column_class_names
which gets the original set of class names (parsed from column attributes) as well as the bound column to replicate the old behavior but allow to override it.This might still need a bit more documentation, I think.