-
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
[NP] add platform main principles #53866
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
6ebb6c8
to
2a5ca5d
Compare
src/core/PRINCIPLES.md
Outdated
- search | ||
``` | ||
### Explicit dependencies | ||
Each plugin should declare dependencies on the other plugins explicitly. Plugins cannot have circular dependencies. Plugins shouldn't have hidden dependencies. |
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.
Plugins should also not have hard dependencies on registered values. For example, one plugin should handle the case where a specific visualization type has not been registered, unless it has declared an explicit dependency on that plugin.
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.
I see the point. This is a particular case of Plugins shouldn't have hidden dependencies.
Don't know if we should provide a specific example of it. Otherwise, the file will grow to an unmanageable size quite soon. WDYT?
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.
I think this is a pretty common one that I've had to warn about before. Though TypeScript does help us out here now, I'm not sure all teams are going to be using TS everywhere.
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.
what if express it as Plugins shouldn't access runtime objects, HTTP endpoints, DOM nodes, etc. created by a third party plugin without declaring a dependency on this plugin.
Co-Authored-By: Josh Dover <[email protected]>
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.
Couple of minor comments but overall this looks good.
Co-Authored-By: Rudolf Meijering <[email protected]>
* add platform main principles * update docs * unify styles * remove guidelines. principles should cover this * Apply suggestions from code review Co-Authored-By: Josh Dover <[email protected]> * Apply suggestions from code review Co-Authored-By: Rudolf Meijering <[email protected]> * address comments Co-authored-by: Josh Dover <[email protected]> Co-authored-by: Rudolf Meijering <[email protected]>
* add platform main principles * update docs * unify styles * remove guidelines. principles should cover this * Apply suggestions from code review Co-Authored-By: Josh Dover <[email protected]> * Apply suggestions from code review Co-Authored-By: Rudolf Meijering <[email protected]> * address comments Co-authored-by: Josh Dover <[email protected]> Co-authored-by: Rudolf Meijering <[email protected]> Co-authored-by: Josh Dover <[email protected]> Co-authored-by: Rudolf Meijering <[email protected]>
Summary
This PR formalizes NP principles. It will be used as a guide to verify decisions in the future.
[skip-ci]