Skip to content

Persist last selected database only for sql editor via local storage #32598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

joshenlim
Copy link
Member

No description provided.

@joshenlim joshenlim requested a review from a team as a code owner January 6, 2025 10:03
Copy link

vercel bot commented Jan 6, 2025

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

Name Status Preview Comments Updated (UTC)
design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 0:55am
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 0:55am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 0:55am
studio ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 0:55am
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 0:55am
zone-www-dot-com ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 0:55am

Copy link

supabase bot commented Jan 6, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@SaxonF
Copy link
Contributor

SaxonF commented Jan 7, 2025

Testing locally and I'm seeing the selector being set properly, but the actual queries are still being run against primary, unless I set it again.

Do we have to setSelectedDatabaseId in database-selector.tsx? This state is being set in multiple places so it might be more complicated than we think.

@joshenlim
Copy link
Member Author

joshenlim commented Jan 8, 2025

ahh sorry i was missing a useEffect hence why - have pushed a fix up! 🙏

This state is being set in multiple places so it might be more complicated than we think.

This should be okay, since the useEffect will only trigger if _selectedDatabaseId is being passed as a prop - which only the SQL editor will be doing so for now

Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

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

LGTM!

  • Tested on preview

@joshenlim joshenlim merged commit eb42b2c into master Jan 9, 2025
14 checks passed
@joshenlim joshenlim deleted the chore/persist-last-selected-db-for-sql-editor branch January 9, 2025 02:55
ibixler pushed a commit to Music-Visualization-MQP/supabase that referenced this pull request Jan 11, 2025
…upabase#32598)

* Persist last selected database only for sql editor via local storage

* Add missing useEffect
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.

3 participants