Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
value: queueButtonTooltip,
showDelay: 600
}"
v-coachmark="COACH_IDS.graphRunButton"
:variant="queueButtonVariant"
size="unset"
:class="queueActionButtonClass"
Expand Down Expand Up @@ -79,6 +80,8 @@ import TinyChevronIcon from '@/components/actionbar/TinyChevronIcon.vue'
import Button from '@/components/ui/button/Button.vue'
import ButtonGroup from '@/components/ui/button-group/ButtonGroup.vue'
import { isCloud } from '@/platform/distribution/types'
import { COACH_IDS } from '@/platform/onboarding/onboardingTours'
import { vCoachmark } from '@/platform/onboarding/vCoachmark'
import { useTelemetry } from '@/platform/telemetry'
import { useCommandStore } from '@/stores/commandStore'
import { useExecutionErrorStore } from '@/stores/executionErrorStore'
Expand Down
8 changes: 6 additions & 2 deletions src/composables/graph/useGraphNodeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import type {
INodeOutputSlot
} from '@/lib/litegraph/src/interfaces'
import type { IBaseWidget } from '@/lib/litegraph/src/types/widgets'
import { isCoachKey, COACH_IDS } from '@/platform/onboarding/onboardingTours'
import type { CoachId } from '@/platform/onboarding/onboardingTours'
import { useLayoutMutations } from '@/renderer/core/layout/operations/layoutMutations'
import { layoutStore } from '@/renderer/core/layout/store/layoutStore'
import { LayoutSource } from '@/renderer/core/layout/types'
Expand Down Expand Up @@ -124,6 +126,7 @@ export interface VueNodeData {
showAdvanced?: boolean
subgraphId?: string | null
titleMode?: TitleMode
tourStep?: CoachId
widgets?: SafeWidgetData[]
}

Expand Down Expand Up @@ -451,7 +454,7 @@ export function extractVueNodeData(node: LGraphNode): VueNodeData {

const apiNode = node.constructor?.nodeData?.api_node ?? false
const badges = node.badges

const tourStep = node.properties.tourStep
return {
id: node.id,
title: typeof node.title === 'string' ? node.title : '',
Expand All @@ -472,7 +475,8 @@ export function extractVueNodeData(node: LGraphNode): VueNodeData {
bgcolor: node.bgcolor || undefined,
resizable: node.resizable,
shape: node.shape,
showAdvanced: node.showAdvanced
showAdvanced: node.showAdvanced,
tourStep: isCoachKey(tourStep) ? COACH_IDS[tourStep] : undefined
}
}

Expand Down
14 changes: 14 additions & 0 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4737,6 +4737,20 @@
"title": "Find all your assets",
"body": "Every generation and import lives in Media Assets. Open it anytime to browse, download, or reuse past work."
}
},
"graph": {
"nodeReference": {
"title": "Start with an image",
"body": "This picture will be used as reference. Swap in your own whenever you like."
},
"nodePrompt": {
"title": "Describe what you want",
"body": "Your image gets built from this description. Try anything you like."
},
"run": {
"title": "Run your workflow",
"body": "Press Run to start generating your result."
}
Comment thread
AustinMroz marked this conversation as resolved.
Resolved
}
}
}
13 changes: 12 additions & 1 deletion src/platform/onboarding/TourSpotlight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!targetRect && 'bg-coach-scrim'
)
"
:style="blockerStyle"
/>
<div
aria-hidden="true"
Expand All @@ -23,7 +24,7 @@
<div
ref="cardRef"
role="dialog"
aria-modal="true"
:aria-modal="!allowsTargetInteraction"
Comment thread
AustinMroz marked this conversation as resolved.
Resolved
:aria-labelledby="titleId"
:aria-describedby="`${subtitleId} ${bodyId}`"
class="pointer-events-auto absolute max-h-[calc(100vh-var(--comfy-topbar-height)-2rem)] overflow-y-auto motion-safe:transition-[left,top] motion-safe:duration-300"
Expand Down Expand Up @@ -105,6 +106,7 @@ import {
CARD_WIDTH,
SPOTLIGHT_PAD,
VIEWPORT_MARGIN,
blockerClipPath,
clampSpotlight,
noTargetCardLeft
} from './coachmarkLayout'
Expand Down Expand Up @@ -155,6 +157,8 @@ const { width: windowWidth, height: windowHeight } = useWindowSize()
const { targetRect, targetEl, floatingStyles, isPositioned } =
useCoachmarkTarget(() => step, cardRef)

const allowsTargetInteraction = computed(() => countedStepIdx % 2 === 0)

// Last step's "Done" already dismisses, so hide Skip there.
const showSkip = computed(() => !isLast)

Expand Down Expand Up @@ -217,6 +221,13 @@ const spotlightStyle = computed(() => {
return { ...clampSpotlight(r, SPOTLIGHT_PAD, viewport()), opacity: '1' }
})

const blockerStyle = computed(() => {
const r = targetRect.value
if (r && allowsTargetInteraction.value)
return { clipPath: blockerClipPath(r) }
return {}
})

const cardStyle = computed(() => {
const width = `${CARD_WIDTH}px`
const maxWidth = `calc(100vw - ${VIEWPORT_MARGIN * 2}px)`
Expand Down
8 changes: 8 additions & 0 deletions src/platform/onboarding/coachmarkLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export function clampSpotlight(
}
}

export function blockerClipPath(r: DOMRect): string {
const x1 = `${r.left}px`
const y1 = `${r.top}px`
const x2 = `${r.right}px`
const y2 = `${r.bottom}px`
return `polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, ${x1} ${y1}, ${x1} ${y2}, ${x2} ${y2}, ${x2} ${y1}, ${x1} ${y1})`
}

export function noTargetCardLeft(viewportWidth: number): number {
return Math.max(VIEWPORT_MARGIN, (viewportWidth - CARD_WIDTH) / 2)
}
Expand Down
56 changes: 52 additions & 4 deletions src/platform/onboarding/onboardingTours.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export type EntryPath = 'appMode'
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
import { app } from '@/scripts/app'

export type EntryPath = 'appMode' | 'graph'

/** Setting holding the tours the user has completed or dismissed. */
export const TOUR_SEEN_SETTING = 'Comfy.OnboardingCoachmarks.Seen'
Expand All @@ -18,10 +21,15 @@
appRunButton: 'app-run-button',
inputsList: 'inputs-list',
outputs: 'outputs',
assetsPanel: 'assets-panel'
assetsPanel: 'assets-panel',

nodeReference: 'node-reference',
nodePrompt: 'node-prompt',
graphRunButton: 'graph-run-button'
} as const

export type CoachId = (typeof COACH_IDS)[keyof typeof COACH_IDS]
type CoachKey = keyof typeof COACH_IDS
export type CoachId = (typeof COACH_IDS)[CoachKey]

export interface CoachStep {
/**
Expand All @@ -42,6 +50,10 @@
image?: string
}

export function isCoachKey(val: unknown): val is CoachKey {
return typeof val === 'string' && val in COACH_IDS
}
Comment thread
AustinMroz marked this conversation as resolved.
Resolved

/**
* Fixes the running step set (and so the step count) at tour start: drops steps
* whose own target isn't mounted, keeping targetless and deferred steps.
Expand Down Expand Up @@ -88,5 +100,41 @@
deferTarget: true,
openSidebarTab: 'assets'
}
]
],
get graph(): CoachStep[] {
const nodeKeys: CoachKey[] = ['nodeReference', 'nodePrompt']
const { nodes } = app.graph

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open on a mobile-width viewport

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open in arrange (builder) mode

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open in arrange (builder) mode

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open in arrange (builder) mode

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open in an empty app with no linear controls

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open in an empty app with no linear controls

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > does not auto-open in an empty app with no linear controls

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > auto-opens when entering a populated app it has not seen

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > auto-opens when entering a populated app it has not seen

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10

Check failure on line 106 in src/platform/onboarding/onboardingTours.ts

View workflow job for this annotation

GitHub Actions / test

src/platform/onboarding/onboardingTourStore.test.ts > onboardingTourStore > auto-opens when entering a populated app it has not seen

TypeError: Cannot destructure property 'nodes' of 'app.graph' as it is undefined. ❯ Object.get graph [as graph] src/platform/onboarding/onboardingTours.ts:106:13 ❯ startTour src/platform/onboarding/onboardingTourStore.ts:198:35 ❯ immediate src/platform/onboarding/onboardingTourStore.ts:175:22 ❯ callWithErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:200:19 ❯ callWithAsyncErrorHandling node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:207:17 ❯ baseWatchOptions.call node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:884:47 ❯ job node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1924:18 ❯ Object.watch node_modules/.pnpm/@VUE+reactivity@3.5.39/node_modules/@vue/reactivity/dist/reactivity.cjs.js:1959:7 ❯ doWatch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:912:34 ❯ watch node_modules/.pnpm/@VUE+runtime-core@3.5.39/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:845:10
const nodeSteps: [CoachKey, LGraphNode][] = nodeKeys.flatMap((key) => {
const node = nodes.find((n) => n.properties.tourStep === key)
return node ? [[key, node]] : []
})

const visible = new Set(app.canvas.visible_nodes.map((node) => node.id))
if (!nodeSteps.map(([, node]) => node.id).every((id) => visible.has(id))) {
app.canvas.selectItems(nodeSteps.map(([, node]) => node))
app.canvas.fitViewToSelectionAnimated()
app.canvas.selectItems([])
Comment thread
AustinMroz marked this conversation as resolved.
Resolved
}
return [
...nodeSteps.map(([key]) => ({
name: key,
coachId: COACH_IDS[key],
placement: 'auto' as const,
deferTarget: true
})),
{
name: 'run',
coachId: COACH_IDS.graphRunButton,
placement: 'auto' as const,
deferTarget: true
},
{
name: 'assets',
coachId: COACH_IDS.assetsPanel,
placement: 'auto' as const,
deferTarget: true,
openSidebarTab: 'assets'
}
]
}
}
13 changes: 13 additions & 0 deletions src/platform/onboarding/useTourTriggers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { computed } from 'vue'
import type { ComputedRef } from 'vue'

import { useAppMode } from '@/composables/useAppMode'
import { useSettingStore } from '@/platform/settings/settingStore'
import { useAppModeStore } from '@/stores/appModeStore'

import type { EntryPath } from './onboardingTours'
Expand All @@ -16,15 +17,27 @@ export interface TourTrigger {
export function useTourTriggers(): [EntryPath, TourTrigger][] {
const { mode } = useAppMode()
const appModeStore = useAppModeStore()
const settingStore = useSettingStore()
const desktopLayout = useBreakpoints(breakpointsTailwind).greaterOrEqual('md')
const inAppMode = computed(() => desktopLayout.value && mode.value === 'app')

const inGraphMode = computed(() => mode.value === 'graph')
return [
[
'appMode',
{
holds: inAppMode,
autoOpen: computed(() => inAppMode.value && appModeStore.hasOutputs)
}
],
[
'graph',
{
holds: inGraphMode,
autoOpen: computed(
() => !settingStore.get('Comfy.TutorialCompleted') || true
)
Comment thread
AustinMroz marked this conversation as resolved.
Resolved
}
]
]
}
2 changes: 2 additions & 0 deletions src/renderer/extensions/vueNodes/components/LGraphNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div
v-else
ref="nodeContainerRef"
v-coachmark="nodeData.tourStep"
tabindex="0"
:data-node-id="nodeData.id"
:data-collapsed="isCollapsed || undefined"
Expand Down Expand Up @@ -268,6 +269,7 @@ import {
} from '@/lib/litegraph/src/litegraph'
import { SubgraphNode } from '@/lib/litegraph/src/subgraph/SubgraphNode'
import { TitleMode } from '@/lib/litegraph/src/types/globalEnums'
import { vCoachmark } from '@/platform/onboarding/vCoachmark'
import { useSettingStore } from '@/platform/settings/settingStore'
import { useTelemetry } from '@/platform/telemetry'
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
Expand Down
Loading