Improve plugins infrastructure#800
Conversation
🦋 Changeset detectedLatest commit: e66f494 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…into plugins-infra-1
|
|
|
||
| $effect(() => { | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
| label |
There was a problem hiding this comment.
nit: would pulling const tab = { label, children } up here turn on reactivity for these so we don't need to do the eslint ignore
There was a problem hiding this comment.
good point, fixed!
| } | ||
| | { | ||
| label: string | ||
| children: Snippet |
There was a problem hiding this comment.
why does this prop need to render children now? can we not just have the useSettingsTab require a Component or move everyone over to use snippets?
There was a problem hiding this comment.
The problem is that components make sense when making tabs internally, and snippets make sense ergonomically when making tabs via plugins. Small complexity cost internally.
|
Hey Micheal Parks (@micheal-parks) — this PR has been approved and CI has been green for 3+ business days. Ready to merge? Auto-comment from overwatch. Will not re-nudge for 7 days. |
Overview
This PR introduces 3 new portaling components for plugins:
DashboardPortal,DetailsPortalandSettingsPortal. The last one is the most configurable and allows creation of settings tabs. The first two are pretty barebones and only allow what we currently do with injecting into the dashboard and details panels, but in subsequent PRs I'll improve them so that we can order dashboard items and allow injection into specific areas of the details panel.Additionally, this PR updates floating panels so that they are automatically wrapped in DOM portals, removing the need for plugins to do this.