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

feat: add DataSources to project json storage #6160

Merged
merged 11 commits into from
Sep 24, 2024
Merged

Conversation

danstarns
Copy link
Member

@danstarns danstarns commented Sep 21, 2024

This PR introduces the ability to store DataSources in the project JSON, allowing for persistent data across project saves and loads. Key additions include the skipFromStorage flag and updated store and load methods in the DataSourceManager.

Copy link
Member

@artf artf left a comment

Choose a reason for hiding this comment

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

Overall looks good but I'd suggest making the data source storable by default and I'd store them in an array instead of an object to make it more consistent and avoid some common issues with objects.

docs/modules/DataSources.md Outdated Show resolved Hide resolved
packages/core/src/data_sources/index.ts Outdated Show resolved Hide resolved
packages/core/src/data_sources/index.ts Show resolved Hide resolved
@danstarns danstarns requested a review from artf September 23, 2024 20:17
Copy link
Member

@artf artf left a comment

Choose a reason for hiding this comment

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

🚀

Comment on lines +196 to +200
### Benefits of Using `skipFromStorage`

1. **Persistent Configuration**: Store configuration data that should persist across project saves and loads.
2. **Default Data**: Include default data that should always be available in the project.
3. **Selective Storage**: Choose which DataSources to include in the project JSON, optimizing storage and load times.
Copy link
Member

Choose a reason for hiding this comment

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

I guess this should be updated

@artf artf merged commit baedf09 into dev Sep 24, 2024
3 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.

2 participants