-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Upgrade EUI to v94.1.0 (major EuiTable
refactors)
#180514
Conversation
EuiTable
refactors)
37746b5
to
7ac2663
Compare
35f8a43
to
32da71e
Compare
- same `false` behavior, but more extensible if needed
- now detected automatically in `columns`, there's no need to pass this prop manually
- as far as I can tell this util isn't used anywhere else, so I'm deleting it entirely
- this is now automatically detected by the presence of the `itemIdToExpandedRowMap` prop and no longer needs to be passed manually
- was confused about this as the condition for `itemIdToExpandedRowMap` wasn't the same as `isExpandable`, so I updated the row map to support both
- this is now automatically detected by the presence of the `selectable` prop and no longer needs to be passed manually
- basic validation against `selection` conditionals, if they existed - either way, this only affects responsive table views + remove unit test that no longer applies
- `isSelectable` now indicates whether the checkbox is disabled or enabled; `hasSelection` (new prop) determines visual checkbox affordance
- remove unnecessary props that already default to false - various syntax nits - small CSS fixes
- they no longer have styles attached to them and thus no longer do anything - replace with direct component usage instead (or in some cases remove if they're not doing anything)
- replace with custom CSS instead for now, with a comment
...bservability_solution/infra/public/components/asset_details/tabs/metadata/add_pin_to_row.tsx
Show resolved
Hide resolved
- now that EuiBasicTable's default actions supports passing the item to `href` as well as the click event to `onClick`
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.
Data Discovery changes LGTM 👍
src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.tsx
Show resolved
Hide resolved
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, @cee-chen! Looks good from my perspective. Approving.
@elastic/kibana-management: In testing, I noticed that the "Type" column is now truncated by default on the saved object page in stack management. This is due to the new addition of the sortable
icon that appends each sortable column header. Ya'll may want to increase the width of this column slightly so that the text isn't always truncated.
- `:first-child` CSS no longer works well since `EuiBasicTable` no longer adds a `<div>` wrapper around the `<table>` + additionally fix Errors table to align the pagination bar to the bottom, like the Transactions and Dependencies tables
…new sortable icon + use first custom `responsiveBreakpoint` to handle table with lots of columns!! 🎉
@MichaelMarcialis I went ahead and fixed that in this PR - let me know if this looks good to you, and also if you find any other similar issues! @jennypavlova Thank you so much for the help in getting Obs data into my local, I should have fixed all the issues in the screenshots in #180514 (review). I additionally fixed a small visual bug already in prod where the Also the Hosts overview table is now the first table to use the new |
👋 @elastic/security-entity-analytics One last ping for QA and review requests by EOD Thursday - we'll be asking for an admin merge if not. As always, even if you catch any visual bugs post-merge, the EUI team is more than happy to help quickly fix any issues after the fact. |
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.
Tested usage of EuiBasicTable for Lens. LGTM 👌🏼
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 🚀 @cee-chen Thank you very much for all the fixes! I tested it and all the tables 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.
Security Threat Hunting Explore - Relevant usages of EuiTable
tested, all good.
LGTM
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.
smoke-tested Search changes, LGTM!
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Widening actions column width. **Before** ![image](https://github.com/elastic/kibana/assets/22172091/cd39d806-4bf1-4697-a15b-ceede90bd730) **After** ![image](https://github.com/elastic/kibana/assets/22172091/6bf738a5-f110-4cf3-b530-e147341e1414) Also fixes similar issue with the annotations table in the anomaly explorer. Issue introduced in #180514
v93.6.0
⏩v94.1.0
Important
👋 Hello everyone - this is a special release containing
EuiTable
's conversion to Emotion, several long-overdue cleanups and breaking changes, and one or two fun new features. First, let's address the big questions:Q: I'm listed as a codeowner, how much should I manually QA/review?
Answer: It depends on what exactly in your code changed, but in general I would strongly suggest at least pulling this branch down and doing a quick visual smoke test of all tables (note: not datagrids) in your apps/plugins. You should not expect to see any major visual regressions.
If your table contained any kind of custom styling or behavior (e.g. custom CSS, etc.) I strongly recommend taking more time to QA thoroughly to ensure your table still looks and behaves as expected. Teams with very manual or specific updates will be flagged below in comment threads.
Q: When do I need to review by?
This PR will be merged after 8.14FF. Because this upgrade touches so many files and teams, we're aiming for asking for an admin merge by EOD 4/18 regardless of full approval status.
As always, you're welcome to ping us after merge if you find any issues later (see our FAQ), as you will have until 8.15FF to catch any bugs.
Q: What breaking changes were made, and why?
Here's a quick shortlist of all the changes made that affected the majority of the commits in this PR:
Removed several top-level table props
responsive
prop has been removed in favor of the newresponsiveBreakpoint
prop (samefalse
behavior as before)hasActions
,isSelectable
, andisExpandable
textOnly
Removed hidden mobile vs. desktop DOM
Previously, EUI would set classes that applied
display: none
CSS for content that was hidden for mobile vs. desktop. This is no longer the case, and content that only displays for mobile or only displays for desktop will no longer render to the DOM at all if the table is not in that responsive state.This is both more performant when rendering large quantities of cells/content, and simpler to write test assertions for when comparing what the user actually sees vs. what the DOM ‘sees’. (c3eeb08441e4b6efe6505e7cddaa87b540ddb259, 78cefcd954a7b46eaccd05e431b5e24dc86071a3)
Removed direct usages of table
className
sEuiTable
classNames
no longer have any styles attached to them, so some instances where Kibana usages were applying theclassName
for styles have been replaced with direct component usage or removed entirely (86ce80b).Custom table cell styles
Any custom CSS for table cells was previously being applied to the inner
div.euiTableCellContent
wrapper. As of this latest release, theclassName
andcss
props will now be applied directly to the outertd.euiTableRowCell
element. If you were targeting custom styles table cells, please re-QA your styles to ensure everything still looks as expected.Full changelog (click to collapse)
v94.1.0-backport.0
This is a backport release only intended for use by Kibana.
Bug fixes
EuiTableRowCell
s with therow
header scope (#7681)Accessibility
EuiBasicTable
andEuiInMemoryTable
's selection checkboxes to have unique aria-labels per row (#7672)v94.1.0
EuiTableHeaderCell
to show a subduedsortable
icon for columns that are not currently sorted but can be (#7656)EuiBasicTable
andEuiInMemoryTable
'scolumns[].actions[]
's to pass back click events toonClick
callbacks as the second callback (#7667)v94.0.0
EuiTable
,EuiBasicTable
, andEuiInMemoryTable
with a newresponsiveBreakpoint
prop, which allows customizing the point at which the table collapses into a mobile-friendly view with cards (#7625)EuiProvider
'scomponentDefaults
prop to allow configuringEuiTable.responsiveBreakpoint
(#7625)Bug fixes
EuiBasicTable
&EuiInMemoryTable
isPrimary
actions are now correctly shown on mobile views (#7640)mobileOptions
: (#7642)mobileOptions.align
is now respected instead of all cells being forced to left alignmenttextTruncate
andtextOnly
are now respected even if arender
function is not passedBreaking changes
EuiTableHeaderButton
component (#7621)responsive
prop fromEuiTable
,EuiBasicTable
, andEuiInMemoryTable
. Use the newresponsiveBreakpoint
prop instead (#7625)EuiBasicTable
orEuiInMemoryTable
for responsive table behavior to work correctly, and can be removed: (#7632)isSelectable
isExpandable
hasActions
showOnHover
prop fromEuiTableRowCell
/EuiBasicTable
/EuiInMemoryTable
'scolumns
API. Use the new actionscolumns[].actions[].showOnHover
API instead. (#7640)textOnly
prop fromEuiBasicTable
andEuiInMemoryTable
. Usecolumns[].textOnly
instead. (#7642)DOM changes
EuiTable
mobile headers no longer render in the DOM when not visible (previously rendered withdisplay: none
). This may affect DOM testing assertions. (#7625)EuiTableRowCell
now applies passedclassName
s to the parent<td>
element, instead of to the inner cell content<div>
. (#7631)EuiTableRow
s rendered by basic and memory tables now only render a.euiTableRow-isSelectable
className if the selection checkbox is not disabled (#7632)EuiTableRowCell
s withtextOnly
set tofalse
will no longer attempt to apply the.euiTableCellContent__text
className to child elements. (#7641)EuiTableRowCell
no longer renders mobile headers to the DOM unless the current table is displaying its responsive view. (#7642)EuiTableHeaderCell
andEuiTableRowCell
will no longer render in the DOM at all on mobile if their columns'mobileOptions.show
is set tofalse
. (#7642)EuiTableHeaderCell
andEuiTableRowCell
will no longer render in the DOM at all on desktop if their columns'mobileOptions.only
is set totrue
. (#7642)CSS-in-JS conversions
EuiTable
,EuiTableRow
,EuiTableRowCell
, and all other table subcomponents to Emotion (#7654)EuiTable
Sass variables: (#7654)$euiTableCellContentPadding
$euiTableCellContentPaddingCompressed
$euiTableCellCheckboxWidth
$euiTableHoverColor
$euiTableSelectedColor
$euiTableHoverSelectedColor
$euiTableActionsBorderColor
$euiTableHoverClickableColor
$euiTableFocusClickableColor
EuiTable
Sass mixins: (#7654)euiTableActionsBackgroundMobile
euiTableCellCheckbox
euiTableCell