Conversation
lukeelmers
left a comment
There was a problem hiding this comment.
I know this is still a draft, so I just tried to answer questions and added a few notes. LMK if there are other questions that come up or when this is ready for a final review.
src/legacy/core_plugins/vega/public/vega_view/vega_base_view.js
Outdated
Show resolved
Hide resolved
4027d83 to
ee37f4e
Compare
There was a problem hiding this comment.
I like this approach where all legacy stuff is injected into the shim instead of imported from ui/....
@elastic/kibana-app-arch Let's discuss it on Tuesday sync.
I would rename it to something like __LEGACY and it would need to be a "plugin", not service. But I somehow like this much more than arbitrarily importing from ui/... from various files within a shim. This way you explicitly see what legacy stuff your plugin still depends on.
Maybe we could have a convention where shims are in <legacy_plugin>/public/shim folder and add a linter rule that does not allow to import anything from ui/... in any of the <legacy_plugin>/public/shim/public/** files.
There was a problem hiding this comment.
Yeah that's certainly an option too. To prevent confusion, we should move this discussion over to #39554 and can report back here
There was a problem hiding this comment.
If we go with this legacy approach, I guess it should be named "plugin", but does not really matter now.
|
Pinging @elastic/kibana-app |
💚 Build Succeeded |
lukeelmers
left a comment
There was a problem hiding this comment.
No other major concerns on my end, I think we just owe you some clarification on the conventions we want to be using for shimming. We are discussing this tomorrow and will follow up here with any final items; sorry for all the back and forth!
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
💔 Build Failed |
|
retest |
💚 Build Succeeded |
lukeelmers
left a comment
There was a problem hiding this comment.
This makes sense to me! There will be more shimming work to do later in the process (like removing some of the ui/chrome imports), but those don't need to happen right now.
My only other comment would be that we should probably get rid of setup.ts and either moving the contents of that file to legacy.ts, or to the shim directory. This was one of the conventions we decided on recently... having legacy.ts contain (or import) our shims and export the setup/start contracts, rather than having a dedicated setup.ts file.
Otherwise, everything LGTM!
💔 Build Failed |
💚 Build Succeeded |
Summary
Part of #39915
1 Step of migrating to new Platform
What was done in this PR:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers