-
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
Add application deep links to global search #83380
Conversation
@joshdover this is AWESOME |
I'm not sure if this is a me thing, but I received this type error when trying to start up this PR locally (perhaps I am jumping the gun, apologies if so):
|
Regarding the left nav issue you noted above... there is a current effort to establish an (optional) side nav pattern for solutions. Both of these - sublinks in search and an 'always visible' side nav - should allow us to avoid the mounting situation you describe above. |
e947c1a
to
2e7ab7d
Compare
@ryankeairns Yep I missed a type error 🤦 Glad this is going in the right direction. What do we think about how this is displayed? Are we ok with just using this "slash" pattern? |
Thanks for fixing the error, pulled it up and it works as expected. Generally speaking, the slash pattern works, although I think the first part/provider (Stack Management) would make sense as the metadata subtitle (i.e. change from Management to Stack Management). That would follow existing patterns elsewhere, for example how Uptime has metadata of Observability. Side note: this particular change will likely bring attention to the fact that solution providers themselves do not appear in search results. It's not a problem to be addressed here, I'll just point it out as it will likely come up when somebody searches security and see all the Stack Management results and no Security (the solution) results. We probably need to have them register their solution name as a keyword that directs to their Overview page, perhaps... but I digress :) |
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 I'm good with the chosen approach, I just got one question:
In the future, I would also like to leverage the subLinks concept to solve a problem that the Security Solution app currently faces. What they would like to do is have multiple navigation links in the main sidebar into the same application
Even if I can only agree that we need/want subLink in nav support, I'm wondering if we aren't mixing things up here. For example, for the management section sublinks, we will never want to display them in the navbar. Adding a status
/ navLinkStatus
to the sublinks will also not be enough, as the application
result provider current behavior is to exclude hidden
apps / links from its results. If we go that way, we will probably need to add a includeInGlobalSearch
(or similar) flag to apps/sublinks.
src/core/public/application/types.ts
Outdated
| { path: string; subLinks?: AppSubLink[] } | ||
| { path?: string; subLinks: AppSubLink[] } |
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.
Will there be cases where a sublink can have both an 'existence' ( a path
) and 'children' (subLinks
)?
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 could in theory I think, yes. For instance, there may be an overview page for that section of the hierarchy, but also have sublinks inside of it. I typed it this way to make it clear that it has to have at least one of path
or subLinks
.
id: subLink ? `${app.id}-${subLink.id}` : app.id, | ||
title: subLink?.title ?? app.title, | ||
type: 'application', |
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.
Do we want these sublinks to be of the application
type, or do we want a new type, such as feature
or something? Keeping application
is easier to integrate with the searchbar's per-type logic, but I'm wondering if we may want to dissociate these results from the base/current application
ones?
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.
To me, it felt like it made sense to have the scoring for these done in a single place so that the more specific sublinks are ranked higher than the general applications when possible. Happy to experiment with a separate provider if we feel that is better.
All good points. Also with an eye towards the new navigation UX patterns that are being experimented with, we may not need this at all. In that case, I'll simply design this with the one known use case in mind. |
I'm not sure exactly how we should handle this. The 'Stack Management' application currently belongs to the 'Management' category which also contains Fleet, Dev Tools, and Stack Management. The simplest solution would be to remove the I'll throw up a change here a bit with that in place and we can see how it feels. |
This also creates a situation where the default results (alphabetized list of app links) does not group the Stack Management links together. I'm not sure if this is desired: |
Yeah, that's not great. How are the sub links scored? It may not be possible, but I'm wondering if sub links should be scored lower than applications (that appear in the main left nav). So, only Dev Tools, Stack Management, and Fleet would appear in the initial set of results (apps sorted alphabetically), while the sub links would not. Once you enter a search term, then the sub links would appear after app results. I think I just spent a lot of words to say - can we score sub links lower than apps but above SOs :D |
1556632
to
9395b6c
Compare
Done 😄. Sublinks will not show in the default results now, but are included as soon as you start typing. |
x-pack/test/plugin_functional/test_suites/global_search/global_search_providers.ts
Show resolved
Hide resolved
Pinging @elastic/kibana-core (Team:Core) |
What I was thinking here is that the Visualize plugin/app could use the If we need to have custom titles or euiIconTypes for subLinks I can certainly add that feature. I think it all just depends on what we want the end-result UX to be.
+1 on this. How about |
Related, I've put a question out to the Lens team to see whether or not there are plans for Lens to appear as a distinct app in the left navigation menu. |
Overall, I'm good merging the PR in its current state.
Sounds good to me.
Yea. that can easily be added later though, so I'm fine waiting until the need arises.
I think that would make sense, as long as design/product is fine with it. |
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.
See previous comment.
There are no current plans to display Lens in the left nav, however this question did stir up some existential questions around how far we lean into the dashboard-first approach and the resulting impacts to the discoverability of Lens. I'll spin this off into another issue for further discussion. |
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
The issue that I spun off for Lens has more to do with product-level planning than this feature, in particular. I'm hopeful we can still get this merged and continue the Lens discussion separately. |
Summary
Lays the foundation for solving #72680
This PR introduces a new concept to Core's ApplicationService called
subLinks
. Applications may register subLinks with Core to represent secondary navigation locations within a single app. These subLinks are then leveraged by global search to provide navigation deep into applications.In this initial PR, I have integrated the Management app sections with this feature. Once this lands, I will work with individual teams to add their sublinks to global search.
Release Notes
Kibana's navigation search now includes deep links into various applications, allowing you to quickly navigate directly to the screens you need most.
Checklist
Delete any items that are not applicable to this PR.
For maintainers