Skip to content

Conversation

@gregnr
Copy link
Member

@gregnr gregnr commented Sep 11, 2023

🔍 Preview

https://studio-staging-git-feat-sql-editor-cli-import-supabase.vercel.app/dashboard/project/_/sql/new

Adds new button "Download as migration file" to SQL editor in the snippet context menu:

screenshot-2023-11-16-at-14 49 37

Clicking the button brings up a modal with pre-generated commands to import the current snippet as a migration, seed, or SQL file:
screenshot-2023-11-16-at-14 49 57
screenshot-2023-11-16-at-14 49 49

@vercel
Copy link

vercel bot commented Sep 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
database-new ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2023 11:56am
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2023 11:56am
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2023 11:56am
studio ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2023 11:56am
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2023 11:56am
ui-storybook ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2023 11:56am
zone-www-dot-com ⬜️ Ignored (Inspect) Visit Preview Nov 21, 2023 11:56am

@notion-workspace
Copy link

@gregnr gregnr marked this pull request as ready for review September 11, 2023 20:11
@gregnr gregnr requested a review from a team as a code owner September 11, 2023 20:11
<TabsProvider>
<div className="flex flex-col items-start justify-between gap-4 px-6 py-3">
<p className="text-sm mt-2">
You can download this snippet as a local{' '}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let Terry chime in on this haha but am wondering could simplify this to

You can download this snippet as a local migration via the Supabase CLI

@joshenlim
Copy link
Member

This is just future consideration - but we could consider leveraging the new API side panel for this too
have a section for SQL editor
clicking "Download as migration" opens the API side panel with that section open

@joshenlim
Copy link
Member

was also looking at the thread - i was thinking the same thing with Terry RE tabs, could look something like this
image

language selection as a dropdown on the side
main consideration is that users are probably looking for one thing at a time, its a bit of a spread showing all three types at once

@saltcod
Copy link
Contributor

saltcod commented Nov 13, 2023

Hey guys – made some updates here. Sorry for the delay.

  1. moved the button to the context menu for ui simplicity
  2. changed the layout to a tab, avoiding tab-ception via the toggle to the right

no major changes otherwise
screenshot-2023-11-13-at-11 25 19

screenshot-2023-11-13-at-11 25 13

@joshenlim joshenlim requested a review from a team as a code owner November 19, 2023 14:39
@joshenlim joshenlim requested a review from a team November 19, 2023 14:39
@joshenlim joshenlim requested a review from a team as a code owner November 19, 2023 14:39
@joshenlim joshenlim merged commit 247c72f into master Nov 21, 2023
@joshenlim joshenlim deleted the feat/sql-editor-cli-import branch November 21, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.