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

SDK Config management #8

Open
proudparrot2 opened this issue Aug 22, 2024 · 2 comments
Open

SDK Config management #8

proudparrot2 opened this issue Aug 22, 2024 · 2 comments
Assignees

Comments

@proudparrot2
Copy link
Contributor

No description provided.

@Cattn Cattn added this to Todo Aug 22, 2024
@proudparrot2 proudparrot2 self-assigned this Aug 22, 2024
@proudparrot2 proudparrot2 converted this from a draft issue Aug 22, 2024
@proudparrot2
Copy link
Contributor Author

SDK Config will allow for plugins to set and manage configuration for their plugin. Configuration will be persisted in either Local Storage or IndexedDB. Configuration options can be exposed to the users for them to set, see here

Since the SDK is scoped per plugin, they can use generic keys without interrupting the configs of other plugins.

tile(sdk) {
    sdk.config.set("hello", "world")
    sdk.config.get("hello") // world

    // user changes a setting linked to "hello"
    sdk.config.get("hello") // hey
}

@Cattn
Copy link
Member

Cattn commented Aug 22, 2024

I think IndexedDB is perfect for this, works perfect with key pair based system for config, as long as it's not being used here to call functions.

For that we might want to use postMessage something else?

@proudparrot2 proudparrot2 moved this from In Progress: Parrot to Done: Parrot in Todo Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Parrot
Development

No branches or pull requests

2 participants