[RAC] [TGrid] Field Browser migrated to modal#106541
Conversation
…into timeline-euidatagrid
|
|
||
| <Header | ||
| <EuiModal onClose={closeAndRestoreFocus} style={{ width, maxWidth: width }}> | ||
| <div data-test-subj="fields-browser-container" onKeyDown={onKeyDown} ref={containerElement}> |
There was a problem hiding this comment.
had to create a new div, the EuiModal do not accept ref
|
hi @semd! here are some observations from UX
This is a question for the future, but we should discuss the differences in performance of [1] selecting a field and having it load immediately in the table vs [2] selecting all the fields in the preferred configuration and having some type of “apply” button to update the table all at once. Both options are viable but whatever has the best performance would be the best choice for the user. cc @elastic/security-design |
...ugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.tsx
Outdated
Show resolved
Hide resolved
andrew-goldstein
left a comment
There was a problem hiding this comment.
Thanks for migrating the Field Browser to a modal @semd! 🙏
Desk tested locally with tGridEnabled: true and tGridEnabled: false
LGTM
There was a problem hiding this comment.
Thanks for breaking this out into a modal. Yell if you want a primer on how to make some of these changes using EUI, otherwise I tried to mark up the changes I'd make below. All of these are pretty minor, but will clean stuff up a lot.
There's some smaller stuff (around the timeline changes here) that is out of scope I can submit a design PR to cleanup after this merges.
x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/search.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/search.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/search.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/field_browser.tsx
Show resolved
Hide resolved
x-pack/plugins/timelines/public/components/t_grid/toolbar/fields_browser/field_browser.tsx
Show resolved
Hide resolved
| `; | ||
|
|
||
| const FieldBrowserContainer = styled.div` | ||
| .euiToolTipAnchor { |
There was a problem hiding this comment.
There's a lot going of overwriting of EUI here that I think doesn't need to happen. I know this is part of the actual timeline itself, not the modal, so I think we should cover it in another PR. I'll try to find some time outside of this PR to clean it up a bit.
As just a general rule of thumb, we normally want to write additive selectors rather than do base overwrites. Looking at the code, most of this can be fixed with some flexgroup and button icon props.
There was a problem hiding this comment.
@snide I agree this is messy. But this was done as a "temporary patch" to show timelines' button in security solutions. Later on we'll use the same component and this will be cleaned.
The rest of the comments are fixed in the last commit.
Thanks!
|
@snide Okay, yes makes sense. I am pretty busy with another topic right now, as soon as I have some time I'll do this changes. |
|
Hi @monina-n, Regarding point 3, is not easy to do, because the component is currently using custom checkboxes instead of the |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
snide
left a comment
There was a problem hiding this comment.
Thanks for the updates. Much better!
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @semd |
* tGid header using EuiDataGrid * useFetchIndex migrated and column_headers refactor * removed useless mock * add badges translations * i18n translations keys fixed * code format * filter default columns not present in field browser * reset button to initial columns * cleaning * dependencies moved * fix functional test with missing data service * remove unused code (unrelated) * fieldBrowser integration with security solutions timeline * lint and translations cleaned * timeline toolbar removed for merge & some test fixes * type fix * type fixes * timeline static default colums * limit size temporary increase * limit size temporary increase * field browser migrated to modal * field browser header remaned to search * commented code removed * toolbar index removed * security solutions field browser button custom styles * bring back FieldsBrowserContainer * UI fixes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
* tGid header using EuiDataGrid * useFetchIndex migrated and column_headers refactor * removed useless mock * add badges translations * i18n translations keys fixed * code format * filter default columns not present in field browser * reset button to initial columns * cleaning * dependencies moved * fix functional test with missing data service * remove unused code (unrelated) * fieldBrowser integration with security solutions timeline * lint and translations cleaned * timeline toolbar removed for merge & some test fixes * type fix * type fixes * timeline static default colums * limit size temporary increase * limit size temporary increase * field browser migrated to modal * field browser header remaned to search * commented code removed * toolbar index removed * security solutions field browser button custom styles * bring back FieldsBrowserContainer * UI fixes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
* tGid header using EuiDataGrid * useFetchIndex migrated and column_headers refactor * removed useless mock * add badges translations * i18n translations keys fixed * code format * filter default columns not present in field browser * reset button to initial columns * cleaning * dependencies moved * fix functional test with missing data service * remove unused code (unrelated) * fieldBrowser integration with security solutions timeline * lint and translations cleaned * timeline toolbar removed for merge & some test fixes * type fix * type fixes * timeline static default colums * limit size temporary increase * limit size temporary increase * field browser migrated to modal * field browser header remaned to search * commented code removed * toolbar index removed * security solutions field browser button custom styles * bring back FieldsBrowserContainer * UI fixes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>



Summary
Fields browser changed to use
EuiModalinstead of a custom popup.Related to #105207
Checklist