-
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
Prep visualizations plugin for NP migration. #44839
Conversation
Pinging @elastic/kibana-app-arch |
💔 Build Failed |
Should we change |
Thanks for the thorough review and improvements. Your code is better than mine. I agree with your changes. When I was writing
And I agree with @mattkime. We learn by examples. Many future developers/contributors will read how current plugins are implemented and learn from them. Actually, that's what I did. So, I think making these 3 modules follow the new rules (no import from Actually, I thought about moving And how about adding |
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.
code LGTM, however tests are currently broken
src/legacy/core_plugins/kibana/public/visualize/listing/visualize_listing.js
Show resolved
Hide resolved
Thanks @sainthkh - but there's no "better" or "worse" here, just a question of how to make everything consistent. Your contribution got the conversation started, which is the most important thing ❤️
@stacey-gammon or @ppisljar Do you think it is worth shuffling the directories around for the shims to be consistent in
This is a great idea, we could probably be more explicit here since we only briefly reference |
@lukeelmers If you think fixing |
It's not impossible actually, legacy plugins can use new platform plugins, so we can move forward with this... I think now actually. I know Vadim had it on his radar, but will be out for a few weeks. I'm pretty sure this was the last blocker (#43416) and it's merged (the only blockers are actually if the embeddable api is using legacy stuff - that can't happen, so all legacy dependencies need to get moved over first.). So if you are interested you should be able to tackle that and that would be awesome! Though... you should probably wait till #44707 is merged, otherwise there will be a ton of merge conflicts. You could also try working off it cherry-picked but no telling how much will change during review process. |
6e30a16
to
2d18abd
Compare
retest |
@stacey-gammon and I discussed and agreed that we don't need to prioritize updating the embeddables shims since we are looking to move to NP soon enough anyway. However, if whoever works on the embeddables > NP move finds it easier to update the shims as part of that process, they are of course free to do so. |
💚 Build Succeeded |
…ation_behaviour * 'master' of github.com:elastic/kibana: (24 commits) [Console] SQL template with triple quote in completion (elastic#45248) [ML] Data Frames: Cards as links (elastic#45254) fix(code/frontend): should show updating instead of cloning when updating (elastic#45238) fix(code/frontend): fix document search result from (elastic#45236) disable another flaky suite (elastic#45323) (elastic#45330) disable flaky suite (elastic#45105) skip flaky suite (elastic#43069) skip flaky suite (elastic#45089) disable jest suite that has no enabled tests (elastic#44250) disable flaky test (elastic#45317) disable flaky test (elastic#45315) [DOCS] Creates developer folder (elastic#45280) [SIEM] Changes ML conditional links to use tabs, fixes a small bug with null filterQuery (elastic#45218) [skip-ci][Maps] Update search docs (elastic#45307) Revert "[skip ci][Maps] Update search document section with ne… (elastic#45301) Prep visualizations plugin for NP migration. (elastic#44839) Replace Discover chart with elastic-charts (elastic#43788) [skip ci][Maps] Update search document section with new features (elastic#44819) Revert "Revert "[ci] compress jobs for CI stability" (elastic#44584)" add src/plugins to the list of plugin dirs to watch (elastic#45033) ... # Conflicts: # src/legacy/core_plugins/console/public/src/utils.js # src/legacy/core_plugins/console/public/tests/src/utils_string_expanding.txt
This is a follow-up PR which reverts some of the changes introduced in #44644 as a part of resolving #44306.
I added a comment with some feedback on the original PR, and also have been working on a draft PR that accomplishes some similar things.
Notes on my changes are below; let's discuss further in this PR if anyone has additional feedback so that we are all aligned on conventions we want to use.
This PR implements some feedback on #44644 by making the following changes:
np_ready
directory. I realize this is howembeddable_api
currently implements that directory, but I would argue that we shouldn't expose usage ofnp_ready
directory to consumers of the shim as it introduces confusion and is subject to change. I propose only exporting shims from a top levelpublic/legacy
, which is what we have already documented inMIGRATION.md
anyway.kibana.json
manifest moved to the top level & addeddata
plugin as dependencypublic/np_ready/public
felt like a redundant directory structure, so moved items tonp_ready
directlypublic/mocks
since they included bypasses for the eslint imports rule, which by definition means they aren't "np_ready"visualizationsSetup
to be consistent with how we've named other shims. This is also consistent with theVisualizationsSetup
public interface we export.This PR also replaces #43730 by making the following changes:
Next steps / other considerations:
visTypeAliasRegistry
as we do further work on this plugin.visualizations.types.visTypeAliasRegistry
seems awkward.visualizations.types.registerVisualizationAlias
might make more sense?np_ready
structure. Not sure if this is worth the effort as we are quite close to completing migration on this.MIGRATION.md
to ensure it is consistent with the new implementation. That way people know where to find the shims they need.