[NP] Remove ui/agg_types dependencies and move paginated table to kibana_legacy#60276
[NP] Remove ui/agg_types dependencies and move paginated table to kibana_legacy#60276sulemanof merged 24 commits intoelastic:masterfrom
ui/agg_types dependencies and move paginated table to kibana_legacy#60276Conversation
# Conflicts: # src/legacy/core_plugins/kibana/public/visualize/kibana_services.ts # src/legacy/core_plugins/kibana/public/visualize/np_ready/types.d.ts # src/legacy/core_plugins/kibana/public/visualize/plugin.ts # src/legacy/core_plugins/vis_default_editor/public/components/agg_params.tsx # src/legacy/core_plugins/vis_default_editor/public/components/agg_params_helper.test.ts # src/legacy/core_plugins/vis_default_editor/public/components/agg_params_helper.ts # src/legacy/core_plugins/vis_default_editor/public/components/sidebar/state/reducers.ts # src/legacy/core_plugins/vis_default_editor/public/default_editor.tsx # src/legacy/core_plugins/vis_default_editor/public/legacy_imports.ts # src/legacy/core_plugins/vis_type_table/public/legacy_imports.ts # src/legacy/core_plugins/vis_type_vislib/public/legacy_imports.ts # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
ui/agg_types dependencies and move paginated table to kibana_legacy
# Conflicts: # src/legacy/core_plugins/kibana/public/discover/kibana_services.ts # src/legacy/core_plugins/vis_type_tagcloud/public/legacy_imports.ts # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
| 'src/legacy/core_plugins/**/*.{js,jsx,ts,tsx}', | ||
| '!src/legacy/core_plugins/**/{__test__,__snapshots__}/**/*', | ||
| 'src/legacy/ui/public/{agg_types,vis}/**/*.{ts,tsx}', | ||
| '!src/legacy/ui/public/{agg_types,vis}/**/*.d.ts', |
There was a problem hiding this comment.
There is no necessity to collect coverage from these folders (agg_types doesn't exist anymore, vis contains only legacy mocka tests since the most of code was moved)
# Conflicts: # src/legacy/core_plugins/kibana/public/discover/kibana_services.ts
spalger
left a comment
There was a problem hiding this comment.
LGTM from an operations perspective
lukeelmers
left a comment
There was a problem hiding this comment.
Code changes LGTM for app arch! Reviewed everything other than the paginate directive updates, which I am unfamiliar with.
And thanks for deleting ui/agg_types here. Nice to see that going away 🙂
| data: { | ||
| search: { | ||
| aggs: { | ||
| types: { | ||
| getAll: () => [], | ||
| }, | ||
| }, | ||
| __LEGACY: { | ||
| aggTypeFieldFilters: { | ||
| filter: () => [], | ||
| }, | ||
| }, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
nit - It would probably make maintenance easier if you passed the mocks from src/plugins/data/public/mocks.ts here (assuming that works for these specific tests)
There was a problem hiding this comment.
done.
Wrapped KibanaContextProvider with dataPluginMock service .
| } | ||
|
|
||
| function getAggTypeOptions( | ||
| aggTypes: any, |
There was a problem hiding this comment.
We should probably expose a proper interface for this from the data plugin, because I don't think there's an easy way to type aggTypes otherwise. I've added it to our roadmap list in #60126
| siblingPipelineType, | ||
| termsAggFilter, | ||
| } = search.aggs; | ||
|
|
| // @ts-ignore | ||
| export { PaginateDirectiveProvider } from 'ui/directives/paginate'; | ||
| // @ts-ignore | ||
| export { PaginateControlsDirectiveProvider } from 'ui/directives/paginate'; |
There was a problem hiding this comment.
you could also adapt imports PaginateDirectiveProvider and PaginateControlsDirectiveProvider from kibana_legacy. then ui/directives/paginate is only used in src/legacy/core_plugins/timelion/public/directives/saved_object_finder.js, so it could be inlined there
There was a problem hiding this comment.
It's a really good catch, removed reference here and completely removed ui/directives/paginate references.
src/legacy/core_plugins/vis_default_editor/public/components/agg_params.tsx
Show resolved
Hide resolved
# Conflicts: # x-pack/legacy/plugins/rollup/public/legacy_imports.ts
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
kertal
left a comment
There was a problem hiding this comment.
Code LGTM, tested locally with chrome, Kibana continues to loose weight, 154 LOC this time 👍
…ibana_legacy (elastic#60276) * fix agg type shims and move paginated table to kibana_legacy * fix types * fix i18n ids * fix unit tests * Update imports * Remove ui/agg_types imports * Clean up vis_default_editor plugin * Remove agg_types imports in vis_type_table * Clean up x-pack * Clean up vis_type_vislib * Last cleanups * Update docs * Mock Schemas in vis_type_metric * Use data plugin mocks * Remove ui/directives/paginate reference * Remove snapshot * Remove shallow Co-authored-by: Joe Reuter <johannes.reuter@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts
* master: (55 commits) Update dependency @elastic/charts to v18.1.0 (elastic#60578) Only set timezone when user setting is a valid timezone (elastic#57850) [NP] Remove `ui/agg_types` dependencies and move paginated table to kibana_legacy (elastic#60276) [SIEM] Fix types in rules tests (elastic#60736) [Alerting] prevent flickering when fields are updated in an alert (elastic#60666) License checks for actions plugin (elastic#59070) Implemented ability to clear and properly validate alert interval (elastic#60571) WebElementWrapper: add findByTestSubject/findAllByTestSubject to search with data-test-subj (elastic#60568) [Maps] Update layer dependencies to NP (elastic#59585) [Discover] Remove StateManagementConfigProvider (elastic#60221) [ML] Listing all categorization wizard checks (elastic#60502) [Upgrade Assistant] First iteration of batch reindex docs (elastic#59887) [SIEM] Export timeline (elastic#58368) [SIEM] Add support for actions and throttle in Rules (elastic#59641) Fix ace a11y listener (elastic#60639) Add addInfo toast to core notifications service (elastic#60574) fix test description (elastic#60638) [SIEM] Cypress screenshots upload to google cloud (elastic#60556) [canvas/shareable_runtime] sync sass loaders with kbn/optimizer (elastic#60653) [SIEM] Fixes Modification of ML Rules (elastic#60662) ...
* master: Only set timezone when user setting is a valid timezone (elastic#57850) [NP] Remove `ui/agg_types` dependencies and move paginated table to kibana_legacy (elastic#60276) [SIEM] Fix types in rules tests (elastic#60736) [Alerting] prevent flickering when fields are updated in an alert (elastic#60666) License checks for actions plugin (elastic#59070) Implemented ability to clear and properly validate alert interval (elastic#60571) WebElementWrapper: add findByTestSubject/findAllByTestSubject to search with data-test-subj (elastic#60568) [Maps] Update layer dependencies to NP (elastic#59585) [Discover] Remove StateManagementConfigProvider (elastic#60221)
…ibana_legacy (#60276) (#60769) * fix agg type shims and move paginated table to kibana_legacy * fix types * fix i18n ids * fix unit tests * Update imports * Remove ui/agg_types imports * Clean up vis_default_editor plugin * Remove agg_types imports in vis_type_table * Clean up x-pack * Clean up vis_type_vislib * Last cleanups * Update docs * Mock Schemas in vis_type_metric * Use data plugin mocks * Remove ui/directives/paginate reference * Remove snapshot * Remove shallow Co-authored-by: Joe Reuter <johannes.reuter@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # src/legacy/core_plugins/kibana/public/dashboard/np_ready/dashboard_state.test.ts
Summary
Based on #57695 .
This removes all imports from
ui/agg_typesand uses NP data plugin instead.This also moves paginated table to
kibana_legacyplugin.For reviewers:
It shouldn't be hard to review this, since the most cases are:
src/plugins/data/publicinstead ofui/agg_typeswhere only types are used;../**/plugins/data/publicinstead ofui/agg_typeswhere static stuff is used;dataplugin contract to access common data services;Checklist
Delete any items that are not applicable to this PR.
For maintainers