-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
feat: Uses new table component in Drill to Detail #22173
feat: Uses new table component in Drill to Detail #22173
Conversation
7b041c6
to
9d24766
Compare
9d24766
to
c146e73
Compare
@eric-briscoe I noticed an error in the browser console when paginating. It seems an internal table error. Can you check? |
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.
Overall looks great! I left one set of comments about testing bad values for data cell which I think would be worthwhile.
expect(screen.getByText('2022-01-01')).toBeInTheDocument(); | ||
}); | ||
|
||
test('renders with number', async () => { |
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.
@michael-s-molina can we add tests that pass a mixture of null | undefined| invalid time formats as we as mix of invalid DATE values to ensure the cell renderer does not throw runtime error and break app in case a single row has bad / missing data? I think we want to make cell renderers fault tolerant especially when doing error prone translations like dates. antd does not give us an error protection on cell rendering so we have to make sure our cell renderers do not throw error that will break the render loop for entire table component / app
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.
Good idea. Added ✅
const timeFormatter = getTimeFormatter(format); | ||
return <span>{timeFormatter.format(value)}</span>; |
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.
@michael-s-molina pairing this with comment on superset-frontend/src/components/Table/cell-renderers/TimeCell/TimeCell.test.tsx for testing with bad data formats / formats value mismatch to make sure we are handling any potential errors due to bad dat values for a row
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.
👍🏼
Codecov Report
@@ Coverage Diff @@
## master #22173 +/- ##
==========================================
+ Coverage 66.86% 66.89% +0.03%
==========================================
Files 1840 1845 +5
Lines 70160 70281 +121
Branches 7657 7683 +26
==========================================
+ Hits 46909 47012 +103
+ Misses 21281 21277 -4
- Partials 1970 1992 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up |
@geido Ephemeral environment spinning up at http://35.92.48.144:8080. Credentials are |
/testenv up FEATURE_DRILL_TO_DETAIL=true |
@geido Ephemeral environment spinning up at http://52.41.165.144:8080. Credentials are |
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.
{ label: t('Formatted value'), value: 'formatted' }, | ||
]} | ||
value={ | ||
timeFormatting[column] === 'original' ? 'original' : 'formatted' |
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.
What do you think about using an Enum for these two values?
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.
Done ✅
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 looks great! One issue I'm seeing is that the fixed-height table doesn't play well with the adjustable-height modal:
Is there any way to make the table adjustable height, so it fills the modal vertically when expanded and leaves the pagination controls visible when minimizing? If not, should we maybe make the modal height fixed to match the fixed height of the table?
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
Uses the new table component in Drill to Detail to benefit from virtualization and deal with tables with many columns.
It also extends the new Table component with new cell and header renderers.
@eric-briscoe
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-11-28.at.10.03.11.AM.mov
Screen.Recording.2022-11-28.at.9.58.38.AM.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION