-
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
Migrate home app #58030
Migrate home app #58030
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
just started to test it, seems there's a problem when you click on "Add Apm" Same error with other tutorials like |
Thanks for checking @kertal , seems like there are some imports of. I will check and fix 👍 |
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.
infra changes lgtm
// Visualize styles | ||
@import './visualize/index'; | ||
// Has to come after visualize because of some | ||
// bad cascading in the Editor layout | ||
@import 'src/legacy/ui/public/vis/index'; | ||
|
||
// Home styles | ||
@import '../../../../plugins/home/public/application/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.
Can you import this file directly in the JS in plugins/home/public/
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.
And also then rename it from _index.scss
to index.scss
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.
I originally included this but reverted because the scss is depending on legacy mixins in “ui/styles”. Importing from a module in the new platform gave me an error. The platform team is owning the topic and is tracking this separately, as soon as it’s moved the entry-point can be moved over just as you suggest.
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.
You could then just import the mixin dependencies directly in the index.scss
file so as to unblock moving this to the JS file.
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’s not complaining about the mixin itself (somehow it’s pulling that in implicitly), but about an asset used within the mixin: https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/styles/_mixins.scss#L92
That’s the line failing. As it’s going to get migrated soon I didn’t dig any deeper , but maybe you know a better way around the problem.
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.
What does the error say?
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.
Also, I wonder then why yours would be the only implementation that complains if it's not the one pulling the file directly...
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.
I couldn't reproduce the problem locally anymore and the Jenkins build with this failure is already cleaned up - I committed the change again, if it works even better.
Also, I wonder then why yours would be the only implementation that complains if it's not the one pulling the file directly...
There is no usage of that specific mixin from within the new platform so far, it's only consumed the legacy way:
x-pack/plugins/spaces/public/space_selector/_space_selector.scss
2: @include kibanaFullScreenGraphics;
x-pack/legacy/plugins/security/public/components/authentication_state_page/_authentication_state_page.scss
2: @include kibanaFullScreenGraphics;
x-pack/legacy/plugins/security/public/views/login/components/login_page/_login_page.scss
2: @include kibanaFullScreenGraphics;
src/plugins/home/public/application/components/_welcome.scss
2: @include kibanaFullScreenGraphics($euiZLevel6);
Spaces selector looks like it's imported in the new platform, but it's still used in the old way eventually: x-pack/legacy/plugins/spaces/public/index.scss
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.
I just pulled down your branch, ran it locally, didn't get any compile or console errors and the graphics rendered properly in the Welcome page. So... 👍 looks like all is good with the import in JS?
@kertal This PR should be ready to be checked again from the JS side of things - fixed the broken tutorials. |
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, waving goodbye to home from legacy world, may the static assets follow soon.
No more JS problems detected, tested locally in chrome!
@cchaos That’s the build failure I was referring to: Do you have an idea what this is about? |
@@ -21,13 +21,9 @@ import { PluginInitializerContext } from 'kibana/public'; | |||
|
|||
export { | |||
FeatureCatalogueSetup, |
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.
If you're exposing only the setup contract of these sub-services, maybe expose them as FeatureCatalogueSetup as FeatureCatalogue
?
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.
Good point, I will fix that
this.capabilities = capabilities; | ||
} | ||
|
||
public get(): readonly FeatureCatalogueEntry[] { |
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 was exposed because the home app was still part of the legacy platform while the registry already moved. Now both are back together in a single plugin and there is no need anymore to expose that information.
this.capabilities = capabilities; | ||
} | ||
|
||
public get(): readonly FeatureCatalogueEntry[] { |
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 was exposed because the home app was still part of the legacy platform while the registry already moved. Now both are back together in a single plugin and there is no need anymore to expose that information.
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.
Added one minor comment
@cchaos as discussed offline, I reverted the new platform scss import for now. |
Jenkins, test this. |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
This PR moves the home app over into the new platform. The only thing being left behind are static resources which are currently not supported by the new platform, those will be moved in a separate PR once the core api is available.
This PR also removes some exposed apis which were only necessary to pass information from the NP home plugin to the legacy home plugin.