mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
## [5/10] Storage object versioning: version history in the file preview panel **Base:** `feat/storage-versioning/004-object-versions-data` #49207 ### This PR Adds all the versioning ui to the file preview panel. - polished file preview panel (header, buttons, nits) - added "Upload file" to the action buttons - "Delete permanently" now defaults to "Archive" as primary action, and "Delete permanently" via a dropdown menu as a more destructive action - added "Versions" toggle section to the file preview panel - with lifecycle policy "summary" - with additional explanation on hover - versions can be restored or deleted permanently ### How to test - in a File storage bucket, open a file preview panel - when the "Storage Versioning" feature preview flag is true, the preview panel should show - a "versions" section - a new "upload file" button next to the "download file" button - the "delete permanently" button should show "Archive" + a dropdown with the "Delete permanently" option - if the feature preview flag is toggled _off_, the preview panel should looks as before (but with some minor polish) https://github.com/user-attachments/assets/56f6b9aa-b3a0-45bd-b3e7-5788967d196a With the feature preview toggled _on_: - the ui should show the lifecycle policy "summary" that will affect this file - hovering the lifecycle policy summary should explain how the policy will affect/clean up the noncurrent files - the lifecycle policy summary hover card button should link and open the "edit bucket modal" - create a new version of a file by using the "Upload file" (next to "download file") - the file should have a new "Current" version - the previous version should become a "noncurrent" version - the noncurrent version should reflect the lifecycle policy that will eventually affect it with some additional context on hover via a tooltip - clicking on a noncurrent version should open a "comparison widget" that provides a way to restore it and re-promote it to "current" or delete it permanently - these actions are also available via dropdown menu from the version item - a file should be "archiveable" (please note that showing/managing archived files will come in the next pr in the stack) - confirmation modals should prompt to confirm to proceed to restoring or permanently deleting a noncurrent version https://github.com/user-attachments/assets/803a6f15-7f32-44ae-9e24-1c201aab178a --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>