Skip to content

Commit 612807b

Browse files
committed
feat: add examples on workflow
1 parent eebd3f5 commit 612807b

2 files changed

Lines changed: 53 additions & 9 deletions

File tree

app/components/vueFlow/LitestarWorkflow.vue

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ const nodes = computed<Node[]>(() => [
102102
type: 'icon',
103103
data: {
104104
label: '⎇+',
105-
tooltip: '<span style="color: #3b82f6;">Anonymize PII data</span>',
105+
tooltip: `<strong>Application Layer Config:</strong>
106+
<strong>response_headers:</strong> {"X-App-Version": "1.0"}
107+
<strong>tags:</strong> ["public-api"]
108+
<strong>cache:</strong> 300`,
106109
toolbarPosition: Position.Right,
107110
},
108111
position: { x: 230, y: 155 },
@@ -138,7 +141,15 @@ const nodes = computed<Node[]>(() => [
138141
type: 'icon',
139142
data: {
140143
label: '⎇+',
141-
tooltip: 'Router configuration',
144+
tooltip: `<strong>Router/Controller Layer:</strong>
145+
<em>Inherits from Application:</em>
146+
<strong>response_headers:</strong> {"X-App-Version": "1.0"}
147+
<strong>tags:</strong> ["public-api"]
148+
<strong>cache:</strong> 300
149+
150+
<em>Adds/Overrides:</em>
151+
<strong>tags:</strong> ["public-api", "users"] <em>(extended)</em>
152+
<strong>guards:</strong> [AuthGuard]`,
142153
toolbarPosition: Position.Right,
143154
},
144155
position: { x: 230, y: 335 },
@@ -188,7 +199,17 @@ const nodes = computed<Node[]>(() => [
188199
type: 'icon',
189200
data: {
190201
label: '⎇+',
191-
tooltip: 'Handler configuration',
202+
tooltip: `<strong>GET /users Handler:</strong>
203+
<em>Inherits from Router/Controller:</em>
204+
<strong>response_headers:</strong> {"X-App-Version": "1.0"}
205+
<strong>tags:</strong> ["public-api", "users"]
206+
<strong>cache:</strong> 300
207+
<strong>guards:</strong> [AuthGuard]
208+
209+
<em>Adds/Overrides:</em>
210+
<strong>cache:</strong> 600 <em>(overridden)</em>
211+
<strong>summary:</strong> "List all users"
212+
<strong>response_description:</strong> "List of users"`,
192213
toolbarPosition: Position.Right,
193214
},
194215
position: { x: 80, y: 130 },
@@ -212,12 +233,18 @@ const nodes = computed<Node[]>(() => [
212233
type: 'icon',
213234
data: {
214235
label: '⎇+',
215-
tooltip: `<strong>operation_id:</strong> ListUsers
216-
<strong>name:</strong> users:list
217-
<strong>summary:</strong> List Users
218-
<strong>description:</strong> Retrieve the users.
219-
<strong>path:</strong> /users
220-
<strong>cache:</strong> None`,
236+
tooltip: `<strong>POST /users Handler:</strong>
237+
<em>Inherits from Router/Controller:</em>
238+
<strong>response_headers:</strong> {"X-App-Version": "1.0"}
239+
<strong>tags:</strong> ["public-api", "users"]
240+
<strong>cache:</strong> 300
241+
<strong>guards:</strong> [AuthGuard]
242+
243+
<em>Adds/Overrides:</em>
244+
<strong>cache:</strong> None <em>(disabled)</em>
245+
<strong>guards:</strong> [AuthGuard, AdminGuard] <em>(extended)</em>
246+
<strong>summary:</strong> "Create a new user"
247+
<strong>status_code:</strong> 201`,
221248
toolbarPosition: Position.Right,
222249
},
223250
position: { x: 80, y: 130 },
@@ -343,12 +370,25 @@ const edges = computed<Edge[]>(() => {
343370
.vue-flow {
344371
flex: 1;
345372
background: #ffffff;
373+
overflow: visible !important;
346374
}
347375
348376
.dark .vue-flow {
349377
background: #0f172a;
350378
}
351379
380+
:deep(.vue-flow__viewport) {
381+
overflow: visible !important;
382+
}
383+
384+
:deep(.vue-flow__transformationpane) {
385+
overflow: visible !important;
386+
}
387+
388+
:deep(.vue-flow__node-toolbar) {
389+
z-index: 1000;
390+
}
391+
352392
.vue-flow__node {
353393
cursor: default;
354394
}

app/components/vueFlow/nodes/ToolbarNode.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ defineProps<{
3333
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
3434
line-height: 1.6;
3535
border: 1px solid #d1d5db;
36+
max-width: 350px;
37+
max-height: 400px;
38+
overflow-y: auto;
39+
z-index: 1000;
3640
}
3741
3842
.dark .toolbar-content {

0 commit comments

Comments
 (0)