chore(studio): vector buckets contents#39705
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
Renamed to VectorBucketDetails just to match elsewhere. Figured this would be helpful clarity as we jump around various bucket types in code.
| // TODO: replace with proper check for wrappers extension state | ||
| const wrappersExtensionState = 'installed' | ||
|
|
There was a problem hiding this comment.
Just hardcoding a wrappers state.
There was a problem hiding this comment.
We could reuse the existing CreateSpecializedBucketModal (for analytics) because it’s so similar.
Or we could just rename that one to be more clearly about analytics.
| label="Bucket name" | ||
| labelOptional="Cannot be changed after creation" | ||
| description="Must be between 3–63 characters. Valid characters are a-z, 0-9, hyphens (-), and periods (.). A target schema will be created that matches this name." | ||
| description="A target schema will be created that matches this name." |
There was a problem hiding this comment.
It’s a bit of a mouthful with the field validation spelt out. I know it’s (on paper) bad practice to hide the requirements, but they are so obvious that I want to sprinkle them in as needed.
| Supabase will install the{' '} | ||
| {wrappersExtensionState !== 'installed' ? 'Wrappers extension and ' : ''} | ||
| S3 Vectors Wrapper integration on your behalf.{' '} | ||
| <InlineLink href={`${DOCS_URL}/guides/database/extensions/wrappers/overview`}> |
There was a problem hiding this comment.
Need to replace with the docs page for S3 Vectors when it’s ready. Just like Iceberg for analytics. CC @ChrisChinchilla and @burmecia
There was a problem hiding this comment.
@dnywh I am about to push a WIP branch for that
There was a problem hiding this comment.
Reusing the generic EmptyBucketState instead.
There was a problem hiding this comment.
Following the pattern from analytics buckets here by having its own Details component inside of Interfaces.
| }) | ||
|
|
||
| // Mock data for development - replace with real data when backend is ready | ||
| // const allIndexes = MOCK_VECTOR_INDEXES |
There was a problem hiding this comment.
Use this instead of data?.vectorBuckets if you aren’t able to populate with real data.
There was a problem hiding this comment.
This naming is a bit trippy but I don’t have a better idea!
| const filteredBuckets = bucketsList.filter((bucket) => | ||
| filterString.length === 0 | ||
| ? true | ||
| : bucket.vectorBucketName.toLowerCase().includes(filterString.toLowerCase()) | ||
| ) | ||
|
|
| </div> | ||
| )} | ||
| <> | ||
| {!isLoadingBuckets && bucketsList.length === 0 ? ( |
There was a problem hiding this comment.
Loading state. Just like analytics.
| {bucketType === 'files' && ( | ||
| <CreateBucketModal buttonSize="tiny" buttonType="primary" buttonClassName="w-fit" /> | ||
| ) : ( | ||
| )} | ||
| {bucketType === 'analytics' && ( | ||
| <CreateSpecializedBucketModal | ||
| bucketType={bucketType} | ||
| buttonSize="tiny" | ||
| buttonType="primary" | ||
| buttonClassName="w-fit" | ||
| disabled={bucketType === 'vectors'} | ||
| tooltip={ | ||
| bucketType === 'vectors' | ||
| ? { | ||
| content: { | ||
| side: 'bottom', | ||
| text: 'Vector buckets are not supported yet', | ||
| }, | ||
| } | ||
| : undefined | ||
| } | ||
| /> | ||
| )} | ||
| {bucketType === 'vectors' && <CreateVectorBucketDialog />} |
There was a problem hiding this comment.
As mentioned in the PR body, we could reuse CreateSpecializedBucketModal. Having three separate ones for clarity doesn’t hurt, I suppose.
There was a problem hiding this comment.
Renamed [bucketId] to match other bucket types.
There was a problem hiding this comment.
Renamed [bucketId] to match other bucket types.
4ba6290
into
ivan/depr-91-add-skeleton-of-vector-bucket-contents-to-storage
* language * match analytics buckets * shared empty state * proper loading state * create dialog cleanup * simplify copywriting * proper details * filtering * use real data
* Initial work on vector buckets. * Add more queries and UI. * chore(studio): vector buckets contents (#39705) * language * match analytics buckets * shared empty state * proper loading state * create dialog cleanup * simplify copywriting * proper details * filtering * use real data * chore(studio): vector buckets polish A (#39759) * empty state * better checks * bucket name in sheet * fix typo * sheet improvements * rename vector index to vector table * cleanup * More work on the vector indexes. * Add delete for bucket and indexes. Create index should now work. * chore(studio): vector buckets polish B (#39794) * loading * delete modal * fix modal behaviour * Add modal for deleting vector buckets. * Bring back the shimmering loader. * chore(studio): vector buckets polish C (#39887) * fix bucketname on deletion dialog * empty states * remove extraneous padding * proper loading and not-found cases * Minor fixes. * Minor updates to the vector components. * Add more instructions to the cursor rules. * Some refactors and shifting files around * Refactor analytics buckets detial to improve time to fcp * Fix * Refactors + simplify * Last few nits, just leaving comments * If the bucket is not empty, delete all indexes first. --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Initial work on vector buckets. * Add more queries and UI. * chore(studio): vector buckets contents (#39705) * language * match analytics buckets * shared empty state * proper loading state * create dialog cleanup * simplify copywriting * proper details * filtering * use real data * chore(studio): vector buckets polish A (#39759) * empty state * better checks * bucket name in sheet * fix typo * sheet improvements * rename vector index to vector table * cleanup * More work on the vector indexes. * Add delete for bucket and indexes. Create index should now work. * chore(studio): vector buckets polish B (#39794) * loading * delete modal * fix modal behaviour * Add modal for deleting vector buckets. * Bring back the shimmering loader. * chore(studio): vector buckets polish C (#39887) * fix bucketname on deletion dialog * empty states * remove extraneous padding * proper loading and not-found cases * Minor fixes. * Minor updates to the vector components. * Add more instructions to the cursor rules. * Some refactors and shifting files around * Refactor analytics buckets detial to improve time to fcp * Fix * Refactors + simplify * Last few nits, just leaving comments * If the bucket is not empty, delete all indexes first. --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
What kind of change does this PR introduce?
Chore: UI improvements to the vector buckets and their details
What is the current behavior?
What is the new behavior?
Additional context
Based on #39597.
Still to come:
To test
Use
MOCK_VECTOR_INDEXESforallIndexesinVectorBucketDetails(here) if you need mock table data.