-
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 ui/kbn_top_nav/kbn_top_nav to kibana_legacy #58221
Conversation
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.
If you check out the implementation of wrapInI18nContext over in src/legacy/ui/public/i18n/index.tsx
, you will see it's just putting the I18nContext
component from core start around the component. Introducing reliance on this function in several places feels like a step in the wrong direction.
It seems like everything would get much easier if the navigation
plugin would already do that. As the component itself is already returned from the start contract, it would be trivial to wrap it in coreStart.i18n.Context
right there: src/plugins/navigation/public/plugin.ts
@lizozom what do you think?
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Overall the change looks great.
I would suggest removing the ui/public
folder altogether, as it won't require much more additional work.
import { uiModules } from 'ui/modules'; | ||
import { npStart } from 'ui/new_platform'; | ||
import { |
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.
Lets move the directive definition to kibana_legacy
and update the imports from the 4 places that consume those directives (maps, dashboard_mode, timelion and kibana).
Then we'll be able to remove this folder altogether and simplify the code.
# Conflicts: # x-pack/legacy/plugins/graph/public/application.ts # x-pack/legacy/plugins/graph/public/legacy_imports.ts
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.
LGTM for migration.md
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.
LGTM
💚 Build SucceededHistory
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.
LGTM, did not test locally
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.
maps 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.
Everything looks good on the Monitoring side. Great job 👍
* Migrate kbn_top_nav.js to kibana_legacy * Wrap TopNavMenu into i18nContext * Move the kbnTopNav directive definition to kibana_legacy and remove ui/kbn_top_nav Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Part of #57180.
Movement
src/legacy/ui/public/kbn_top_nav/kbn_top_nav.js
tosrc/plugins/kibana_legacy
.