Skip to content

Commit d66307f

Browse files
authored
fix responsive issues (supabase#40029)
* fix responsive issues * sidebar width
1 parent 64e3e04 commit d66307f

File tree

14 files changed

+105
-99
lines changed

14 files changed

+105
-99
lines changed

apps/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,19 @@ export const PolicyTableRowHeader = ({
4444

4545
return (
4646
<div id={table.id.toString()} className="flex w-full items-center justify-between">
47-
<div className="flex gap-x-4 text-left">
47+
<div className="flex gap-x-4 text-left flex-wrap">
4848
<EditorTablePageLink
4949
projectRef={ref}
5050
id={String(table.id)}
51-
className="flex items-center gap-x-3"
51+
className="flex items-center gap-3 flex-wrap"
5252
>
5353
<Table strokeWidth={1.5} size={16} className="text-foreground-muted" />
5454
<CardTitle className="m-0 normal-case">{table.name}</CardTitle>
55-
{!table.rls_enabled && <Badge variant="warning">RLS Disabled</Badge>}
55+
{!table.rls_enabled && (
56+
<Badge variant="warning" className="shrink-0">
57+
RLS Disabled
58+
</Badge>
59+
)}
5660
</EditorTablePageLink>
5761
{isTableLocked && (
5862
<Badge>

apps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ export const EnumeratedTypes = () => {
5656

5757
return (
5858
<div className="space-y-4">
59-
<div className="flex flex-col lg:flex-row lg:items-center justify-between gap-2">
60-
<div className="flex flex-col lg:flex-row lg:items-center gap-2">
59+
<div className="flex flex-col lg:flex-row lg:items-center justify-between gap-2 flex-wrap">
60+
<div className="flex flex-col lg:flex-row lg:items-center gap-2 flex-wrap">
6161
<SchemaSelector
6262
className="w-full lg:w-[180px]"
6363
size="tiny"

apps/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const TriggersList = ({
9797
return (
9898
<div className="space-y-4">
9999
<div className="flex flex-col lg:flex-row lg:items-center justify-between gap-2 flex-wrap">
100-
<div className="flex flex-col lg:flex-row lg:items-center gap-2">
100+
<div className="flex flex-col lg:flex-row lg:items-center gap-2 flex-wrap">
101101
<SchemaSelector
102102
className="w-full lg:w-[180px]"
103103
size="tiny"

apps/studio/components/interfaces/Home/AdvisorWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ export const AdvisorWidget = () => {
187187
}
188188

189189
return (
190-
<div>
190+
<div className="@container">
191191
{isLoadingLints ? (
192192
<ShimmeringLoader className="w-96 mb-6" />
193193
) : (
194194
<div className="flex justify-between items-center mb-6">{titleContent}</div>
195195
)}
196-
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
196+
<div className="grid grid-cols-1 @xl:grid-cols-2 gap-4">
197197
<Card className="h-80">
198198
<Tabs value={selectedTab} className="h-full flex flex-col">
199199
<CardHeader className="h-10 py-0 pl-4 pr-2 flex flex-row items-center justify-between flex-0">

apps/studio/components/interfaces/Home/Home.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export const Home = () => {
213213

214214
<>
215215
<div className="py-16 border-b border-muted">
216-
<div className="mx-auto max-w-7xl space-y-16">
216+
<div className="mx-auto max-w-7xl space-y-16 @container">
217217
{IS_PLATFORM && project?.status !== PROJECT_STATUS.INACTIVE && (
218218
<>{isNewProject ? <NewProjectPanel /> : <ProjectUsageSection />}</>
219219
)}
@@ -222,7 +222,7 @@ export const Home = () => {
222222
</div>
223223

224224
<div className="bg-surface-100/5 py-16">
225-
<div className="mx-auto max-w-7xl space-y-16">
225+
<div className="mx-auto max-w-7xl space-y-16 @container">
226226
{project?.status !== PROJECT_STATUS.INACTIVE && (
227227
<>
228228
<div className="space-y-8">

apps/studio/components/interfaces/Home/ProjectUsage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ const ProjectUsage = () => {
195195
Statistics for {selectedInterval.label.toLowerCase()}
196196
</span>
197197
</div>
198-
<div className="grid grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-4">
199-
<Panel className="mb-0 md:mb-0">
198+
<div className="grid grid-cols-1 @md:grid-cols-2 gap-4 @2xl:grid-cols-4">
199+
<Panel className="mb-0">
200200
<Panel.Content className="space-y-4">
201201
<PanelHeader
202202
icon={

apps/studio/components/interfaces/HomeNew/ActivityStats.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const ActivityStats = () => {
5555

5656
return (
5757
<div className="@container">
58-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-2 lg:gap-6 flex-wrap">
58+
<div className="grid grid-cols-1 @md:grid-cols-2 gap-2 @md:gap-6 flex-wrap">
5959
<ServiceStatus />
6060

6161
<SingleStat

apps/studio/components/interfaces/HomeNew/GettingStarted/GettingStarted.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ export function GettingStarted({ steps, onStepClick }: GettingStartedProps) {
7777
}
7878

7979
return (
80-
<Card className="overflow-hidden">
81-
<div className="flex flex-col lg:flex-row">
82-
<aside className="hidden border-r lg:block lg:w-[calc(1/3*100%-16px)]">
80+
<Card className="overflow-hidden @container">
81+
<div className="flex flex-col @2xl:flex-row">
82+
<aside className="hidden border-r @2xl:block @2xl:w-[calc(1/3*100%-16px)]">
8383
<ol>
8484
{steps.map((step, index) => {
8585
const isActive = step.key === activeStep.key
@@ -130,7 +130,7 @@ export function GettingStarted({ steps, onStepClick }: GettingStartedProps) {
130130
</aside>
131131

132132
<CardContent className="flex flex-1 flex-col gap-0 p-0 overflow-y-auto border-b-0">
133-
<div className="flex items-center justify-between gap-2 border-b px-2 py-2 lg:hidden">
133+
<div className="flex items-center justify-between gap-2 border-b px-2 py-2 @2xl:hidden">
134134
<span className="text-xs shrink-0 font-mono text-foreground-light w-7 h-7 bg border flex items-center justify-center rounded-md">
135135
{activeStepIndex + 1}
136136
</span>
@@ -186,7 +186,7 @@ export function GettingStarted({ steps, onStepClick }: GettingStartedProps) {
186186
<h3>{activeStep.title}</h3>
187187
<Badge
188188
variant={activeStep.status === 'complete' ? 'success' : 'default'}
189-
className="capitalize hidden lg:inline-flex"
189+
className="capitalize hidden @2xl:inline-flex"
190190
>
191191
{activeStep.status}
192192
</Badge>

apps/studio/components/interfaces/Settings/General/General.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const General = () => {
140140
<div className="mt-6" id="restart-project">
141141
<FormPanel>
142142
<div className="flex flex-col px-8 py-4">
143-
<div className="flex justify-between items-center">
143+
<div className="flex flex-col @lg:flex-row @lg:justify-between @lg:items-center gap-4">
144144
<div>
145145
<p className="text-sm">
146146
{projectSettingsRestartProject ? 'Restart project' : 'Restart database'}
@@ -155,7 +155,7 @@ export const General = () => {
155155
</div>
156156
</div>
157157
<div
158-
className="flex w-full items-center justify-between px-8 py-4"
158+
className="flex w-full flex-col @lg:flex-row @lg:justify-between @lg:items-center gap-4 px-8 py-4"
159159
id="pause-project"
160160
>
161161
<div>
@@ -173,7 +173,7 @@ export const General = () => {
173173
<div className="mt-6">
174174
<Panel>
175175
<Panel.Content>
176-
<div className="flex justify-between">
176+
<div className="flex flex-col @lg:flex-row @lg:justify-between @lg:items-center gap-4">
177177
<div className="flex space-x-4">
178178
<BarChart2 strokeWidth={2} />
179179
<div>

apps/studio/components/interfaces/Settings/General/TransferProjectPanel/TransferProjectPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const TransferProjectPanel = () => {
1818
/>
1919
<Panel>
2020
<Panel.Content>
21-
<div className="flex justify-between items-center gap-8">
21+
<div className="flex flex-col @lg:flex-row @lg:justify-between @lg:items-center gap-4">
2222
<div className="flex space-x-4">
2323
<Truck className="mt-1" />
2424
<div className="space-y-1 xl:max-w-lg">

0 commit comments

Comments
 (0)