-
Notifications
You must be signed in to change notification settings - Fork 324
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
Implement @smeragoel's table designs #1757
Conversation
The preview build has been checked by @smeragoel. This PR is now ready for review. |
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.
self review
), | ||
"data-table-inner-border": ( | ||
"light": #{map-deep-get($color-palette, "gray", "200")}, | ||
"dark": #364150, |
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.
I tried using one of the theme colors, but none of them looked as good to me as the one that @smeragoel picked out, which is labeled in Figma as foreground/light/muted-old.
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.
This works for me. IIRC, I had to slightly tweak a couple of colours as I worked on the implementation of the colour palette to meet contrast requirements here and there and this was one of the colours I ended up having to modify 👍🏽 as long as we have this as a global variable and not an ad hoc colour in a stylesheet I think this is good.
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## IPyWidget" |
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.
I edited this example notebook to add a pandas data table inside of an ipywidget to help us catch issues like #1740 in the future.
Had a quick nosey and I have a couple questions
|
Replies to above questions:
I admit it doesn't look great but it is intentional. I applied the If you don't apply the cell-output-background mixin with the light gray background, then you're not going to see the black text "Hello" because ipywidgets isn't styled for dark mode—it assumes a light background. There's really no way around this. If we want to follow the existing dark/light mode conventions in the stylesheets and we want to apply these new styles to Pandas data tables that appear inside of ipywidgets, then we are going to end up with this dark-light-dark layering in dark mode. There are only three ways I see around it:
|
Failed checks unrelated, see #1772 |
Not sure about the failing codecov/project check... |
), | ||
"data-table-inner-border": ( | ||
"light": #{map-deep-get($color-palette, "gray", "200")}, | ||
"dark": #364150, |
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.
This works for me. IIRC, I had to slightly tweak a couple of colours as I worked on the implementation of the colour palette to meet contrast requirements here and there and this was one of the colours I ended up having to modify 👍🏽 as long as we have this as a global variable and not an ad hoc colour in a stylesheet I think this is good.
Yes, that is what I was referring to. While this does not look as nice or polished as the other tables, reading the alternatives for aligning the style makes them seem more hacky/problematic than the current style mismatch, so we can leave them as they are for now (they are already much better than they were before, anyway).
This would be perhaps the best solution. The linked issue does not have any follow-ups or responses, so perhaps we should discuss it internally and see if we can offer some time/capacity to make this move forward WDYT @gabalafou? |
* Implement @smeragoel's data table designs * Working for nbsphinx (plus inside ipywidget) * Add outer and column borders to data table * Rename color vars * Extend data-table styles to all tables * Apply suggestions from code review
Designs at Quansight-Labs/czi-scientific-python-mgmt#50
Some preview URLs with
<table>
elements to check: