mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
copy(studio): rename 'Trash' to 'Deleted files' in the Storage UI
Renamed every user-facing occurrence: the Files sub-tab label, the bucket detail page's link button, the empty state, error subject, and the retention copy. Internal naming (Trash/ folder, component names, hooks, query keys, route path) is left as-is — only the displayed text changed. Also updates the demo script and implementation notes to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TiUEvmC84bRsteqsWXHY2p
This commit is contained in:
5 files changed
+15
-15
No files matched your search
@@ -9,6 +9,8 @@ import { PageContainer } from 'ui-patterns/PageContainer'
|
||||
import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
|
||||
import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader'
|
||||
|
||||
import { StorageBucketSelector } from '../StorageBucketSelector'
|
||||
import { TrashList } from './TrashList'
|
||||
import { AlertError } from '@/components/ui/AlertError'
|
||||
import { usePaginatedBucketsQuery } from '@/data/storage/buckets-query'
|
||||
import {
|
||||
@@ -16,8 +18,6 @@ import {
|
||||
useBucketTrashRestoreMutation,
|
||||
} from '@/data/storage/protection/bucket-trash-query'
|
||||
import { type TrashObject } from '@/data/storage/protection/protection-mocks'
|
||||
import { StorageBucketSelector } from '../StorageBucketSelector'
|
||||
import { TrashList } from './TrashList'
|
||||
|
||||
export const Trash = () => {
|
||||
const { ref } = useParams()
|
||||
@@ -72,11 +72,11 @@ export const Trash = () => {
|
||||
</div>
|
||||
|
||||
{isPending && <GenericSkeletonLoader />}
|
||||
{isError && <AlertError error={error} subject="Failed to retrieve trash" />}
|
||||
{isError && <AlertError error={error} subject="Failed to retrieve deleted files" />}
|
||||
{isSuccess && objects.length === 0 && (
|
||||
<Admonition
|
||||
type="default"
|
||||
title="Nothing in the trash"
|
||||
title="No deleted files"
|
||||
description="Deleted objects appear here and can be restored until a lifecycle policy removes them."
|
||||
/>
|
||||
)}
|
||||
@@ -92,7 +92,7 @@ export const Trash = () => {
|
||||
</Card>
|
||||
<p className="text-sm text-foreground-lighter">
|
||||
Items held by a snapshot stay recoverable — and billable — until every snapshot
|
||||
referencing them is deleted, even past their trash retention.
|
||||
referencing them is deleted, even past their retention period.
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -44,7 +44,7 @@ export const StorageBucketsLayout = ({
|
||||
href: `/project/${ref}/storage/files/snapshots`,
|
||||
},
|
||||
{
|
||||
label: 'Trash',
|
||||
label: 'Deleted files',
|
||||
href: `/project/${ref}/storage/files/trash`,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -104,7 +104,7 @@ const BucketPage: NextPageWithLayout = () => {
|
||||
<Link
|
||||
href={`/project/${ref}/storage/files/trash?bucket=${encodeURIComponent(bucket?.name ?? '')}`}
|
||||
>
|
||||
Trash
|
||||
Deleted files
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
@@ -25,8 +25,8 @@ Setup: `pnpm dev:studio`, prototype flag on (`STORAGE_PROTECTION_ENABLED`), a pr
|
||||
- Restore an older version; call out that it's **non-destructive** (promotes to a new current version, old current becomes noncurrent).
|
||||
- Show a version **pinned by a snapshot** blocking hard-delete — this is the direct answer to "when do I actually stop paying for this."
|
||||
|
||||
### Beat 3 — Trash (1–2 min)
|
||||
**Storage → Files → Trash tab**
|
||||
### Beat 3 — Deleted files (1–2 min)
|
||||
**Storage → Files → Deleted files tab**
|
||||
- Soft-deleted objects, an "auto-removes" column, one-click restore.
|
||||
- Same "held by snapshot" state appears here too — one consistent mental model across both surfaces.
|
||||
|
||||
@@ -53,7 +53,7 @@ Setup: `pnpm dev:studio`, prototype flag on (`STORAGE_PROTECTION_ENABLED`), a pr
|
||||
- Vision tie-in: three primitives, Postgres as source of truth, branching as the default recovery path. Nothing here required a fourth primitive.
|
||||
- **Ask the room:**
|
||||
- Storage: does branch-first restore hold up against how storage branching is actually sequenced (2026–2027 per the vision)?
|
||||
- Storage: per-bucket Trash, or project-wide?
|
||||
- Storage: per-bucket Deleted files, or project-wide?
|
||||
- Design: does the platform reframe (coverage chips, "restore point" language) read as coherent, or is it doing too much in one screen?
|
||||
|
||||
---
|
||||
@@ -74,12 +74,12 @@ Setup: `pnpm dev:studio`, prototype flag on (`STORAGE_PROTECTION_ENABLED`), a pr
|
||||
>
|
||||
> So the prototype now treats a database backup as a restore point for the **environment** — Database, Storage, and Config — rather than a database artifact with a Storage bolt-on. Concretely: each backup shows coverage across all three; restoring defaults to a new preview branch (cheap, reversible, verify-then-promote), with in-place restore as an explicit, warned-against escape hatch; and the coverage gap — buckets without snapshots — is named instead of silently reproducing the drift the PRFAQ set out to fix.
|
||||
>
|
||||
> **What's built.** Real Studio components, not a static mockup, behind a prototype flag and wired to mock data since there's no backend yet: per-bucket enable with lifecycle policies, version history in the file preview pane with non-destructive restore, a Trash view, a Snapshots view with restore-with-diff, Database/Storage/Config coverage on backup rows with branch-first restore, and Storage Size in Org Usage broken into live/versions/snapshots inside the existing section.
|
||||
> **What's built.** Real Studio components, not a static mockup, behind a prototype flag and wired to mock data since there's no backend yet: per-bucket enable with lifecycle policies, version history in the file preview pane with non-destructive restore, a Deleted files view, a Snapshots view with restore-with-diff, Database/Storage/Config coverage on backup rows with branch-first restore, and Storage Size in Org Usage broken into live/versions/snapshots inside the existing section.
|
||||
>
|
||||
> **What's deliberately unsolved.** The PRFAQ's own Internal FAQ was honest that the hard part is infra, not UI: event-driven lifecycle expiry, hard-delete coordination between Postgres and S3, and bucket-restore diffing at scale. None of that is in this prototype — it's all mocked. I don't think that's a gap in the demo; I think it's the right place to draw the line before a design review.
|
||||
>
|
||||
> **What I'd like from you:**
|
||||
> - **Storage** — does branch-first restore hold up against how storage branching is actually sequenced? Per-bucket Trash, or project-wide?
|
||||
> - **Storage** — does branch-first restore hold up against how storage branching is actually sequenced? Per-bucket Deleted files, or project-wide?
|
||||
> - **Design** — does the platform reframe read as coherent, or is it trying to do too much in one screen?
|
||||
>
|
||||
> I'll walk through it live, ~15 minutes.
|
||||
|
||||
@@ -37,9 +37,9 @@ localized swap later):
|
||||
| **Snapshots (2a)** | Storage → Files → **Snapshots** tab (`/storage/files/snapshots`) | `Snapshots/Snapshots.tsx`, `SnapshotsList.tsx`, `TakeSnapshotModal.tsx`, `RestoreSnapshotModal.tsx`; page `pages/project/[ref]/storage/files/snapshots/index.tsx` (+ route) |
|
||||
| **Versions tab (3a)** | Storage explorer → select a file → preview pane | `StorageExplorer/VersionHistory.tsx`, tabs added to `StorageExplorer/PreviewPane.tsx` |
|
||||
| **Storage size breakdown (4a)** | Org → **Usage** page | `StorageRetentionUsage/StorageRetentionUsage.tsx`, mounted in `Organization/Usage/Usage.tsx` |
|
||||
| **Trash (6a)** | Storage → Files → **Trash** tab (`/storage/files/trash`) | `Trash/Trash.tsx`, `TrashList.tsx`; page `pages/project/[ref]/storage/files/trash/index.tsx` (+ route) |
|
||||
| Nav | Snapshots + Trash as **Files sub-tabs** (not sidebar items — they're views over file buckets, not a bucket type) | `StorageLayout/StorageBucketsLayout.tsx` |
|
||||
| Shared | Bucket picker for Snapshots/Trash | `StorageBucketSelector.tsx` |
|
||||
| **Deleted files (6a)** | Storage → Files → **Deleted files** tab (`/storage/files/trash`) | `Trash/Trash.tsx`, `TrashList.tsx`; page `pages/project/[ref]/storage/files/trash/index.tsx` (+ route) — internal naming ("Trash") kept for the component/route, only the displayed label changed |
|
||||
| Nav | Snapshots + Deleted files as **Files sub-tabs** (not sidebar items — they're views over file buckets, not a bucket type) | `StorageLayout/StorageBucketsLayout.tsx` |
|
||||
| Shared | Bucket picker for Snapshots/Deleted files | `StorageBucketSelector.tsx` |
|
||||
|
||||
## Verification status
|
||||
|
||||
|
||||
Reference in new issue
Block a user