Skip to content

Delete src/legacy/ui/public folder#76085

Merged
pgayvallet merged 12 commits intoelastic:masterfrom
pgayvallet:kbn-xxx-remove-legacy-ui-public
Sep 1, 2020
Merged

Delete src/legacy/ui/public folder#76085
pgayvallet merged 12 commits intoelastic:masterfrom
pgayvallet:kbn-xxx-remove-legacy-ui-public

Conversation

@pgayvallet
Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet commented Aug 27, 2020

All in title. Delete the src/legacy/ui/public folder, that is no longer used by any code.

  • Delete src/legacy/ui/public
  • Remove jest.mock('ui/XXX') usages in test files
  • Remove ui/* moduleNameMapper from jest configs
  • Remove "ui/*" from tsconfig's paths
  • Adapt some imports to retrieve Capabilities from core/types instead of ui/capabilities
  • Remove unused i18n keys from translation files

@pgayvallet pgayvallet marked this pull request as ready for review August 31, 2020 06:45
@pgayvallet pgayvallet requested a review from a team August 31, 2020 06:45
@pgayvallet pgayvallet requested a review from a team as a code owner August 31, 2020 06:45
@pgayvallet pgayvallet requested a review from a team August 31, 2020 06:45
@pgayvallet pgayvallet requested review from a team as code owners August 31, 2020 06:45
@pgayvallet pgayvallet added Feature:Legacy Removal Issues related to removing legacy Kibana Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.10.0 labels Aug 31, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@pgayvallet pgayvallet added the release_note:skip Skip the PR/issue when compiling release notes label Aug 31, 2020
Comment on lines -25 to -27
npSetup.plugins.visualizations.createReactVisualization({
name: 'self_changing_vis',
title: 'Self Changing Vis',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remains from before this test plugin was migrated to KP. The file was unused (the test component is now registered from test/plugin_functional/plugins/kbn_tp_custom_visualizations/public/plugin.ts)

Comment on lines 44 to 52

const indexPattern = new StubIndexPattern(
'logstash-*',
(cfg) => cfg,
'time',
fields,
npSetup.core
);
const indexPattern = new StubIndexPattern('logstash-*', (cfg) => cfg, 'time', fields, {
uiSettings: uiSettingSetupMock,
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only actual code change of the PR. The StubIndexPattern is only accessing uiSettings API, so I created an inline mock to replace the '../legacy/ui/public/new_platform/new_platform.karma_mock' import.

@botelastic botelastic bot added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Aug 31, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/apm-ui (Team:apm)

Copy link
Copy Markdown
Contributor

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apm changes lgtm

Copy link
Copy Markdown
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code owner changes are testing mocks only.
LGTM.

Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removal of unneeded ui/new_platform and ui/i18n mocks from ES UI Jest tests LGTM.

Copy link
Copy Markdown
Contributor

@kindsun kindsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maps lgtm! Thanks for the clean up 🙇

  • Code review

Copy link
Copy Markdown
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

25k LOC less 🥳. KibanaApp code owner review, just test files were modified, LGTM, didn't test

Copy link
Copy Markdown
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Canvas changes lgtm

Copy link
Copy Markdown
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security changes LGTM

Copy link
Copy Markdown
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operations LGTM

Copy link
Copy Markdown
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. SASS changes LGTM 👍

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
timelion 598.5KB +5.2KB 593.2KB

History

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

@pgayvallet pgayvallet merged commit e70ef65 into elastic:master Sep 1, 2020
pgayvallet added a commit to pgayvallet/kibana that referenced this pull request Sep 1, 2020
* delete src/legacy/ui/public folder

* remove jest.mock('ui/XXX'); from tests

* adapt stubbedLogstashIndexPatternService

* remove delete keys from translation files

* fix types import with Capabilities

* remove legacy test utils

* remove dead file referencing ui/newPlatform

* move saved-object-finder styles to timelion plugin
# Conflicts:
#	src/legacy/ui/public/new_platform/new_platform.test.mocks.ts
#	src/legacy/ui/public/new_platform/new_platform.ts
#	src/test_utils/public/no_digest_promises.js
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/home.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts
pgayvallet added a commit that referenced this pull request Sep 1, 2020
* Delete src/legacy/ui/public folder (#76085)

* delete src/legacy/ui/public folder

* remove jest.mock('ui/XXX'); from tests

* adapt stubbedLogstashIndexPatternService

* remove delete keys from translation files

* fix types import with Capabilities

* remove legacy test utils

* remove dead file referencing ui/newPlatform

* move saved-object-finder styles to timelion plugin
# Conflicts:
#	src/legacy/ui/public/new_platform/new_platform.test.mocks.ts
#	src/legacy/ui/public/new_platform/new_platform.ts
#	src/test_utils/public/no_digest_promises.js
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/home.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts

* fix 7.x code

* restore legacy docLinks file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Legacy Removal Issues related to removing legacy Kibana release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.