Skip to content

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

Adjust colors in table side panel editor

Joshen Limf6aa72a2dec8
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
index 601dd0a745a..af761a0447d 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
@@ -1,12 +1,5 @@
import React, { FC } from 'react'
-import {
- IconCalendar,
- IconType,
- IconHash,
- Listbox,
- Typography,
- IconToggleRight,
-} from '@supabase/ui'
+import { IconCalendar, IconType, IconHash, Listbox, IconToggleRight } from '@supabase/ui'
import { POSTGRES_DATA_TYPE_OPTIONS } from '../SidePanelEditor.constants'
import { PostgresDataTypeOption, EnumType } from '../SidePanelEditor.types'
@@ -59,7 +52,8 @@ const ColumnType: FC<Props> = ({
value={value}
size={size}
error={error}
- className={`${className} ${disabled ? 'column-type-disabled' : ''}`}
+ disabled={disabled}
+ className={`${className} ${disabled ? 'column-type-disabled' : ''} rounded-md`}
onChange={(value: string) => onOptionSelect(value)}
optionsWidth={480}
>
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index 390a1575586..9b002618665 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -10,15 +10,13 @@ import {
IconLink,
IconSettings,
Button,
- Listbox,
} from '@supabase/ui'
-import { ColumnField, EnumType, PostgresDataTypeOption } from '../SidePanelEditor.types'
+import { ColumnField, EnumType } from '../SidePanelEditor.types'
import ColumnType from '../ColumnEditor/ColumnType'
import InputWithSuggestions from '../ColumnEditor/InputWithSuggestions'
import { Suggestion } from '../ColumnEditor/ColumnEditor.types'
import { typeExpressionSuggestions } from '../ColumnEditor/ColumnEditor.constants'
-import { POSTGRES_DATA_TYPE_OPTIONS } from '../SidePanelEditor.constants'
/**
* [Joshen] For context:
@@ -85,10 +83,10 @@ const Column: FC<Props> = ({
disabled={hasImportContent}
className={`table-editor-columns-input bg-white dark:bg-transparent lg:gap-0 ${
hasImportContent ? 'opacity-50' : ''
- }`}
+ } rounded-md`}
actions={
<Button
- type={!isUndefined(column.foreignKey) ? 'secondary' : 'default'}
+ type={!isUndefined(column.foreignKey) ? 'default' : 'outline'}
onClick={() => onEditRelation(column)}
>
<IconLink size={14} strokeWidth={!isUndefined(column.foreignKey) ? 2 : 1} />
@@ -100,32 +98,6 @@ const Column: FC<Props> = ({
</div>
<div className="w-[25%]">
<div className="w-[95%]">
- {/* <Listbox onChange={() => console.log('foo')} defaultValue={1} className="lg:gap-0 ">
- {POSTGRES_DATA_TYPE_OPTIONS.map((option: PostgresDataTypeOption, i) => {
- if (i > 8) return
-
- return (
- <Listbox.Option
- key={option.name}
- value={option.name}
- label={option.name}
-
- // addOnBefore={() => inferIcon(option.type)}
- >
- <div className="flex items-center space-x-4">
- <Typography.Text>
- <p>{option.name}</p>
- </Typography.Text>
- <p>
- <Typography.Text small className="opacity-50">
- {option.description}
- </Typography.Text>
- </p>
- </div>
- </Listbox.Option>
- )
- })}
- </Listbox> */}
<ColumnType
value={column.format}
enumTypes={enumTypes}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
index c95f4e4aabf..87c662797cd 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
@@ -239,7 +239,7 @@ const ColumnManagement: FC<Props> = ({
{(droppableProvided: DroppableProvided) => (
<div
ref={droppableProvided.innerRef}
- className={`space-y-2 bg-gray-500 rounded-md px-3 py-2 ${
+ className={`space-y-2 bg-gray-400 rounded-md px-3 py-2 ${
isNewRecord ? '' : '-mx-3'
}`}
>