-
Notifications
You must be signed in to change notification settings - Fork 7
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
Added style to table representation #17
Conversation
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.
These changes are nice! I like the colors and the highlighting.
I'm seeing some slight weirdness with building the docs for an as-yet-unreleased package I'm working on, I'll follow up with you separately on what I'm seeing there.
I am by no means a css expert, but I've added some comments that I think should help limit the changes to affect dataframes only.
I have added a few more comments. I like what you've done with the comments and adding in specific sections for different types of tables, it's a bit more verbose but I think it's the right way to go. I have only tested the |
I typically use sphinx tables and I think these tables look excellent. Nice work @germa89 (and by extension, @RomanIlchenko1308 who I think helped inspire this work with VM examples). |
In PyMAPDL you can find:
If this theme modification is successful I guess we will get rid of formatted dataframes, in favour of plain dataframes which will inherit the settings (colors, etc) from the theme. I think disregarding the coloring issue with the dataframe odd rows, we are good to go. |
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.
Thank you @germa89, the changes look good! I ran a build of the Granta docs based on this branch, and the dataframe outputs look great. Good to merge.
Hi @germa89 and @Andy-Grigg, At first, I would like to thank you guys for your work, it looks nice!!! I am writing this comment because, I have accidentally discovered weird behavior of the highlighting the rows when you select some rows in the data frame on the Non-available Commands it is not an issue, but, it looks weird a bit for me: that we have a connectivity (highlighting selections) of the first row and the index column with column, as you can see below: But, if you move your mouse down, we have just a partial hover selection of the columns but without indexing column as you can see it below: And if you are going to zoom away and see how it looks like, you can see it below: My question: If I am wrong, please write me) |
I think the issue is caused by the merged rows, and I'm not really sure what the best option is to fix it. The first column is taking the color of the row that it starts on. The same thing is happening when it highlights as well. I don't think there's much we can do to make the first column highlight correctly, because the CSS can only ever highlight a cell all the same color. I think all we can do is not highlight tables with merged cells, but I don't know if that's possible. @germa89, any thoughts? |
We could create a class for non-highlighted tables if needed, so we leave it at the writer if he wants that behavior or not. Other than that, I do not think I can fill the color issue. It is way beyond my expertise. I could try, but the amount of time required vs reward, it is very low. I would leave it as it is. Or if @RomanIlchenko1308 wants to implement the non-highlighted class, I'm happy to review them. |
Hi there
Since we would like to use Pandas DataFrame to present data in PyMAPDL documentation, I thought we might as well include the style in the Pyansys Theme.
The proposal is shown as this:
I'm happy to do any changes you might propose. I just tried the colors align with Ansys color theme.