Repository navigation
[DataGrid] Light refactor - #5008
Merged
Merged
Conversation
Contributor
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5008/ |
thompsongl
self-requested a review
August 9, 2021 18:06
thompsongl
approved these changes
Aug 12, 2021
thompsongl
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
Clicked and tabbed around the various examples without any apparent changes.
| import { EuiTablePagination } from '../table/table_pagination'; | ||
| import { EuiDataGridPaginationRendererProps } from './data_grid_types'; | ||
|
|
||
| export const EuiDataGridPaginationRenderer = ({ |
chandlerprall
left a comment
Contributor
There was a problem hiding this comment.
I have a full dive on data_grid.tsx's changes still, but all of this looks great. Particularly the better a11y usage, but readability refactor++ ❤️
chandlerprall
approved these changes
Aug 18, 2021
chandlerprall
left a comment
Contributor
There was a problem hiding this comment.
LGreatTM! Spot checked, tested locally, and also built Kibana to uan the type checker & jest tests for ml+discover - all with no issues
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This refactor doesn't refactor any of the underlying logic, rather it moves things around to better encapsulate concerns.
Why?
Having not thoroughly looked at DataGrid in some months, I found it difficult to wrap my head around all the pieces that I needed to look at to make a change. By drawing more boundary lines between concerns, hopefully this should make it easier to reason about where you should begin to make a change.
Major changes
data_grid_typesheaderfolderbodyfolderMinor changes
(Future) TODO
This work could be taken a lot further but I figured this was enough of a first step to test the waters and see if people like it. Both the DataGrid and DataGridBody components are particularly long and complex and the types file is somewhat unwieldy.
Checklist
There weren't any feature changes but I checked that everything still renders as expected