-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Upgrade to [email protected] [table typescript types] #52688
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
Conversation
lizozom
left a comment
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.
@elastic/kibana-app-arch LGTM
pgayvallet
left a comment
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.
LGTM for platform changes
walterra
left a comment
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.
ML/transform changes LGTM. Thanks for this update, this should allow us to get rid of our custom types in a follow up!
legrego
left a comment
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.
Security changes LGTM
weltenwort
left a comment
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.
infra changes LGTM - thank you!
| }; | ||
|
|
||
| const StyledEuiBasicTable = euiStyled(EuiBasicTable)` | ||
| const StyledEuiBasicTable: typeof EuiBasicTable = euiStyled(EuiBasicTable as any)` |
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.
Not pretty but I couldn't find a better way either 🤷♀️
|
Pinging @elastic/siem (Team:SIEM) |
smith
left a comment
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.
APM changes look good. 👍
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Summary
The two biggest changes here are icon snapshot updates (for accessibility, elastic/eui#2554) and typescript definitions for
EuiBasicTableandEuiInMemoryTable(elastic/eui#2428).When unifying Kibana's usage of eui tables with the new types, I avoided changes to run-time code, always preferring to mess only with the type definitions, usages, and in some cases avoiding the confusion with a
// @ts-ignore. The primary differences are:Itemeach row representsItem, and field rendering ensures the specified field exists on the item.Item. This, combined with TypeScript's lack of usage-based inference, led to a number of additionalas const.In addition, some apps (SIEM in particular) have defined a
Directionenum ofASC&DESCwhich caused problems in the sorting callbacks which expect the enum value, but the EUI table only guarantees a string literal of'asc' | 'desc'- TS enum values are nominally typed, as demonstrated by this typescript playground. I resolved those by updating the onSort callback to allowDirection | 'asc' | 'desc'.17.1.2Bug fixes
EuiCodeEditorcustom mode file error by initializing with existing mode (#2616)EuiIcondefault titles (#2632)17.1.1Bug fixes
EuiTreeViewand added truncation (#2627)17.1.0keyproperty inside theoptionsprop inEuiSelectableListcomponent (#2608)toolbarAdditionalControlsprop toEuiDataGridto allow for custom buttons in the toolbar (#2594)EuiBasicTable,EuiInMemoryTable, and related components (#2428)logoSecurityandappSecurityAnalyticsicons (#2613)Bug fixes
EuiDataGridwhen using keyboard shortcuts to paginate (#2602)EuiIconaccessibility by adding atitleprop and a defaultaria-label(#2554)EuiDataGrid's in-memory sorting of numeric columns when the cell data contains multiple digit groups (#2603)EuiBasicTable.paginationBaris hidden when there is no data andEuiPaginationis displayed even when there is only one page (#2598)EuiPopoverwas unmounted before calls to setState (#2614)