-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(data-table): update position of th cells to preserve border in Firefox #4822
fix(data-table): update position of th cells to preserve border in Firefox #4822
Conversation
Deploy preview for the-carbon-components ready! Built with commit 9a412f8 https://deploy-preview-4822--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react ready! Built with commit 9a412f8 https://deploy-preview-4822--carbon-components-react.netlify.com |
Deploy preview for carbon-elements ready! Built with commit 9a412f8 |
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.
Thanks @jendowns for jumping in! One question; Did you see there is no element with position:absolute
in those table columns? I'm asking this PR seems to change the position calculation logic of such position:absolute
elements if there is.
Hey @asudoh -- no, I didn't see absolutely-positioned descendants of these cells. Just text and icons 👍 (EDIT: but to clarify, I'm only testing use cases I'm aware of, namely those shown in the storybook... do you know the purpose of the |
I see, the history shows #2289, so if you can quickly test it's not broken I think we can go forward! |
Hey @asudoh, haha yes the first thing I did was check the git history 😅 The specific commits associated with these lines appear to all be related to "motion" updates, but again: there's no absolutely positioned descendants that I can see. What I meant by my edited comment above: I'm only aware of the use case I see in the storybook. Is there another circumstance, where an absolutely positioned element maybe be added to either th cell, that I'm not aware of? Thank you! |
Thanks @jendowns - To your question I don't have a good idea. If we want to dig more about this area... My question would be if you have more details on why you thought |
Oh I see what you mean @asudoh -- Personally anytime I see
And if I'm not mistaken, I don't believe the spec has been updated for |
packages/components/src/components/data-table/_data-table-core.scss
Outdated
Show resolved
Hide resolved
Thank you @joshblack I just updated the formatting of my comments! Maybe something that references less of one "effect" (i.e., "Required to preserve borders") and more of the cause? Like this:
Too much? |
@jendowns always down to include more info over less, to be honest, but this is 100% my personal preference haha. Especially if it's something crazy like this. |
One quick note to reviewers, this is observable in Firefox 👍 |
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.
Looks great! Would love to see your additional comments too, @jendowns if you wanted to add them
Thank you @joshblack! Just updated the comment to include those details 👍 |
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.
💯 explanation - Thanks @jendowns!
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.
Thanks Jen. Good PR
Partially resolves style issue 5 identified in #2330
If you look at the "selection" data table 🚨 in Firefox 🚨, there is something off about the first th (checkbox) and last th (
:last-of-type
) -- http://react.carbondesignsystem.com/?path=/story/datatable--with-selectionThere's a 1px overflow when nothing is selected...
And then no border when items are batch selected...
So this PR proposes changing the position of those
th
elements fromposition: relative
to the default,position: static
. I explicitly changed it tostatic
, rather than just removing the rule, because I think it's useful in this case to be explicit + include a note so anyone who comes along later understands the reasoning.Changelog
Changed
static
for checkboxth
andth:last-of-type
in heading row