-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Enterprise Search] Fix cross-application links & breadcrumbs #79530
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- see https://www.elastic.co/guide/en/kibana/master/kibana-navigation.html - for this change, we need to pass in the `http` lib as another dependency alongside `history` to createHelper
- Note that a lot of their createHref tests did not functionally change in output because Kibana mocks an empty basePath ('/') in tests
cee-chen
added
bug
Fixes for quality problems that affect the customer experience
Feature:Plugins
release_note:skip
Skip the PR/issue when compiling release notes
v7.10.0
labels
Oct 5, 2020
scottybollinger
approved these changes
Oct 5, 2020
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.
Nice catch @constancecchen. Thanks for getting this in before FF
cee-chen
pushed a commit
to cee-chen/kibana
that referenced
this pull request
Oct 5, 2020
…c#79530) * Update our cross-app links to correctly include Kibana basePaths - see https://www.elastic.co/guide/en/kibana/master/kibana-navigation.html - for this change, we need to pass in the `http` lib as another dependency alongside `history` to createHelper * Update helpers using createHref to pass new expected dependency - Note that a lot of their createHref tests did not functionally change in output because Kibana mocks an empty basePath ('/') in tests
cee-chen
pushed a commit
that referenced
this pull request
Oct 5, 2020
#79555) * Update our cross-app links to correctly include Kibana basePaths - see https://www.elastic.co/guide/en/kibana/master/kibana-navigation.html - for this change, we need to pass in the `http` lib as another dependency alongside `history` to createHelper * Update helpers using createHref to pass new expected dependency - Note that a lot of their createHref tests did not functionally change in output because Kibana mocks an empty basePath ('/') in tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Plugins
release_note:skip
Skip the PR/issue when compiling release notes
v7.10.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
I have no idea how I didn't notice this earlier or how this somehow wasn't broken for me locally until recently 🤦♀️
Problem
Our cross-Kibana-app links (created without React Router's
history.createHref
) are broken on local dev and on custom spaces because they're missing Kibana's basePath:Correctly formed URL example:
Links missing basepath:
Solution
Updating our
createHref
helper to usehttp.basePath.prepend()
per Kibana's docs/recommendation solves the issue:QA
Checklist