Skip to content

Commit 431dcb0

Browse files
committed
improvement(tables): reword referenced table delete warning
1 parent e3ec480 commit 431dcb0

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/tables/hooks/use-referenced-by-warning.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ describe('referencedByWarningText', () => {
2020

2121
it('names a single referencing table', () => {
2222
expect(referencedByWarningText(['Orders'])).toEqual([
23-
' Referenced by Orders. Those references will show as not found.',
23+
' Reference columns in Orders will point to a missing table.',
2424
])
2525
})
2626

2727
it('joins referencing tables as a readable list', () => {
2828
expect(referencedByWarningText(['Invoices', 'Orders'])).toEqual([
29-
' Referenced by Invoices and Orders. Those references will show as not found.',
29+
' Reference columns in Invoices and Orders will point to a missing table.',
3030
])
3131
})
3232

3333
it('lists the first three names and summarizes the rest', () => {
3434
expect(referencedByWarningText(['Accounts', 'Invoices', 'Leads', 'Orders', 'Quotes'])).toEqual([
35-
' Referenced by Accounts, Invoices, Leads, and 2 more. Those references will show as not found.',
35+
' Reference columns in Accounts, Invoices, Leads, and 2 more will point to a missing table.',
3636
])
3737
})
3838
})

‎apps/sim/app/workspace/[workspaceId]/tables/hooks/use-referenced-by-warning.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export function referencedByWarningText(
2222
const remaining = referrerNames.length - listed.length
2323
const names = remaining > 0 ? [...listed, `${remaining} more`] : listed
2424

25-
return [
26-
` Referenced by ${NAME_LIST_FORMAT.format(names)}. Those references will show as not found.`,
27-
]
25+
return [` Reference columns in ${NAME_LIST_FORMAT.format(names)} will point to a missing table.`]
2826
}
2927

3028
/**

0 commit comments

Comments
 (0)