Skip to content

Commit

Permalink
[Discover][DocViewer] Convert EuiTable to EuiDataGrid. Enable up to 5…
Browse files Browse the repository at this point in the history
…00 fields per page. (elastic#175787)

- Closes elastic#174745

## Summary

This PR converts Doc Viewer table into EuiDataGrid to use its actions
functionality.

<img width="703" alt="Screenshot 2024-05-17 at 20 18 44"
src="https://github.com/elastic/kibana/assets/1415710/10d8a7b0-8fe1-4908-a11d-5fd374eed4c3">
<img width="577" alt="Screenshot 2024-05-17 at 18 17 49"
src="https://github.com/elastic/kibana/assets/1415710/7e6f05ce-9690-48ab-84c0-f8776e360f83">
<img width="490" alt="Screenshot 2024-05-17 at 18 18 05"
src="https://github.com/elastic/kibana/assets/1415710/b36c64de-419d-425c-9890-8bc346059c1a">
<img width="871" alt="Screenshot 2024-05-22 at 15 22 31"
src="https://github.com/elastic/kibana/assets/1415710/92c894f3-91f8-445c-b6fb-ba8842dd3b23">


## Testing

Some cases to check while testing:
- varios value formats
- legacy table vs data grid
- doc viewer flyout vs Single Document page

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
  • Loading branch information
6 people authored and seanrathier committed Jun 21, 2024
1 parent 9def784 commit 30e1c22
Show file tree
Hide file tree
Showing 54 changed files with 1,849 additions and 1,300 deletions.
4 changes: 0 additions & 4 deletions packages/kbn-field-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ export {

export { FieldIcon, type FieldIconProps, getFieldIconProps } from './src/components/field_icon';
export { FieldDescription, type FieldDescriptionProps } from './src/components/field_description';
export {
FieldDescriptionIconButton,
type FieldDescriptionIconButtonProps,
} from './src/components/field_description_icon_button';

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export class DocViewerTab extends React.Component<Props, State> {
!isEqual(nextProps.renderProps.hit.raw.highlight, this.props.renderProps.hit.raw.highlight) ||
nextProps.id !== this.props.id ||
!isEqual(nextProps.renderProps.columns, this.props.renderProps.columns) ||
nextProps.renderProps.decreaseAvailableHeightBy !==
this.props.renderProps.decreaseAvailableHeightBy ||
nextState.hasError
);
}
Expand Down
Loading

0 comments on commit 30e1c22

Please sign in to comment.