-
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
[Platform] Add exact property to register route in plugin #69110
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Just to be sure to understand: All yours 'routes' are mounted as distinct apps, right? Else I guess we wouldn't encounter such an issue? Follow-up question (if that's the case): This decision was driven by the need to have multiple navlinks to the same 'app', is that it? |
I believe so, yes. But I also know that Enterprise Search would like have a similar routing scheme for their two different apps. I think it's approximately:
@constancecchen is that about right? |
Yes, that's right - we'd love to have our routing set up that way! 😄 |
I have no real objections to add an option that would reflect the The only thing I can think of is that core.application.register({
id: 'security',
title: 'Security',
appRoute: 'app/security',
exactRoute: true,
mount: async (params: AppMountParameters) => {
.....
},
});
// later
// will redirect to `/app/security/some/path` which is not handled by the route, resulting on a 404
core.application.navigateToApp('security', {path: 'some/path'}); Not sure this is something we should really be concerned about? We could add a check in navigateToApp to check is the app's route is exact and raise an error when using |
or maybe we can have something like that
|
The issue with the I also think that the route behavior should remains strictly the registrant responsibility, so I think i'd prefer the |
After sync discussion with the team:
|
Just wanted to give an update on Enterprise Search's end - we eventually decided on registering our overview app as We made this choice because we ended up realizing Apologies that we ended up not using this super useful functionality that you implemented, but thanks so much for giving us the option / thinking of us!! 🙇♀️ |
In the security solution, we are having different routes like
we would like to redirect the route
app/security
toapp/security/overview
by doing thatHowever, when we are doing that, we are breaking all the different routes in our app. Since everything is going to the mount of the route
app/security
. That's why we think to add anexact
property will resolve our problem.The text was updated successfully, but these errors were encountered: