-
Notifications
You must be signed in to change notification settings - Fork 31
Docs - add vs expose extensions #2019
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
base: main
Are you sure you want to change the base?
Conversation
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
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.
Some comments here, treat this as a user reading this docs more than a developer of the feature 😅 (you may need to wait for someone more knowledgeable person about this topic)
A plugin defining an extension point where other plugins can contribute components: | ||
|
||
```typescript | ||
import { addPanelEditorTab } from '@grafana/data'; |
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 it would be better to have a real example here, I don't think this is close to any real usage (at least that I can find). I tried looking for addPanel*
or something similar in our code base and found nothing.
You may need to wait for some expert on extensions to be available but based on the current documentation I think, that for defining an extension point, you need to use for example usePluginComponents
as explained here.
Then, you can add a component to the new extension point (as explained here).
Maybe I am completely off and addLink
and addComponent
are more complex scenarios that were not the goal to be explained here but if that's the case we should probably clarify that.
Co-authored-by: Andres Martinez Gotor <[email protected]>
Co-authored-by: Andres Martinez Gotor <[email protected]>
Co-authored-by: Andres Martinez Gotor <[email protected]>
Co-authored-by: Andres Martinez Gotor <[email protected]>
Fixes https://github.com/grafana/grafana-community-team/issues/311.
Previews: