-
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
[data] Expose uiSettings in plugin contract #67060
Comments
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Do we still need this? As now even static imports create an explicit dependency in plugin tree. |
Yeah I think the original thread that started this discussion is less relevant now that you can no longer do static imports without explicitly declaring a dependency on that plugin. It would just be a matter of whether we'd want to recommend folks expose settings from plugin contracts in the future as a general pattern. IMHO we can probably close this as the enforcement on static imports solves the biggest issue from my perspective, and we are thinking about how uiSettings will evolve longer term anyway. cc @pgayvallet @TinaHeiligers @mshustov for any other thoughts on that |
Can we verify that all the plugins use imported keys? I didn't check all the
kibana/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx Line 182 in 57af846
|
They definitely don't all use imported keys yet, so perhaps this issue could be rescoped to that instead (ensure imported keys are used anywhere in Kibana that relies on uiSettings registered by the data plugin) |
Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment. |
In #66040 we migrated some uiSettings out of the legacy platform. At the time, setting names were converted to statically-exported consts which other plugins imported when using core's uiSettings service.
Ideally we would follow a pattern closer to what was suggested here, where the settings are exposed via a getter on the service's runtime contract, e.g.
Then applications relying on this setting would create an explicit dependency on the plugin which registered the setting, and retrieve the value via that plugin's contract.
This would involve a few things:
uiSettings.get
under the hoodThe text was updated successfully, but these errors were encountered: