Skip to content

Commit 3e1b364

Browse files
[Metrics][Discover] Reorganize the kbn-unified-metrics-grid package (elastic#248992)
Closes elastic#239886 ## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. ### Changes - Renamed package `kbn-unified-metrics-grid` to `kbn-unified-chart-section-viewer` - Renamed `MetricsGridWrapper` to `ChartsGrid` - Also renamed the corresponding file `metrics_grid_wrapper` to `charts_grid` - Moved Metrics Experience component from `components/` to `components/observability/metrics_experience` - `metrics_experience_grid.tsx` and `metrics_experience_grid.test.tsx` - `metrics_experience_grid_content.tsx` and `metrics_experience_grid_content.test.tsx` - `index.tsx` - `lazy_unified_metrics_experience_grid.tsx` - `metrics_grid.tsx` and `metrics_grid.test.tsx` - Moved Metrics Experience hooks from `hooks/` to `components/observability/metrics_experience/hooks` - `use_metric_fields.ts` and `use_metric_fields.test.ts ` - `use_metric_fields_filter.ts` and `use_metric_fields_filter.test.ts` - `use_metrics_grid_fullscreen.ts` and `use_metrics_grid_fullscreen.test.ts` - `use_pagination.ts` - Added `index.ts` on `components/observability/metrics_experience/hooks` for exporting - Moved Metrics Experience context from `context/` to `components/observability/metrics_experience/context/` - `metrics_experience_state_provider/` - `metrics_experience_fields_provider/` - Moved Traces Metrics from `components/traces_metrics_grid/` to `components/observability/traces/` - Moved Traces Metrics context from `context/` to `components/observability/traces/context/` - Rebuilt (auto) documentation ### Checklist - [ ] Verify that Kibana builds and runs correctly - [ ] Verify that there are no CI errors related to this change - [ ] Verify if the `yarn.lock` file is valid - [ ] No lint errors `scripts/eslint.js src/platform/packages/shared/kbn-unified-chart-section-viewer` - [ ] All tests pass `node scripts/jest src/platform/packages/shared/kbn-unified-chart-section-viewer` - [ ] Verify that the component renders and works properly - [ ] In Discover, make an ES|QL query such as `TS metrics-*` - [ ] In Discover, select a traces data view --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
1 parent b3fa266 commit 3e1b364

116 files changed

Lines changed: 366 additions & 183 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ module.exports = {
11401140
'x-pack/solutions/observability/packages/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
11411141
'src/platform/plugins/shared/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
11421142
'x-pack/platform/plugins/shared/streams_app/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
1143-
'src/platform/packages/shared/kbn-unified-metrics-grid/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
1143+
'src/platform/packages/shared/kbn-unified-chart-section-viewer/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
11441144
],
11451145
rules: {
11461146
'@kbn/i18n/strings_should_be_translated_with_i18n': 'warn',

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,11 +630,11 @@ src/platform/packages/shared/kbn-try-in-console @elastic/search-kibana
630630
src/platform/packages/shared/kbn-typed-react-router-config @elastic/obs-presentation-team
631631
src/platform/packages/shared/kbn-ui-actions-browser @elastic/appex-sharedux
632632
src/platform/packages/shared/kbn-ui-theme @elastic/kibana-operations
633+
src/platform/packages/shared/kbn-unified-chart-section-viewer @elastic/obs-exploration-team
633634
src/platform/packages/shared/kbn-unified-data-table @elastic/kibana-data-discovery @elastic/security-threat-hunting-investigations
634635
src/platform/packages/shared/kbn-unified-doc-viewer @elastic/kibana-data-discovery
635636
src/platform/packages/shared/kbn-unified-field-list @elastic/kibana-data-discovery
636637
src/platform/packages/shared/kbn-unified-histogram @elastic/kibana-data-discovery
637-
src/platform/packages/shared/kbn-unified-metrics-grid @elastic/obs-exploration-team
638638
src/platform/packages/shared/kbn-unified-tabs @elastic/kibana-data-discovery
639639
src/platform/packages/shared/kbn-unsaved-changes-prompt @elastic/kibana-management
640640
src/platform/packages/shared/kbn-use-tracked-promise @elastic/obs-onboarding-team

.i18nrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"src/platform/packages/shared/kbn-management",
9494
"packages/kbn-management"
9595
],
96-
"metricsExperience": "src/platform/packages/shared/kbn-unified-metrics-grid/src",
96+
"metricsExperience": "src/platform/packages/shared/kbn-unified-chart-section-viewer/src",
9797
"monaco": "src/platform/packages/shared/kbn-monaco/src",
9898
"navigation": [
9999
"src/platform/plugins/shared/navigation",

api_docs/deprecations_by_api.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
113113
| <DocLink id="kibKbnLensCommonPluginApi" section="def-common.XYDataLayerConfig.palette" text="palette"/> | lens, @kbn/lens-embeddable-utils | - |
114114
| <DocLink id="kibNavigationPluginApi" section="def-public.TopNavMenuProps" text="TopNavMenuProps"/> | lens, dashboard, discover | - |
115115
| <DocLink id="kibSavedObjectsPluginApi" section="def-public.SavedObjectSaveModal" text="SavedObjectSaveModal"/> | presentationUtil, lens, discover | - |
116-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.from" text="from"/> | unifiedDocViewer, lens, @kbn/unified-metrics-grid, apm | - |
117-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.where" text="where"/> | unifiedDocViewer, lens, @kbn/unified-metrics-grid, apm | - |
118-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.stats" text="stats"/> | unifiedDocViewer, lens, @kbn/unified-metrics-grid | - |
119-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.sort" text="sort"/> | unifiedDocViewer, lens, @kbn/unified-metrics-grid | - |
116+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.from" text="from"/> | unifiedDocViewer, lens, @kbn/unified-chart-section-viewer, apm | - |
117+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.where" text="where"/> | unifiedDocViewer, lens, @kbn/unified-chart-section-viewer, apm | - |
118+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.stats" text="stats"/> | unifiedDocViewer, lens, @kbn/unified-chart-section-viewer | - |
119+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.sort" text="sort"/> | unifiedDocViewer, lens, @kbn/unified-chart-section-viewer | - |
120120
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.SortOrder" text="SortOrder"/> | lens | - |
121121
| <DocLink id="kibKbnLensCommon-2PluginApi" section="def-common.LegacyLensStateApi.getLegacySerializedState" text="getLegacySerializedState"/> | lens, triggersActionsUi | - |
122122
| <DocLink id="kibManagementPluginApi" section="def-public.ManagementAppMountParams.theme$" text="theme$"/> | triggersActionsUi | - |
@@ -154,11 +154,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
154154
| <DocLink id="kibKbnAgentBuilderCommonPluginApi" section="def-common.ConverseInput.attachments" text="attachments"/> | agentBuilder | - |
155155
| <DocLink id="kibKbnContentManagementTableListViewTablePluginApi" section="def-public.TableListViewTableProps.withoutPageTemplateWrapper" text="withoutPageTemplateWrapper"/> | @kbn/content-management-table-list-view, filesManagement | - |
156156
| <DocLink id="kibKbnCoreSavedObjectsServerPluginApi" section="def-server.SavedObjectMigrationContext.convertToMultiNamespaceTypeVersion" text="convertToMultiNamespaceTypeVersion"/> | encryptedSavedObjects | - |
157-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.timeseries" text="timeseries"/> | @kbn/unified-metrics-grid, infra | - |
158-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.drop" text="drop"/> | @kbn/unified-metrics-grid | - |
159-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.evaluate" text="evaluate"/> | @kbn/unified-metrics-grid | - |
160-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.keep" text="keep"/> | @kbn/unified-metrics-grid | - |
161-
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.replaceParameters" text="replaceParameters"/> | @kbn/unified-metrics-grid | - |
157+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.timeseries" text="timeseries"/> | @kbn/unified-chart-section-viewer, infra | - |
158+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.drop" text="drop"/> | @kbn/unified-chart-section-viewer | - |
159+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.evaluate" text="evaluate"/> | @kbn/unified-chart-section-viewer | - |
160+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.keep" text="keep"/> | @kbn/unified-chart-section-viewer | - |
161+
| <DocLink id="kibKbnEsqlComposerPluginApi" section="def-common.replaceParameters" text="replaceParameters"/> | @kbn/unified-chart-section-viewer | - |
162162
| <DocLink id="kibKbnEsqlLanguagePluginApi" section="def-common.ESQLColumn.quoted" text="quoted"/> | @kbn/esql-composer, @kbn/esql-utils | - |
163163
| <DocLink id="kibKbnPresentationPublishingPluginApi" section="def-public.useBatchedOptionalPublishingSubjects" text="useBatchedOptionalPublishingSubjects"/> | presentationPanel | - |
164164
| <DocLink id="kibKbnReportingExportTypesPdfCommonPluginApi" section="def-common.JobParamsPDFDeprecated" text="JobParamsPDFDeprecated"/> | @kbn/reporting-export-types-pdf | - |

0 commit comments

Comments
 (0)