-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NP] Move visTypeVislib into NP #63963
Conversation
# Conflicts: # x-pack/legacy/plugins/tilemap/index.js
Pinging @elastic/kibana-app (Team:KibanaApp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and looks mostly good to me, just left two comments about the separation of legacy tests.
@@ -20,13 +20,20 @@ | |||
import _ from 'lodash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like most of this file is only used in the legacy tests, can we move it over there? The only thing used in NP jest tests as well is the getMockUiState
function, looks like it makes sense to move that one into a separate file so we don't have to import things deeply from within other plugins and mess with jquery in the new platform (and keep it in the legacy world instead).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done
.eslintignore
Outdated
@@ -10,7 +10,7 @@ bower_components | |||
/html_docs | |||
/src/plugins/data/common/es_query/kuery/ast/_generated_/** | |||
/src/plugins/vis_type_timelion/public/_generated_/** | |||
src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data | |||
/src/plugins/vis_type_vislib/public/fixtures/mock_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good opportunity to fix the formatting in these files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've done it in a separate commit in case of any concerns (the diff has increased significantly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the diff and testing worlds are nicely separated now. LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ML changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in the files under operations team code owners LGTM
@import 'src/legacy/core_plugins/vis_type_vislib/public/index'; | ||
// vis_type_vislib UI styles are imported here for running karma Browser tests | ||
// should be somehow included through the "vis_type_vislib" plugin initialization | ||
@import '../../../../plugins/vis_type_vislib/public/index'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you have this imported here and in the plugin, doesn't it duplicate the compiled styles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's duplicated temporary. We'll get rid of this legacy compilation for public code and will only use this for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sulemanof For now we can comment out the import in the plugin because the chart will always render in the legacy platform. When cutting over visualize and dashboard to the new platform we can revisit this again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @flash1293 That's what I'd suggest as well. We really want to avoid duplicate styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sulemanof I found a workaround we can use here. The tests_bundle
is stripped out for the production build, but it's loaded in karma tests. We can put the "duplicated" styles there, so we don't pollute anything and won't have problems when doing the cutover. PR: sulemanof#2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flash1293 thanks for your effort! I think it's the best solution!
Merged into current branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cchaos are you OK with the changes?
move test styles to tests_bundle
# Conflicts: # .i18nrc.json
// vis_type_vislib UI styles are imported here for running karma Browser tests | ||
// should be somehow included through the "vis_type_vislib" plugin initialization | ||
@import '../../../../plugins/vis_type_vislib/public/index'; | ||
|
||
// Visualization styles are imported here for running karma Browser tests | ||
// should be somehow included through the "visualizations" plugin initialization | ||
@import '../../../../plugins/visualizations/public/index'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, though you probably don't have to repeat this same comment. Just add one at the very top of the file that explains the necessity of the file itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cchaos you are right, done.
@elasticmachine merge upstream |
Jenkins, test this. |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SASS is good
Summary
Moving the
vis_type_vislib
into NP.All possible unit tests were moved to jest setup, other were moved into
src/legacy/core_plugins/kibana/public/__tests__/vis_type_vislib
to be run via karma setup.src/legacy/core_plugins/kibana/public/__tests__/**/*
path was included to be ignored in.eslintrc.js
for the@kbn/eslint/no-restricted-paths
rule. So that it's applicable for all the next tests which will be move to that folder and which will import files from migrated to NP pluginsChecklist
Delete any items that are not applicable to this PR.
For maintainers