Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

changed column name place holders and added tips

Ollie Halliday3d53962e9759
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
index 86b44263d1f..f2cb7dcd35a 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.tsx
@@ -190,6 +190,8 @@ const ColumnEditor: FC<Props> = ({
<Input
label="Name"
type="text"
+ descriptionText="Recommended to use lowercase and use an underscore to seperate words e.g. column_name"
+ placeholder='column_name'
error={errors.name}
value={columnFields?.name ?? ''}
onChange={(event: any) => onUpdateField({ name: event.target.value })}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index f435ec8964b..4939942cfa7 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -71,7 +71,7 @@ const Column: FC<Props> = ({
size="small"
title={column.name}
disabled={hasImportContent}
- placeholder="Column name"
+ placeholder="column_name"
className={`table-editor-columns-input bg-white dark:bg-transparent lg:gap-0 ${
hasImportContent ? 'opacity-50' : ''
} rounded-md`}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
index 270980835a6..d3d305ec315 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
@@ -197,8 +197,29 @@ const ColumnManagement: FC<Props> = ({
<div className="flex w-full px-3">
{/* Drag handle */}
{isNewRecord && <div className="w-[5%]" />}
- <div className="w-[25%]">
+ <div className="w-[25%] flex items-center space-x-2">
<h5 className="text-xs text-scale-900">Name</h5>
+ <Tooltip.Root delayDuration={0}>
+ <Tooltip.Trigger>
+ <h5 className="text-xs text-scale-900">
+ <IconHelpCircle size={15} strokeWidth={1.5} />
+ </h5>
+ </Tooltip.Trigger>
+ <Tooltip.Content side="bottom">
+ <Tooltip.Arrow className="radix-tooltip-arrow" />
+ <div
+ className={[
+ 'rounded bg-scale-100 py-1 px-2 leading-none shadow', // background
+ 'border border-scale-200 ', //border
+ ].join(' ')}
+ >
+ <span className="text-xs text-scale-1200">
+ Recommended to use lowercase and use an underscore to seperate words e.g.
+ column_name
+ </span>
+ </div>
+ </Tooltip.Content>
+ </Tooltip.Root>
</div>
<div className="w-[25%]">
<h5 className="text-xs text-scale-900">Type</h5>