From 89a2f6b53ffe1c6fc65ed1d918d9a137a78f612f Mon Sep 17 00:00:00 2001 From: qingqing-ux Date: Mon, 6 Jul 2026 22:43:09 +0800 Subject: [PATCH 01/10] Update tutorial editor layout --- .../src/apps/xbuilder/pages/editor/index.vue | 5 +- spx-gui/src/components/copilot/CopilotUI.vue | 204 +++++++++++++++++- .../src/components/editor/ProjectEditor.vue | 109 +++++++--- .../components/editor/navbar/EditorNavbar.vue | 8 +- .../editor/preview/EditorPreview.vue | 81 ++++++- .../tutorials/TutorialNavbarExit.vue | 61 ++++++ spx-gui/src/components/tutorials/tutorial.ts | 4 + .../xgo-code-editor/ui/CodeEditorUI.vue | 107 +++++++-- .../ui/api-reference/APIReferenceUI.vue | 141 +++++++++++- 9 files changed, 649 insertions(+), 71 deletions(-) create mode 100644 spx-gui/src/components/tutorials/TutorialNavbarExit.vue diff --git a/spx-gui/src/apps/xbuilder/pages/editor/index.vue b/spx-gui/src/apps/xbuilder/pages/editor/index.vue index e683866cb..62ec4c83d 100644 --- a/spx-gui/src/apps/xbuilder/pages/editor/index.vue +++ b/spx-gui/src/apps/xbuilder/pages/editor/index.vue @@ -3,7 +3,7 @@
-
+
{{ $t(allQueryRet.progress.value.desc ?? { en: 'Loading...', zh: '加载中...' }) }} @@ -64,6 +64,7 @@ import { cloudHelpers } from '@/models/common/cloud' import { localHelpers, type LocalHelpers } from '@/models/common/local' import type { ProjectSerialized } from '@/models/project' import { SpxProject } from '@/models/spx/project' +import { useMaybeTutorial } from '@/components/tutorials/tutorial' const props = defineProps<{ ownerNameInput: string @@ -72,6 +73,8 @@ const props = defineProps<{ const localCache = new LocalCache(localHelpers) const signedInStateQuery = useSignedInStateQuery() +const tutorial = useMaybeTutorial() +const isTutorialCourse = computed(() => tutorial?.currentCourse != null) const router = useRouter() const routeProjectIdentifier = computed(() => ({ diff --git a/spx-gui/src/components/copilot/CopilotUI.vue b/spx-gui/src/components/copilot/CopilotUI.vue index 47af82e96..92bee131e 100644 --- a/spx-gui/src/components/copilot/CopilotUI.vue +++ b/spx-gui/src/components/copilot/CopilotUI.vue @@ -21,10 +21,14 @@ enum TriggerVisibility { const panelBoundaryBuffer = [20, 20] const triggerSnapThreshold = 20 +const tutorialPanelBottom = 96 +const tutorialPanelTopBuffer = 20 +const tutorialPanelDefaultHeight = 320 +const tutorialPanelMinHeight = 240