Commit Graph

15 Commits

Author SHA1 Message Date
Ivan Vasilov
3f9765e2f8 refactor(studio): migrate all react-contexify usage to ContextMenu_Shadcn_ (#44520)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Refactor

## What is the current behavior?

Studio uses `react-contexify` (an imperative, ID-based context menu
library) for right-click menus in the Table Editor grid, Log Table, and
Storage file explorer. This requires `createPortal` workarounds, a
separate CSS file, and has known bugs with fragment rendering.

## What is the new behavior?

All context menus now use the declarative `ContextMenu_Shadcn_`
(Radix-based) component that is already the standard across Studio. Each
context menu wraps its trigger element directly, removing the need for
imperative `show()` calls, portal hacks, and menu ID constants. The
`react-contexify` dependency and all associated styles are removed.

**Changes by area:**
- **Grid row context menu**: `RowRenderer` wraps each `<Row>` with
`ContextMenu_Shadcn_`. `RowContextMenu` refactored to accept `row`
directly as a prop instead of looking it up by index.
- **Log table**: Row renderer wraps each row with a context menu for
"Copy event message". Removes `cellPosition` state and `createPortal`.
- **Storage**: `FileExplorerRow` reuses its existing `rowOptions` array
for both the dropdown and context menu. `FileExplorerColumn` inlines the
column menu (new folder, select all, view/sort submenus). Three
standalone context menu files deleted.
- **Cleanup**: Removed `react-contexify` from `package.json`, deleted
`contextMenu.scss`, removed styles from `grid.scss`.

## Additional context

Net -370 lines. Follows the TODO comment in `CellContextMenuWrapper.tsx`
and the existing eslint ban on `react-contexify` imports.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Replaced legacy right-click menus with a unified shadcn-style context
menu across grids, logs, and the storage explorer.
* Simplified row/column/item context menu behavior and copy actions;
menus now mount and trigger more reliably.

* **New Features**
* Added row-level context menu providers to ensure consistent triggering
and positioning for row actions.

* **Chores**
  * Removed legacy context-menu styles and deprecated menu components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 13:46:29 +02:00
kemal.earth
d2a4e2848d feat: modify public bucket tooltip copy (#44433)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Updates the tooltip copy for `public` pills in Storage. More accurate
description.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Unified the tooltip text for "Public" buckets across the storage
interface so the same explanatory message appears consistently on bucket
listings, badges, and bucket pages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-01 14:17:35 +01:00
Charis
4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Danny White
46ac132051 chore(studio): empty state improvements (#40807)
* migrations

* clearer value prop

* consistent verb

* migration input

* triggers

* extract trigger buttons

* database backups

* schema title

* unrelated nit

* fix

* shared component

* ui-patterns

* rename

* improve docs

* remove redundant overrides

* remove old file

* prettier fix

* fix type error

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 17:26:20 +08:00
Timothy Lim
26630dee0e Fix link to Vector docs (#40819)
* Fix link to Vector docs

* Use DOCS_URL
2025-11-26 17:11:14 +08:00
Joshen Lim
b52739f452 Analytics and Vector buckets should not be visible for CLI or self host dashboard (#40814)
* Analytics and Vector buckets should not be visible for CLI or self host dashboard

* Clean
2025-11-26 16:29:19 +08:00
Chris Chinchilla
ba16b2c189 docs: vector and analytics storage (#39716)
* Docs skeleton

* Create strcuture

* Revert "Docs skeleton"

This reverts commit 1788972dd2.

* Add analytics

* basic updates

* Fix docs reference

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* docs(storage): analytics buckets

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Apply suggestions from code review

* format

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: fenos <fabri.feno@gmail.com>
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-11-24 20:57:52 +00:00
Joshen Lim
dbbae988a9 Only show analytics and vector buckets for hosted (#40418)
* Only show analytics and vector buckets for hosted

* Nit

* nit
2025-11-13 18:09:42 +08:00
Danny White
849c29f824 chore(studio): improve Storage UI (#40367)
* clarify breadcrumbs

* tiny badge variant

* improve admonition

* indicate max buckets limit

* nit

* Minor nits

* badge fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-13 20:30:49 +11:00
Danny White
abd35216f7 chore(studio): clean up storage UI (#40164)
* copywriting updates

* remove unused file and comment

* copy tweaks

* remove stickySidebarBottom

* extraneous comment

* remove unused components

* unused image

* files policies redirect

* Update redirects for storage settings

* Fix loader for storage policies

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-05 14:57:19 +11:00
Danny White
bf3f26d0a6 feat(studio): list existing analytics buckets (#39500)
* specialized dialog for analytics (and vector) bucket creation

* handle missing wrapper extension and iceberg wrapper integration

* bucket creation improvements

* extension and integration checks

* dialog header consistency

* simplify bucket dialog creation button trigger

* fix subtitle ternary

* example bucket without dynamic route

* create dynamic segment

* fancy connection table

* improve bucket page

* connection table polish

* polish

* delete bucket modal

* improve missing installations design

* new table modal

* fix copy icon

* copy all env button placeholder

* list all analytics buckets

* specialised bucket modal

* shared installer hooks and components

* make iceberg wrapper not dependent on wrapper extension

There are cases where the Iceberg Wrapper can be installed but the Wrapper extension has since been removed

* better admonition copywriting

* todo

* remove later features

* more removal of later work

* remove old comment

* remove unused content

* Nits and hook up create analytics bucket logic

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-15 11:48:14 +11:00
Danny White
6f54cf8a57 feat(studio): inline storage buckets (#39154)
* chore: separate interfaces per bucket type

* chore: reuse existing bucket creation modal for files

* chore: allow external trigger for new bucket modal

* chore: minor fixes

* chore: full-size empty state

* chore: files other tabs

* fix: show tab bar when on file subroute

* chore: use existing table component to list buckets

* fix: tests

* fix: build error

* chore: remove future bucket type components from PR

* fix: dependency

* Couple of refactors to simplify implementation

* Fix TS

* chore: move s3 settings out to sidebar

* fix: minor nits

* fix: reuse existing loading spinners from schema visualiser

* fix: loading for files

* fix: prevent loading of table for zero buckets

* chore: improved loading state

* chore: shimmer on table

* chore: copywriting on S3

* chore: improve empty states

* fix: deprecated input instructions

* fix: filter/search bucket table

* chore: tidy

* fix: tests

* Minor refactors

* Rename

* Nit

* Shift V2 re-routing logic to layout level

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-07 10:59:37 +11:00
Danny White
f596989ed4 chore: feature flag for new Storage UI (#39093)
* feat: bucket type page and corresponding sidebar

* feat: handle /storage URL redirection based on feature flag

* fix: default sidebar selection

* Use feature flag for feature preview, and have new UI behind feature preview instead

* Remove hardcode

* Minor clean ups

* chore: improve feature preview description

* chore: more descriptive name for general file storage type

* fix: preview image

* Minor nits

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-01 12:16:20 +10:00
Danny White
d914b81f47 feat: consolidate settings (#37580)
* feat: move storage settings

* feat: redirect

* feat: database settings in service area

* feat: move data api settings

* fix: revert data API placement

* feat: minor UX touches

* fix: simplify configuration group

* feat: references to database settings

* feat: references to storage settings

* fix: redirects and formatting

* fix: Import StorageMenu dynamically to avoid SSR issues with useLocalStorage

* fix: move Data API closer to semantic siblings

* fix: revert smart comma

* Shift bucket sort logic into storage explorer store

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-04 16:21:54 +10:00
Drake Costa
57cd26ac77 Move non-layout Storage components to components/interfaces (#37381)
* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Move non-layout Storage related components to `components/interfaces`

* Fix paths

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-22 23:48:20 +08:00