Skip to content

Commit b0c3af5

Browse files
authored
Small adjustment to branch paddings (supabase#37238)
* Small adjustment to branch paddings * For merge request too * DRY
1 parent ef2fbb8 commit b0c3af5

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

apps/studio/components/interfaces/BranchManagement/BranchPanels.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export const BranchManagementSection = ({
2424
<div className="bg-surface-100 shadow-sm flex justify-between items-center px-4 py-3 rounded-t-lg text-xs font-mono uppercase">
2525
{typeof header === 'string' ? <span>{header}</span> : header}
2626
</div>
27-
<div className="bg-surface border-t shadow-sm rounded-b-lg text-sm divide-y">{children}</div>
27+
<div className="bg-surface border-t shadow-sm rounded-b-lg text-sm divide-y px-4">
28+
{children}
29+
</div>
2830
{footer !== undefined && <div className="bg-surface-100 px-6 py-1 border-t">{footer}</div>}
2931
</div>
3032
)

apps/studio/components/interfaces/BranchManagement/EmptyStates.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { BranchSelector } from './BranchSelector'
66
import { DocsButton } from 'components/ui/DocsButton'
77
import { Button } from 'ui'
88

9+
const EMPTY_STATE_CONTAINER = 'flex items-center flex-col justify-center w-full py-10 px-4'
10+
911
export const PullRequestsEmptyState = ({
1012
url,
1113
projectRef,
@@ -24,9 +26,9 @@ export const PullRequestsEmptyState = ({
2426
gitlessBranching: boolean
2527
}) => {
2628
return (
27-
<div className="flex items-center flex-col justify-center w-full py-10">
29+
<div className={EMPTY_STATE_CONTAINER}>
2830
<p>No merge requests</p>
29-
<p className="text-foreground-light">
31+
<p className="text-foreground-light text-center">
3032
Create your first merge request to merge changes back to the main branch
3133
</p>
3234
<div className="flex items-center space-x-2 mt-4">
@@ -60,9 +62,9 @@ export const PreviewBranchesEmptyState = ({
6062
onSelectCreateBranch: () => void
6163
}) => {
6264
return (
63-
<div className="flex items-center flex-col justify-center w-full py-10">
65+
<div className={EMPTY_STATE_CONTAINER}>
6466
<p>Create your first preview branch</p>
65-
<p className="text-foreground-light mb-4">
67+
<p className="text-foreground-light text-center mb-4">
6668
Preview branches are short-lived environments that let you safely experiment with changes to
6769
your database schema without affecting your main database.
6870
</p>

apps/studio/components/interfaces/BranchManagement/Overview.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import { useState } from 'react'
1616
import { toast } from 'sonner'
1717

1818
import { useParams } from 'common'
19+
import { useIsBranching2Enabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
1920
import { DropdownMenuItemTooltip } from 'components/ui/DropdownMenuItemTooltip'
2021
import { useBranchQuery } from 'data/branches/branch-query'
2122
import { useBranchResetMutation } from 'data/branches/branch-reset-mutation'
2223
import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation'
2324
import type { Branch } from 'data/branches/branches-query'
2425
import { branchKeys } from 'data/branches/keys'
2526
import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
26-
import { useIsBranching2Enabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
2727
import {
2828
Button,
2929
DropdownMenu,
@@ -32,10 +32,10 @@ import {
3232
DropdownMenuTrigger,
3333
} from 'ui'
3434
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
35+
import TextConfirmModal from 'ui-patterns/Dialogs/TextConfirmModal'
3536
import { BranchLoader, BranchManagementSection, BranchRow, BranchRowLoader } from './BranchPanels'
3637
import { EditBranchModal } from './EditBranchModal'
3738
import { PreviewBranchesEmptyState } from './EmptyStates'
38-
import TextConfirmModal from 'ui-patterns/Dialogs/TextConfirmModal'
3939

4040
interface OverviewProps {
4141
isLoading: boolean
@@ -99,7 +99,7 @@ export const Overview = ({
9999
{isSuccess && persistentBranches.length === 0 && (
100100
<div className="flex items-center flex-col justify-center w-full py-10">
101101
<p>No persistent branches</p>
102-
<p className="text-foreground-light">
102+
<p className="text-foreground-light text-center">
103103
Persistent branches are long-lived, cannot be reset, and are ideal for staging
104104
environments.
105105
</p>

0 commit comments

Comments
 (0)