Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
16 changes: 9 additions & 7 deletions Composer/packages/client/src/pages/design/VisualPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ const VisualPanel: React.FC<VisualPanelProps> = React.memo(({ projectId }) => {

return (
<div aria-label={formatMessage('Authoring canvas')} css={visualPanel} role="region">
<VisualPanelHeader
pluginConfig={pluginConfig}
projectId={projectId}
showCode={dialogJsonVisible}
visible={!isRemoteSkill}
onShowCodeClick={handleShowCodeClick}
/>
{!isRemoteSkill && (
<VisualPanelHeader
pluginConfig={pluginConfig}
projectId={projectId}
showCode={dialogJsonVisible}
onShowCodeClick={handleShowCodeClick}
/>
)}

{dialogJsonVisible && currentDialog ? (
<JsonEditor
key={'dialogjson'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ type BreadcrumbItem = {

type VisualPanelHeaderProps = {
projectId: string;
visible: boolean;
showCode: boolean;
onShowCodeClick: () => void;
pluginConfig?: PluginConfig;
Expand Down Expand Up @@ -158,7 +157,7 @@ const useBreadcrumbs = (projectId: string, pluginConfig?: PluginConfig) => {
};

const VisualPanelHeader: React.FC<VisualPanelHeaderProps> = React.memo((props) => {
const { visible, showCode, projectId, onShowCodeClick, pluginConfig } = props;
const { showCode, projectId, onShowCodeClick, pluginConfig } = props;
const breadcrumbs = useBreadcrumbs(projectId, pluginConfig);

const createBreadcrumbItem: (breadcrumb: BreadcrumbItem) => IBreadcrumbItem = (breadcrumb: BreadcrumbItem) => {
Expand All @@ -171,7 +170,7 @@ const VisualPanelHeader: React.FC<VisualPanelHeaderProps> = React.memo((props) =

const items = breadcrumbs.map(createBreadcrumbItem);

return visible ? (
return (
<div style={{ display: 'flex', justifyContent: 'space-between', height: '65px' }}>
<Breadcrumb
ariaLabel={formatMessage('Navigation Path')}
Expand All @@ -187,7 +186,7 @@ const VisualPanelHeader: React.FC<VisualPanelHeaderProps> = React.memo((props) =
</ActionButton>
</div>
</div>
) : null;
);
});

export default VisualPanelHeader;