Skip to content

Commit d3a5831

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
Polish Babysit reviewer field spacing
1 parent 3c0c2fa commit d3a5831

5 files changed

Lines changed: 31 additions & 3 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,16 @@ export function Editor() {
650650
: undefined
651651
}
652652
/>
653-
{showDivider && <FieldDivider subblockMarker />}
653+
{showDivider && (
654+
<FieldDivider
655+
subblockMarker
656+
className={
657+
regularSubBlocks[index + 1]?.hideDividerBefore
658+
? '[&>div]:invisible'
659+
: undefined
660+
}
661+
/>
662+
)}
654663
</div>
655664
)
656665
})}
@@ -707,7 +716,14 @@ export function Editor() {
707716
}
708717
/>
709718
{index < advancedOnlySubBlocks.length - 1 && (
710-
<FieldDivider subblockMarker />
719+
<FieldDivider
720+
subblockMarker
721+
className={
722+
advancedOnlySubBlocks[index + 1]?.hideDividerBefore
723+
? '[&>div]:invisible'
724+
: undefined
725+
}
726+
/>
711727
)}
712728
</div>
713729
)

apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,16 @@ function PreviewEditorContent({
14821482
subBlockValues={subBlockValues}
14831483
disabled={true}
14841484
/>
1485-
{index < visibleSubBlocks.length - 1 && <FieldDivider subblockMarker />}
1485+
{index < visibleSubBlocks.length - 1 && (
1486+
<FieldDivider
1487+
subblockMarker
1488+
className={
1489+
visibleSubBlocks[index + 1]?.hideDividerBefore
1490+
? '[&>div]:invisible'
1491+
: undefined
1492+
}
1493+
/>
1494+
)}
14861495
</div>
14871496
))}
14881497
</div>

apps/sim/blocks/blocks/pi.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ describe('Pi Create PR Babysit surface', () => {
108108
expect(mentions).toMatchObject({
109109
type: 'short-input',
110110
defaultValue: '',
111+
hideDividerBefore: true,
111112
required: {
112113
field: 'mode',
113114
value: 'cloud',

apps/sim/blocks/blocks/pi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
254254
placeholder: '@greptile, @cursor review',
255255
tooltip:
256256
'Required comma-separated issue comments. Each is posted after PR creation and again after every pushed Babysit fix.',
257+
hideDividerBefore: true,
257258
required: CLOUD_WITH_BABYSIT,
258259
condition: CLOUD_WITH_BABYSIT,
259260
},

apps/sim/blocks/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ export interface SubBlockConfig {
314314
connectionDroppable?: boolean
315315
hidden?: boolean
316316
hideFromPreview?: boolean // Hide this subblock from the workflow block preview
317+
hideDividerBefore?: boolean // Visually group this field with the preceding visible subblock
317318
showWhenEnvSet?: string // Show this subblock only when the named NEXT_PUBLIC_ env var is truthy
318319
hideWhenHosted?: boolean // Hide this subblock when running on hosted sim
319320
hideWhenEnvSet?: string // Hide this subblock when the named NEXT_PUBLIC_ env var is truthy

0 commit comments

Comments
 (0)