-
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
Use platform history #74328
Use platform history #74328
Conversation
@elasticmachine merge upstream |
Pinging @elastic/apm-ui (Team:apm) |
x-pack/plugins/apm/public/components/app/Main/UpdateBreadcrumbs.tsx
Outdated
Show resolved
Hide resolved
@dgieselaar the issue has been merged, can you point where you see the unnecessary changes? |
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 !!
history = createHashHistory(); | ||
}; | ||
|
||
export { history }; |
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.
🎉
@elasticmachine merge upstream |
@@ -40,6 +41,7 @@ export function EditAgentConfigurationRouteHandler() { | |||
} | |||
|
|||
export function CreateAgentConfigurationRouteHandler() { | |||
const history = useHistory(); |
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.
Is this the same history
object as the platform history
? If not, is that ok?
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. useHistory
uses the history
provided to the router, which we do here: https://github.com/elastic/kibana/pull/74328/files#diff-0d2b10d4756fabbe9a3043f569b0b9d3R93.
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.
Perfect!
@elasticmachine merge upstream |
Looks like the requested changes were made. I've not looked at the other code.
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
History
To update your PR or re-run it, just comment with: |
💔 Backport was not successfulThe PR was attempted backported to the following branches:
|
Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: cauemarcondes <[email protected]>
Co-authored-by: cauemarcondes <[email protected]>
useHistory
RedirectAppLinks
componentnavigateToUrl
in breadcrumbs so they work with the new routergetAPMHref
to look more likegetInfraHref
and take abasePath
navigateToApp
calls on the actions menu since they are no longer neededAlso:
CoreStart
instead ofAppMountContext['core']
(this was left over from earlier migration to KP and is more correct)AppMountContextBasePath
withIBasePath
since that's whatcore.http.baseBath
isFixes #72764. Fixes #65682. Fixes #69817.
This does not attempt to address #51963 at all, though that could be done in a follow-up PR.