Skip to content

Commit

Permalink
[Discover] Initial clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Nov 21, 2024
1 parent e378c88 commit 7274d1e
Show file tree
Hide file tree
Showing 35 changed files with 66 additions and 2,232 deletions.
8 changes: 0 additions & 8 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,6 @@ Hides the "Time" column in *Discover* and in all saved searches on dashboards.
Highlights results in *Discover* and saved searches on dashboards. Highlighting
slows requests when working on big documents.

[[doctable-legacy]]`doc_table:legacy`::
deprecated:[8.15.0] Controls the way the document table looks and works.
To use the new *Document Explorer* instead of the classic view, turn off this option.
The *Document Explorer* offers better data sorting, resizable columns, and a full screen view.

[[truncate-max-height]]`truncate:maxHeight`::
The maximum height that a cell in a table can occupy. To disable truncation, set to 0.


[float]
[[kibana-ml-settings]]
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-discover-utils/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const CONTEXT_STEP_SETTING = 'context:step';
export const CONTEXT_TIE_BREAKER_FIELDS_SETTING = 'context:tieBreakerFields';
export const DEFAULT_COLUMNS_SETTING = 'defaultColumns';
export const DOC_HIDE_TIME_COLUMN_SETTING = 'doc_table:hideTimeColumn';
export const DOC_TABLE_LEGACY = 'doc_table:legacy';
export const DOC_TABLE_LEGACY = 'doc_table:legacy'; // TODO: remove
export const FIELDS_LIMIT_SETTING = 'fields:popularLimit';
export const HIDE_ANNOUNCEMENTS = 'hideAnnouncements';
export const MAX_DOC_FIELDS_DISPLAYED = 'discover:maxDocFieldsDisplayed';
Expand All @@ -26,5 +26,5 @@ export const SEARCH_ON_PAGE_LOAD_SETTING = 'discover:searchOnPageLoad';
export const SHOW_FIELD_STATISTICS = 'discover:showFieldStatistics';
export const SHOW_MULTIFIELDS = 'discover:showMultiFields';
export const SORT_DEFAULT_ORDER_SETTING = 'discover:sort:defaultOrder';
export const TRUNCATE_MAX_HEIGHT = 'truncate:maxHeight';
export const TRUNCATE_MAX_HEIGHT = 'truncate:maxHeight'; // TODO: remove
export const TRUNCATE_MAX_HEIGHT_DEFAULT_VALUE = 115;
2 changes: 1 addition & 1 deletion packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const DISCOVER_SHOW_MULTI_FIELDS_ID = 'discover:showMultiFields';
export const DISCOVER_SORT_DEFAULT_ORDER_ID = 'discover:sort:defaultOrder';
export const DOC_TABLE_HIDE_TIME_COLUMNS_ID = 'doc_table:hideTimeColumn';
export const DOC_TABLE_HIGHLIGHT_ID = 'doc_table:highlight';
export const DOC_TABLE_LEGACY_ID = 'doc_table:legacy';
export const DOC_TABLE_LEGACY_ID = 'doc_table:legacy'; // TODO: clean up
export const TRUNCATE_MAX_HEIGHT_ID = 'truncate:maxHeight';

// Machine learning settings
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
} from '@kbn/unified-data-table';
import {
DOC_HIDE_TIME_COLUMN_SETTING,
HIDE_ANNOUNCEMENTS,
isLegacyTableEnabled,
MAX_DOC_FIELDS_DISPLAYED,
ROW_HEIGHT_OPTION,
Expand All @@ -59,7 +58,6 @@ import { FetchStatus } from '../../../types';
import { DiscoverStateContainer } from '../../state_management/discover_state';
import { useDataState } from '../../hooks/use_data_state';
import { DocTableInfinite } from '../../../../components/doc_table/doc_table_infinite';
import { DocumentExplorerCallout } from '../document_explorer_callout';
import {
getMaxAllowedSampleSize,
getAllowedSampleSize,
Expand Down Expand Up @@ -146,7 +144,6 @@ function DiscoverDocumentsComponent({
const expandedDoc = useInternalStateSelector((state) => state.expandedDoc);
const isEsqlMode = useIsEsqlMode();
const useNewFieldsApi = useMemo(() => !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), [uiSettings]);
const hideAnnouncements = useMemo(() => uiSettings.get(HIDE_ANNOUNCEMENTS), [uiSettings]);
const isLegacy = useMemo(
() => isLegacyTableEnabled({ uiSettings, isEsqlMode }),
[uiSettings, isEsqlMode]
Expand Down Expand Up @@ -434,7 +431,6 @@ function DiscoverDocumentsComponent({
<>
{rows && rows.length > 0 && (
<>
{!hideAnnouncements && <DocumentExplorerCallout />}
<DocTableInfiniteMemoized
columns={currentColumns}
dataView={dataView}
Expand Down
Loading

0 comments on commit 7274d1e

Please sign in to comment.