[Discover] Decouple Field Statistics tab from Discover fields sidebar by refactoring how availableFields are used #140367
Labels
8.8 candidate
Feature:Discover
Discover Application
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:medium
Medium Level of Effort
refactoring
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Original comment #135678 (comment):
Update:
Currently we use a BehaviorSubject availableFields$ that's initialized in
use_saved_search.ts
, updated indiscover_sidebar_responsive
, and subscribed to changes infield_stats_table.tsx
.Initialization:
kibana/src/plugins/discover/public/application/main/hooks/use_saved_search.ts
Line 132 in 39d1934
Updated with the actual list:
kibana/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx
Line 192 in fcdcc2d
Consumed in FieldStatisticsTable:
kibana/src/plugins/discover/public/application/main/components/field_stats_table/field_stats_table.tsx
Line 138 in 7b36f54
This should be refactored to use
useExistingFieldsFetcher
in FieldStatisticsTable got get the available fields like it is done in #144412. The code inuse_saved_search.ts
can be removeddiscover_sidebar_responsive
https://github.com/elastic/kibana/blob/3e8d652dfbf46bfe647e5bfab56e23ac4ffe0ee4/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx#LL188C56-L188C80
The text was updated successfully, but these errors were encountered: