diff --git a/apps/aevatar-console-web/src/app.navigation.test.ts b/apps/aevatar-console-web/src/app.navigation.test.ts index d0595481fa..8f010c05cb 100644 --- a/apps/aevatar-console-web/src/app.navigation.test.ts +++ b/apps/aevatar-console-web/src/app.navigation.test.ts @@ -21,8 +21,9 @@ describe("app navigation groups", () => { jest.resetModules(); }); - it("places Chat as a top-level navigation group below Teams", () => { + it("places Chat as a top-level navigation item below Teams", () => { const groups = loadNavigationGroups(); + const chatGroup = groups.find((group) => group.key === "chat"); expect(groups.map((group) => group.label)).toEqual([ "Teams", @@ -36,8 +37,8 @@ describe("app navigation groups", () => { "nav.groups.platform", "nav.groups.settings", ]); - expect(groups.find((group) => group.key === "chat")?.flattenSingleItem).toBe(true); - expect(groups.find((group) => group.key === "chat")?.flattenSingleItemAsGroupLabel).toBe(true); + expect(chatGroup?.flattenSingleItem).toBe(true); + expect(chatGroup?.icon).toBeTruthy(); expect(groups.find((group) => group.key === "teams")?.flattenSingleItem).toBeUndefined(); }); @@ -73,7 +74,7 @@ describe("app navigation groups", () => { }, ], groups, - (group) => group.label, + (group) => `Group:${group.label}`, ); expect(menuItems.map((item) => item.path ?? item.key)).toEqual([ @@ -85,5 +86,13 @@ describe("app navigation groups", () => { expect(menuItems[0].children?.map((child) => child.path)).toEqual([ "/scopes", ]); + expect(menuItems[0].name).toBe("Group:Teams"); + expect(menuItems[1]).toMatchObject({ + menuGroupKey: "chat", + name: "Chat", + path: "/chat", + }); + expect(menuItems[1].icon).toBeTruthy(); + expect(menuItems[2].name).toBe("Group:Platform"); }); }); diff --git a/apps/aevatar-console-web/src/global.less b/apps/aevatar-console-web/src/global.less index 9499e85ac4..f00b0b4b15 100644 --- a/apps/aevatar-console-web/src/global.less +++ b/apps/aevatar-console-web/src/global.less @@ -153,62 +153,6 @@ body, margin: 0; } -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"] { - position: relative; - width: calc(100% - 20px); - height: 34px; - margin: 10px 10px 12px !important; - padding: 0 0 12px !important; - line-height: 22px; - border-bottom: 1px solid rgba(148, 163, 184, 0.28); - border-radius: 0; -} - -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"]::after { - display: none; -} - -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"]:hover, -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"].ant-menu-item-selected { - background: transparent !important; -} - -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"] - .ant-pro-base-menu-inline-item-text { - color: #667085; - font-weight: 700; -} - -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"].ant-menu-item-selected - .ant-pro-base-menu-inline-item-text { - color: #344054; -} - -.ant-pro-sider - .ant-menu-inline:not(.ant-menu-inline-collapsed) - .ant-menu-item[data-menu-id$="/chat"].ant-menu-item-selected::before { - position: absolute; - top: 2px; - bottom: 14px; - left: -8px; - width: 3px; - background: #1677ff; - border-radius: 999px; - content: ""; -} - .ant-pro-sider .ant-menu-inline .ant-menu-item-divider, .ant-pro-sider .ant-menu-inline .ant-pro-base-menu-inline-divider { margin: 10px 10px 12px !important; diff --git a/apps/aevatar-console-web/src/locales/en-US.ts b/apps/aevatar-console-web/src/locales/en-US.ts index 19e62ac14b..ed982255eb 100644 --- a/apps/aevatar-console-web/src/locales/en-US.ts +++ b/apps/aevatar-console-web/src/locales/en-US.ts @@ -1162,7 +1162,7 @@ const enUSMessages = { 'teamMemberWorkflowStudio.header.publish.publishingStatus': 'Publishing', 'teamMemberWorkflowStudio.header.publishMember': 'Publish member workflow', 'teamMemberWorkflowStudio.header.publishMemberShort': 'Publish member', - 'teamMemberWorkflowStudio.header.teamBreadcrumb': 'Team', + 'teamMemberWorkflowStudio.header.teamBreadcrumb': 'Teams', 'teamMemberWorkflowStudio.header.unsavedChanges': 'Unsaved changes', 'teamMemberWorkflowStudio.header.viewsAria': 'Workflow views', 'teamMemberWorkflowStudio.header.workflowTitleAria': 'Workflow title', diff --git a/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioCanvas.tsx b/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioCanvas.tsx index 7002531f45..6bddaa21d2 100644 --- a/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioCanvas.tsx +++ b/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioCanvas.tsx @@ -21,6 +21,7 @@ type WorkflowStudioCanvasProps = { readonly onNodeSelect?: (nodeId: string) => void; readonly selectedEdgeId?: string; readonly selectedNodeId?: string; + readonly viewportRightInset?: number; }; const WorkflowStudioCanvas: React.FC = ({ @@ -37,6 +38,7 @@ const WorkflowStudioCanvas: React.FC = ({ onNodeSelect, selectedEdgeId, selectedNodeId, + viewportRightInset, }) => (
= ({ selectedEdgeId={selectedEdgeId} selectedNodeId={selectedNodeId} variant="studio" + viewportRightInset={viewportRightInset} />
); diff --git a/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioHeader.tsx b/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioHeader.tsx index e06b112d71..9036a5c330 100644 --- a/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioHeader.tsx +++ b/apps/aevatar-console-web/src/pages/team-member-workflow-studio/components/WorkflowStudioHeader.tsx @@ -91,13 +91,13 @@ const workflowStudioHeaderCss = ` .workflow-studio-header__identity { align-items: center; - display: flex; - flex-wrap: wrap; - gap: 10px; + column-gap: 10px; + display: grid; + grid-template-columns: 30px minmax(0, 1fr); + grid-template-rows: auto auto; min-width: 0; overflow: visible; - row-gap: 6px; - white-space: normal; + row-gap: 2px; } .workflow-studio-header__back-button { @@ -106,6 +106,8 @@ const workflowStudioHeaderCss = ` color: #374151; display: inline-flex; flex: 0 0 auto; + grid-column: 1; + grid-row: 2; height: 30px; justify-content: center; width: 30px; @@ -119,34 +121,46 @@ const workflowStudioHeaderCss = ` .workflow-studio-header__title-zone { align-items: center; display: flex; - flex: 1 1 280px; gap: 8px; + grid-column: 2; + grid-row: 2; max-width: 100%; min-width: 0; + overflow: hidden; } .workflow-studio-header__breadcrumbs { align-items: center; color: #6b7280; display: inline-flex; - flex: 0 1 auto; font-size: 13px; - font-weight: 600; + font-weight: 500; gap: 6px; + grid-column: 2; + grid-row: 1; min-width: 0; overflow: hidden; + padding-inline-start: 7px; } .workflow-studio-header__breadcrumb-link { color: #6b7280; display: inline-block; - max-width: 140px; + min-width: 0; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; } +.workflow-studio-header__breadcrumb-link:first-child { + flex: 0 0 auto; +} + +.workflow-studio-header__breadcrumb-link:last-child { + flex: 0 1 auto; +} + .workflow-studio-header__breadcrumb-link:hover { color: #111827; } @@ -156,13 +170,6 @@ const workflowStudioHeaderCss = ` flex: 0 0 auto; } -.workflow-studio-header__title-divider { - background: #d1d5db; - flex: 0 0 auto; - height: 18px; - width: 1px; -} - .workflow-studio-header__title-shell { align-items: center; background: transparent; @@ -171,7 +178,7 @@ const workflowStudioHeaderCss = ` display: inline-flex; flex: 1 1 180px; gap: 4px; - max-width: min(360px, 100%); + max-width: min(480px, 100%); min-width: 0; padding: 0 2px 0 6px; } @@ -195,11 +202,8 @@ const workflowStudioHeaderCss = ` font-weight: 700; height: 28px; line-height: 24px; - padding: 0; -} - -.workflow-studio-header__title-input input { overflow: hidden; + padding: 0; text-overflow: ellipsis; white-space: nowrap; } @@ -217,7 +221,8 @@ const workflowStudioHeaderCss = ` } .workflow-studio-header__title-shell:hover .workflow-studio-header__edit-button, -.workflow-studio-header__title-shell--focused .workflow-studio-header__edit-button { +.workflow-studio-header__title-shell--focused .workflow-studio-header__edit-button, +.workflow-studio-header__edit-button:focus-visible { opacity: 1; } @@ -225,8 +230,8 @@ const workflowStudioHeaderCss = ` align-items: center; border: 0; display: inline-flex; - flex: 0 1 auto; - flex-wrap: wrap; + flex: 0 0 auto; + flex-wrap: nowrap; gap: 6px; margin: 0; min-inline-size: 0; @@ -251,7 +256,7 @@ const workflowStudioHeaderCss = ` .workflow-studio-header__actions { align-items: center; display: flex; - flex-wrap: wrap; + flex-wrap: nowrap; gap: 4px; justify-content: flex-end; max-width: 100%; @@ -293,27 +298,12 @@ const workflowStudioHeaderCss = ` width: 30px; } -@media (max-width: 1320px) { - .workflow-studio-header__breadcrumbs { - display: none; - } - - .workflow-studio-header__title-divider { - display: none; - } - - .workflow-studio-header__title-shell { - max-width: 320px; - } - - .workflow-studio-header__action-label--secondary { - display: none; - } - - .workflow-studio-header__compact-button { - min-width: 34px; - padding-inline: 8px; - } +.workflow-studio-header__action-divider { + background: #e5e7eb; + flex: 0 0 auto; + height: 20px; + margin-inline: 4px; + width: 1px; } @media (max-width: 980px) { @@ -323,6 +313,7 @@ const workflowStudioHeaderCss = ` } .workflow-studio-header__actions { + flex-wrap: wrap; justify-content: flex-start; } } @@ -350,6 +341,10 @@ const workflowStudioHeaderCss = ` display: none; } + .workflow-studio-header__action-divider { + display: none; + } + .workflow-studio-header__primary-button, .workflow-studio-header__status-button, .workflow-studio-header__compact-button { @@ -410,8 +405,9 @@ const HeaderBreadcrumb: React.FC = ({ event.preventDefault(); onNavigateToTeams(); }} + title={t('teamMemberWorkflowStudio.header.teamBreadcrumb', 'Teams')} > - {t('teamMemberWorkflowStudio.header.teamBreadcrumb', 'Team')} + {t('teamMemberWorkflowStudio.header.teamBreadcrumb', 'Teams')}