Skip to content

Commit e504315

Browse files
committed
thumb-input/output visual tweaks
1 parent ad53716 commit e504315

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

libs/app-canvas/src/app/nodes-gl/thumb-output.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export const getThumbOutputNode: NodeTaskFactory<GLNodeInfo> = (
146146
hasFormInPopup: true,
147147
additionalInnerNodeClassNames: 'rounded-full items-center justify-center',
148148
hasStaticWidthHeight: true,
149+
noFlexAutoInNodeContentWrapper: true,
149150
additionalClassNames:
150151
'rounded-full bg-yellow-500 border-[black] border-2 border-solid h-[90px] w-[90px] flex-[0_0_auto]',
151152
},

libs/visual-programming-system/src/utils/create-rect-node.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface NodeSettings {
6969
keepPopupOpenAfterUpdate?: boolean;
7070
hasCustomStyling?: boolean;
7171
customClassName?: string;
72+
noFlexAutoInNodeContentWrapper?: boolean;
7273
}
7374

7475
export const createRectNode = <T extends BaseNodeInfo>(
@@ -230,9 +231,10 @@ export const createRectNode = <T extends BaseNodeInfo>(
230231
(formElements.length === 0 && settings?.hasTitlebar === false) ||
231232
(settings?.hasFormInPopup && settings?.hasTitlebar === false);
232233

233-
let cssClasses = `border-slate-500 ${
234+
// warning: dont add colors here! it affects a lot of nodes (especially the thumb-output node-type)
235+
let cssClasses = `${
234236
hasCenteredLabel
235-
? 'border-slate-500 flex items-center justify-center text-center'
237+
? ' flex items-center justify-center text-center'
236238
: 'p-4 pt-4'
237239
}`;
238240
if (settings?.hasCustomStyling) {
@@ -249,7 +251,9 @@ export const createRectNode = <T extends BaseNodeInfo>(
249251
: hasBeforeDecorator && !hasAfterDecorator
250252
? 'rounded-b'
251253
: ''
252-
} min-h-auto flex-auto ${cssClasses}
254+
} min-h-auto ${
255+
settings?.noFlexAutoInNodeContentWrapper ? '' : 'flex-auto'
256+
} ${cssClasses}
253257
${settings?.additionalClassNames ?? ''}
254258
`,
255259
},

libs/web-flow-executor/src/nodes/thumb-input.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ export const getThumbInputNode: NodeTaskFactory<NodeInfo> = (
150150
category: 'Compositions',
151151
hasSettingsPopup: false,
152152
hasFormInPopup: true,
153+
154+
noFlexAutoInNodeContentWrapper: true,
153155
//hideTitle: true,
154-
additionalInnerNodeClassNames: 'rounded-full',
156+
additionalInnerNodeClassNames: 'rounded-full items-center justify-center',
155157
hasStaticWidthHeight: true,
156158
},
157159
undefined,

libs/web-flow-executor/src/nodes/thumb-output.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export const getThumbOutputNode: NodeTaskFactory<NodeInfo> = (
163163
hasFormInPopup: true,
164164
additionalInnerNodeClassNames: 'rounded-full items-center justify-center',
165165
hasStaticWidthHeight: true,
166+
noFlexAutoInNodeContentWrapper: true,
166167
additionalClassNames:
167168
'rounded-full bg-yellow-500 border-[black] border-2 border-solid h-[90px] w-[90px] flex-[0_0_auto]',
168169
},

0 commit comments

Comments
 (0)