Skip to content

Commit 5c0af8c

Browse files
committed
fix(org): reserve a secret row's menu column only once a row has a menu
1 parent 398c998 commit 5c0af8c

2 files changed

Lines changed: 25 additions & 15 deletions

File tree

‎apps/sim/platform/embedded/app/(shell)/integrations/_components/secrets-editor/secret-rows.tsx‎

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,22 @@ interface SecretRowMenuProps {
101101

102102
function SecretRowMenu({ name, onDelete }: SecretRowMenuProps) {
103103
return (
104-
<ActionMenu
105-
label='Secret actions'
106-
icon='I108'
107-
actions={[
108-
{ id: 'copy', label: 'Copy name', onSelect: () => copySecretName(name) },
109-
{
110-
id: 'delete',
111-
label: 'Delete',
112-
destructive: true,
113-
separatorBefore: true,
114-
onSelect: onDelete,
115-
},
116-
]}
117-
/>
104+
<span className={styles.menu}>
105+
<ActionMenu
106+
label='Secret actions'
107+
icon='I108'
108+
actions={[
109+
{ id: 'copy', label: 'Copy name', onSelect: () => copySecretName(name) },
110+
{
111+
id: 'delete',
112+
label: 'Delete',
113+
destructive: true,
114+
separatorBefore: true,
115+
onSelect: onDelete,
116+
},
117+
]}
118+
/>
119+
</span>
118120
)
119121
}
120122

@@ -204,7 +206,7 @@ export function NewRow({ envVar, index, onUpdate, onPaste }: NewRowProps) {
204206
}}
205207
/>
206208
) : (
207-
<span />
209+
<span className={styles.menuSlot} />
208210
)}
209211
{keyError && (
210212
<p className={styles.rowError} data-type='T052' role='alert'>

‎apps/sim/platform/embedded/app/(shell)/integrations/_components/secrets-editor/secrets-editor.module.css‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
min-inline-size: 0;
88
}
99

10+
/* Rows hold a column for their menu only once one has it, so a lone blank row meets the card's edge. */
11+
.rows:not(:has(> .menu)) {
12+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
13+
}
14+
.rows:not(:has(> .menu)) > .menuSlot {
15+
display: none;
16+
}
17+
1018
.rowError {
1119
grid-column: 1 / -1;
1220
color: var(--control-danger);

0 commit comments

Comments
 (0)