Skip to content
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

[Discover][UnifiedFieldList] Integrate unified field list sections into Discover #144045

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Oct 26, 2022

Issue #135678

Summary

This PR continues the work started in #142758 to bring field list grouping from Lens into Discover.

  • Integrate new components and hooks into Discover page
  • Refactor fields grouping logic
  • Render Popular fields under a new separate section
  • Remove "Hide empty fields" switch
  • Refactor fields existence logic
  • Adjust filtering logic
  • Clean up, tests, tbd

Checklist

This branch was based off #142758

jughosta and others added 30 commits October 5, 2022 14:16
…d-list-sections

# Conflicts:
#	x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx
…d-list-sections

# Conflicts:
#	src/plugins/unified_field_list/public/components/field_list/field_list_grouped.scss
#	src/plugins/unified_field_list/public/components/field_list/fields_accordion.tsx
#	src/plugins/unified_field_list/public/components/field_list/no_fields_callout.test.tsx
#	src/plugins/unified_field_list/public/components/field_list/no_fields_callout.tsx
#	x-pack/plugins/lens/public/data_views_service/loader.test.ts
#	x-pack/plugins/lens/public/data_views_service/loader.ts
#	x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx
#	x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx
#	x-pack/plugins/lens/public/datasources/form_based/dimension_panel/dimension_panel.test.tsx
#	x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_input.test.tsx
#	x-pack/plugins/lens/public/datasources/form_based/dimension_panel/field_select.tsx
#	x-pack/plugins/lens/public/datasources/form_based/dimension_panel/reference_editor.tsx
#	x-pack/plugins/lens/public/datasources/form_based/field_list.scss
#	x-pack/plugins/lens/public/datasources/form_based/field_list.tsx
#	x-pack/plugins/lens/public/datasources/form_based/fields_accordion.test.tsx
#	x-pack/plugins/lens/public/datasources/form_based/fields_accordion.tsx
#	x-pack/plugins/lens/public/datasources/form_based/no_fields_callout.test.tsx
#	x-pack/plugins/lens/public/datasources/form_based/no_fields_callout.tsx
#	x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts
#	x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/field_inputs.tsx
#	x-pack/plugins/lens/public/indexpattern_datasource/field_list.scss
#	x-pack/plugins/lens/public/indexpattern_datasource/fields_accordion.tsx
#	x-pack/plugins/lens/public/indexpattern_datasource/no_fields_callout.test.tsx
#	x-pack/plugins/lens/public/indexpattern_datasource/no_fields_callout.tsx
@jughosta jughosta force-pushed the 135678-unified-field-list-sections-in-discover branch from b23f625 to 616d155 Compare November 2, 2022 12:26
@kibana-ci
Copy link
Collaborator

kibana-ci commented Nov 2, 2022

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #27 / dashboard app - group 3 dashboard time picker Timepicker respects dateFormat from UI settings
  • [job] [logs] FTR Configs #47 / dashboard app - group 3 dashboard time picker Timepicker respects dateFormat from UI settings
  • [job] [logs] FTR Configs #47 / dashboard app - group 3 dashboard time picker Timepicker respects dateFormat from UI settings
  • [job] [logs] FTR Configs #27 / dashboard app - group 3 dashboard time picker Timepicker respects dateFormat from UI settings
  • [job] [logs] FTR Configs #27 / dashboard app - group 3 dashboard time picker Timepicker start, end, interval values are set by url
  • [job] [logs] FTR Configs #47 / dashboard app - group 3 dashboard time picker Timepicker start, end, interval values are set by url
  • [job] [logs] FTR Configs #47 / dashboard app - group 3 dashboard time picker Timepicker start, end, interval values are set by url
  • [job] [logs] FTR Configs #27 / dashboard app - group 3 dashboard time picker Timepicker start, end, interval values are set by url
  • [job] [logs] FTR Configs #37 / discover app adhoc data views search results should be different after data view update
  • [job] [logs] FTR Configs #37 / discover app adhoc data views search results should be different after data view update
  • [job] [logs] FTR Configs #37 / discover app discover data grid doc table add and remove columns should remove columns from the table
  • [job] [logs] FTR Configs #37 / discover app discover data grid doc table add and remove columns should remove columns from the table
  • [job] [logs] test/functional/config.firefox.js / discover app discover data grid field data tests field data doc view should show @timestamp and _source columns
  • [job] [logs] FTR Configs #37 / discover app discover data grid field data tests field data doc view should show @timestamp and _source columns
  • [job] [logs] FTR Configs #37 / discover app discover data grid field data tests field data doc view should show @timestamp and _source columns
  • [job] [logs] test/functional/config.firefox.js / discover app discover data grid field data tests field data doc view should show @timestamp and _source columns
  • [job] [logs] FTR Configs #37 / discover app discover data grid tests can add fields to the table
  • [job] [logs] FTR Configs #37 / discover app discover data grid tests can add fields to the table
  • [job] [logs] FTR Configs #37 / discover app discover integration with runtime fields editor allows adding custom label to existing fields
  • [job] [logs] FTR Configs #37 / discover app discover integration with runtime fields editor allows adding custom label to existing fields
  • [job] [logs] FTR Configs #37 / discover app discover uses fields API test adding a column removes a default column
  • [job] [logs] FTR Configs #37 / discover app discover uses fields API test adding a column removes a default column
  • [job] [logs] FTR Configs #37 / discover app index pattern with unmapped fields unmapped fields exist on a new saved search
  • [job] [logs] FTR Configs #37 / discover app index pattern with unmapped fields unmapped fields exist on a new saved search
  • [job] [logs] FTR Configs #37 / discover app index pattern with unmapped fields unmapped fields exist on an existing saved search
  • [job] [logs] FTR Configs #37 / discover app index pattern with unmapped fields unmapped fields exist on an existing saved search
  • [job] [logs] FTR Configs #38 / discover feature controls discover feature controls security no discover privileges "before all" hook for "shows 403"
  • [job] [logs] FTR Configs #20 / discover/classic discover doc table legacy add and remove columns should remove columns from the table
  • [job] [logs] FTR Configs #20 / discover/classic discover doc table legacy add and remove columns should remove columns from the table
  • [job] [logs] FTR Configs #20 / discover/classic discover uses fields API test adding a column removes a default column
  • [job] [logs] FTR Configs #20 / discover/classic discover uses fields API test adding a column removes a default column
  • [job] [logs] test/functional/config.firefox.js / discover/group1 discover tab field data shows top-level object keys
  • [job] [logs] FTR Configs #28 / discover/group1 discover tab field data shows top-level object keys
  • [job] [logs] test/functional/config.firefox.js / discover/group1 discover tab field data shows top-level object keys
  • [job] [logs] FTR Configs #28 / discover/group1 discover tab field data shows top-level object keys
  • [job] [logs] test/functional/config.firefox.js / discover/group1 discover tab with new fields API field data doc view should show @timestamp and Document columns
  • [job] [logs] FTR Configs #28 / discover/group1 discover tab with new fields API field data doc view should show @timestamp and Document columns
  • [job] [logs] test/functional/config.firefox.js / discover/group1 discover tab with new fields API field data doc view should show @timestamp and Document columns
  • [job] [logs] FTR Configs #28 / discover/group1 discover tab with new fields API field data doc view should show @timestamp and Document columns
  • [job] [logs] test/functional/config.firefox.js / discover/group1 discover tab with new fields API field data shows top-level object keys
  • [job] [logs] FTR Configs #28 / discover/group1 discover tab with new fields API field data shows top-level object keys
  • [job] [logs] test/functional/config.firefox.js / discover/group1 discover tab with new fields API field data shows top-level object keys
  • [job] [logs] FTR Configs #28 / discover/group1 discover tab with new fields API field data shows top-level object keys
  • [job] [logs] FTR Configs #28 / discover/group1 discover test managing fields should add a field, sort by it, remove it and also sorting by it
  • [job] [logs] FTR Configs #28 / discover/group1 discover test managing fields should add a field, sort by it, remove it and also sorting by it
  • [job] [logs] FTR Configs #28 / discover/group1 source filters should not get the field referer
  • [job] [logs] FTR Configs #28 / discover/group1 source filters should not get the field referer

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 895 885 -10
unifiedFieldList 32 49 +17
total +7

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
lens 583 580 -3
unifiedFieldList 117 190 +73
total +70

Async chunks

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

id before after diff
discover 416.6KB 414.3KB -2.3KB
lens 1.3MB 1.3MB -13.6KB
unifiedFieldList 20.4KB 34.0KB +13.6KB
total -2.3KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
unifiedFieldList 2 4 +2

Page load bundle

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

id before after diff
unifiedFieldList 15.8KB 21.5KB +5.7KB
Unknown metric groups

API count

id before after diff
lens 676 673 -3
unifiedFieldList 122 195 +73
total +70

async chunk count

id before after diff
unifiedFieldList 2 4 +2

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 57 63 +6
lens 20 19 -1
osquery 103 108 +5
securitySolution 439 445 +6
unifiedFieldList 9 13 +4
total +22

References to deprecated APIs

id before after diff
lens 31 16 -15
unifiedFieldList 30 40 +10
total -5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 65 71 +6
lens 23 22 -1
osquery 104 110 +6
securitySolution 516 522 +6
unifiedFieldList 9 13 +4
total +23

History

  • 💔 Build #84380 failed f557f74ff5ba0f55a0b14e1b46afca483471b83f
  • 💔 Build #84369 failed a3c28dc8fc9d6b1c4cc846cef94364894928c69d
  • 💔 Build #84298 failed 7a058975bc24afc89a2dfe91a6b870441f487e0f
  • 💔 Build #84069 failed 10f85b42885cc8ef41fc1ebe5aad34bd2cd14776

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

cc @jughosta

@jughosta
Copy link
Contributor Author

jughosta commented Nov 2, 2022

Closing in favor of #144412 with a cleaner diff.

@jughosta jughosta closed this Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application Feature:UnifiedFieldList The unified field list component used by Lens & Discover release_note:enhancement Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants