From f222249f4f08c23f77f8c663b2985e25de316c9a Mon Sep 17 00:00:00 2001 From: George Desipris <73396808+desiprisg@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:12:55 +0200 Subject: [PATCH] feat(dashboard): Read only code first workflows & sidebar cleanups (#6823) --- apps/dashboard/eslint.config.js | 2 +- .../src/components/dashboard-layout.tsx | 2 +- .../header-navigation/header-navigation.tsx | 17 ++-- .../src/components/primitives/button.tsx | 38 ++++++- .../src/components/primitives/pagination.tsx | 3 +- .../src/components/primitives/variants.ts | 33 ------- .../components/side-navigation/Sidebar.tsx | 33 +++++++ .../side-navigation/side-navigation.tsx | 99 ++++++++++--------- .../workflow-editor/action-picker.tsx | 3 +- .../workflow-editor/configure-workflow.tsx | 71 +++++++------ .../src/components/workflow-editor/edges.tsx | 14 +-- .../src/components/workflow-editor/nodes.tsx | 6 +- .../components/workflow-editor/steps/chat.tsx | 7 +- .../workflow-editor/steps/common-fields.tsx | 6 +- .../workflow-editor/steps/configure-step.tsx | 37 +++++-- .../steps/delete-step-button.tsx | 17 ---- .../steps/edit-step-sidebar.tsx | 14 +-- .../workflow-editor/steps/in-app.tsx | 17 ++-- .../test-workflow-logs-sidebar.tsx | 2 +- .../workflow-editor-context.tsx | 1 + .../workflow-editor-provider.tsx | 6 +- .../src/components/workflow-list.tsx | 3 +- apps/dashboard/src/hooks/use-form-autosave.ts | 6 +- apps/dashboard/src/pages/edit-workflow.tsx | 5 +- 24 files changed, 251 insertions(+), 191 deletions(-) create mode 100644 apps/dashboard/src/components/side-navigation/Sidebar.tsx delete mode 100644 apps/dashboard/src/components/workflow-editor/steps/delete-step-button.tsx diff --git a/apps/dashboard/eslint.config.js b/apps/dashboard/eslint.config.js index 16d07b7f581..95bb45ab773 100644 --- a/apps/dashboard/eslint.config.js +++ b/apps/dashboard/eslint.config.js @@ -20,7 +20,7 @@ export default tseslint.config( rules: { ...reactHooks.configs.recommended.rules, '@typescript-eslint/no-explicit-any': 'warn', - 'react-refresh/only-export-components': ['error', { allowConstantExport: true }], + 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], '@typescript-eslint/no-unused-vars': ['off'], '@typescript-eslint/naming-convention': [ 'error', diff --git a/apps/dashboard/src/components/dashboard-layout.tsx b/apps/dashboard/src/components/dashboard-layout.tsx index 8977c31bca5..366bb332969 100644 --- a/apps/dashboard/src/components/dashboard-layout.tsx +++ b/apps/dashboard/src/components/dashboard-layout.tsx @@ -18,7 +18,7 @@ export const DashboardLayout = ({