Skip to content

feat: setup tools panel#387

Merged
sharanyavinod merged 3 commits intoewfrom
ew-panels
Apr 24, 2026
Merged

feat: setup tools panel#387
sharanyavinod merged 3 commits intoewfrom
ew-panels

Conversation

@sharanyavinod
Copy link
Copy Markdown

  • Refactors the panel system to remove the nx-panel-header intermediate layer and simplify panel open/close
  • Introduces NxToolPanel (was a placeholder): managed shell with a consumer picker, lazy-loaded consumer content, first-party header-actions zone, and close button
  • Updates chat to fully own the panel content including header with close
  • Updates browse to have chat toggle similar to canvas

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

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Apr 24, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@hannessolo
Copy link
Copy Markdown
Contributor

Screenshot 2026-04-24 at 10 30 12

In the chat panel, the toggle button isn't at the edge of the panel anymore if it's wide enough

@sharanyavinod
Copy link
Copy Markdown
Author

In the chat panel, the toggle button isn't at the edge of the panel anymore if it's wide enough

Oh nice catch! Will put in a fix

Comment thread nx2/utils/panel.js Outdated
}

const beforeMain = position === 'before';
const content = await getContent();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?.()?

Comment thread nx2/blocks/canvas/canvas.js Outdated
id: 'tools',
label: 'Tools',
firstParty: false,
load: () => loadFragment('https://da.live/fragments/exp-workspace/tool'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread nx2/blocks/canvas/canvas.js Outdated
const { loadFragment } = await import('../fragment/fragment.js');
await import('../tool-panel/tool-panel.js');
const toolPanel = document.createElement('nx-tool-panel');
toolPanel.consumers = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure consumers is a very clear name to me, maybe views or children?

@sharanyavinod sharanyavinod merged commit 0a5e975 into ew Apr 24, 2026
3 checks passed
@sharanyavinod sharanyavinod deleted the ew-panels branch April 24, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants