Skip to content
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

refactor: combine useConfig and useDatabaseDriver into one context #397

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

invisal
Copy link
Collaborator

@invisal invisal commented Mar 11, 2025

When we first started, we used useDatabaseDriver to pass the database driver deep into child components. Later, as we introduced more features, we also added useConfig to pass various settings down the component tree. These two hooks seem to have overlapping functionality.

This PR merges them into a single context, useStudioContext. This general-purpose context is designed to deliver settings and drivers that need to be propagated deeply into child components.

Copy link

vercel bot commented Mar 11, 2025

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

Name Status Preview Comments Updated (UTC)
outerbase-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2025 1:42am

Copy link

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 72.78% 492/676
🔴 Branches 53.62% 163/304
🟡 Functions 76.39% 55/72
🟡 Lines 76.81% 467/608

Test suite run success

60 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 718fc83

@invisal invisal merged commit a55d518 into develop Mar 11, 2025
9 checks passed
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.

1 participant