Skip to content

[RAC] [TGrid] Field Browser migrated to modal#106541

Merged
semd merged 39 commits intoelastic:masterfrom
semd:timeline-euidatagrid
Aug 2, 2021
Merged

[RAC] [TGrid] Field Browser migrated to modal#106541
semd merged 39 commits intoelastic:masterfrom
semd:timeline-euidatagrid

Conversation

@semd
Copy link
Copy Markdown
Contributor

@semd semd commented Jul 22, 2021

Summary

Fields browser changed to use EuiModal instead of a custom popup.
Related to #105207

Captura de Pantalla 2021-07-22 a les 15 56 20

Checklist

@semd semd requested a review from a team as a code owner July 22, 2021 15:51

<Header
<EuiModal onClose={closeAndRestoreFocus} style={{ width, maxWidth: width }}>
<div data-test-subj="fields-browser-container" onKeyDown={onKeyDown} ref={containerElement}>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to create a new div, the EuiModal do not accept ref

@snide snide requested a review from a team July 22, 2021 17:58
@monina-n
Copy link
Copy Markdown

hi @semd! here are some observations from UX

Screen Shot 2021-07-22 at 12 57 04 PM

  1. Search box should be left-aligned with the rest of the content and should be the full width of the container
  2. Scroll bar should only appear when user is scrolling, Background of scroll bar should not be black but transparent
  3. Instead of table icon to select all fields in that category, use a checkbox in the header for the select all action

Screen Shot 2021-07-22 at 12 53 16 PM

  1. [Stretch]This might be out of scope for this PR as a quick fix, but we’re lacking a count of how many current fields are selected. It would be beneficial to find a place in the modal to display that.

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

Copy link
Copy Markdown
Contributor

@andrew-goldstein andrew-goldstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for migrating the Field Browser to a modal @semd! 🙏
Desk tested locally with tGridEnabled: true and tGridEnabled: false
LGTM

Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

`;

const FieldBrowserContainer = styled.div`
.euiToolTipAnchor {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

@semd semd Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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!

@semd
Copy link
Copy Markdown
Contributor Author

semd commented Jul 27, 2021

@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.
Thanks.

@semd
Copy link
Copy Markdown
Contributor Author

semd commented Jul 30, 2021

Hi @monina-n,
Point 1 and 2 are done. The search bar is fixed and the scrollbars replaced.
It looks much better indeed! 😊 Thanks for the comments.

modal

Regarding point 3, is not easy to do, because the component is currently using custom checkboxes instead of the selectionValue prop in the EuiInMemoryTable, to do so I would have to reimplement the whole selection-related code. If you consider it is very important I will do it, but if it is not I would leave it as it is, and retake this modal after FF.
Same for point 4.

@semd
Copy link
Copy Markdown
Contributor Author

semd commented Jul 30, 2021

@elasticmachine merge upstream

@semd
Copy link
Copy Markdown
Contributor Author

semd commented Aug 2, 2021

@elasticmachine merge upstream

@semd
Copy link
Copy Markdown
Contributor Author

semd commented Aug 2, 2021

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. Much better!

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 6.4MB 6.4MB +479.0B
timelines 242.5KB 241.9KB -607.0B
total -128.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
timelines 305.0KB 298.2KB -6.8KB
Unknown metric groups

Non-exported public API item count

id before after diff
timelines 26 25 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @semd

@semd semd merged commit 3832aeb into elastic:master Aug 2, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 2, 2021
* 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>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Aug 2, 2021
* 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>
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team Theme: rac label obsolete v7.15.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants