-
Notifications
You must be signed in to change notification settings - Fork 829
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
[Emotion] Convert EuiDataGrid (Part 1) #7998
Conversation
1b3e985
to
d7050d8
Compare
- move it to its own folder, it's a fairly top-level component in the DOM (similar to the controls/toolbar) - simplify some of its rendering logic to a separate util (allows less conditional hooks shenanigans). Also allows us to remove the duplicate `useEuiTablePaginationDefaults()` logic, which is already done once at the topmost EuiDataGrid level - clean up types - no need to have internal props in the top-level types file
+ requires vanilla Emotion CSS/classNames + delete variables, not used anywhere else and can be contained here
+ convert inline styles to logical CSS, clean up CSS slightly
- unfortunately loki doesn't screenshot scrollbars by default, but this at least helps with quick manual cross-browser QA
- Emotion `css` prop actually requires `className` under the hood to merge classes
d7050d8
to
48de274
Compare
💚 Build Succeeded
|
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.
🚢 🐈⬛ No visual regression were found and the code and improvements look good 👍
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.
[Pinning this here with loose relation]
The scrollbar tests across browsers went as expected (showing custom scrollbars or default ones) except for Safari which always shows the same static/non-overlaying ones it seemed. But that is Safari 🤷♀️
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.
Safari: the new IE11!
@@ -187,6 +188,7 @@ export const EuiDataGridBodyCustomRender: FunctionComponent< | |||
{...customGridBodyProps} | |||
className={classNames( | |||
'euiDataGrid__customRenderBody', | |||
className, |
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.
TIL. Thanks for the note on the required className
👍
Thank you so much for the quick review Lene! 🙇 |
Summary
Part of #6394. I'm splitting up EuiDataGrid into smaller chunks for ease of review/QA, but as always, I still recommend following along by commit.
Converts the following miscellaenous parts of EuiDataGrid to Emotion:
QA
Show scroll bars
setting toAlways
Automatically
)General checklist
- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)