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

[diagnostics-app] Add ability to specify param types #390

Merged
merged 6 commits into from
Nov 11, 2024

Conversation

Omnicpie
Copy link
Contributor

@Omnicpie Omnicpie commented Nov 8, 2024

Allows a user of the diagnostics application to specify a type for a given parameter. This replaces the existing implementation which casts every value as a string, regardless of content.

This does require the user to type well-formed information, so if they specify the type to be an Object or Array, they must write the value so that it is valid for the system to save using JSON.parse.

Currently, this page doesn't explain how to specify values correctly, nor does it alert a user if the value is invalid for conversion, If that needs to be added before this can be merged let me know.

Screenshots

-- Valid Data as viewed in the diagnostics app
Valid data for each data type in the app
-- The same data as above is saved in local storage for use as parameters
local storage value
-- Saving in other formats than just the obvious
other types

Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: d7820bb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@powersync/diagnostics-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Omnicpie Omnicpie marked this pull request as ready for review November 8, 2024 00:36
@rkistner rkistner merged commit 7bd5cd0 into powersync-ja:main Nov 11, 2024
@rkistner rkistner changed the title Add ability to specify param types [diagnostics-app] Add ability to specify param types Nov 11, 2024
@rkistner
Copy link
Contributor

@Omnicpie Thanks for the contribution! I've made minor changes, and it's now published on https://diagnostics-app.powersync.com/ and the latest docker image.

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