-
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
Expose active app name to plugins #44868
Comments
Pinging @elastic/kibana-platform |
Rather than exposing the observable to plugins, what do you think about exposing the current app name itself to the app mount handler? I think that would solve the use cases that were brought up at least. |
I agree it could be provided by the app mount handler as well. We could still eliminate the boilerplate of passing props down for that field to shared components (eg. filter bar, timepicker) by leveraging React Context to populate it. @lizozom Can you think of any usecase this wouldn't work for? |
New platform plugins instantiated and run even if they aren't rendered on the screen. For me, it's a valid case when a plugin (Monitoring, for example) wants to know what a plugin is visible on the screen. Active plugin already knows own name and there are no needs to pass it in the mount handler. Doesn't it? |
Monitoring and telemetry are both good examples of plugins that may want this information without each app having to integrate with them. Seems like a valid use case to me. |
I guess it comes down to this: at this point in time do we create extension points that we think might be useful or focus only on those that are known to be needed? That's a broader question that the platform team should be in agreement about one way or the other. |
@joshdover my intention was to add the application name, once you provide it, to the |
@lizozom Each application that depends on that context provider should know what app it is. Do we have an actual known feature requirement that would benefit from this? |
This was solved in #56285 |
from Slack conversation with @lizozom
ATM we have
currentAppId$
in ApplicationService, but don't export it to the plugins.Probably we should expose something like
applicationService.currentApp$: Observable<{ id: string, name: string;}>
The text was updated successfully, but these errors were encountered: