Conversation
Oh nice catch! Will put in a fix |
| } | ||
|
|
||
| const beforeMain = position === 'before'; | ||
| const content = await getContent(); |
There was a problem hiding this comment.
I think we could have a use case where we open a panel without getContent - not in our code but this panel is part of the general nx framework.
So would it make sense to have a check like getContent?.()?
| id: 'tools', | ||
| label: 'Tools', | ||
| firstParty: false, | ||
| load: () => loadFragment('https://da.live/fragments/exp-workspace/tool'), |
There was a problem hiding this comment.
I'm not sure this load fragment makes sense anymore. If canvas owns the list of views shown in the tool panel, it can also just render them directly instead of having a fragment load them. So I think we can remove the whole fragment piece from canvas (keep it for tool-panel though, since other parts of the code could use it in the future).
Eg. we would just add to the consumers array the component for page outline that you're working on, and a generic extensionLoader component for all the configured extensions.
There was a problem hiding this comment.
I was thinking of doing that when introducing the content for right panel like outline, but you're right, might as well clean it up already
| const { loadFragment } = await import('../fragment/fragment.js'); | ||
| await import('../tool-panel/tool-panel.js'); | ||
| const toolPanel = document.createElement('nx-tool-panel'); | ||
| toolPanel.consumers = [ |
There was a problem hiding this comment.
I'm not sure consumers is a very clear name to me, maybe views or children?

Preview:
https://da.live/canvas?nx=ew-panels&nxver=2#/exp-workspace/frescopa/index
https://da.live/browse?nx=ew-panels&nxver=2#/aem-sandbox/block-collection/drafts