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

Save Queries #33

Open
ryandem1 opened this issue May 24, 2023 · 0 comments
Open

Save Queries #33

ryandem1 opened this issue May 24, 2023 · 0 comments
Labels
enhancement New feature or request enrich-ui Change to the enrich-ui

Comments

@ryandem1
Copy link
Owner

Add Query String as URL Parameter is required to be completed before this one.

So, with the ability to save/share queries as base64 encoded strings, saving them becomes more straight-forward.

image

A new text field/button should be added underneath the "Filter Tests" section of the modal.

  • The value of the text field will be the readable name of the query. It is not nullable, should be limited to 40 characters, and should have its surrounding spaces trimmed.
  • The button should be the "Save for Later" button, and it will save the new query

There should also be a new dropdown to select a saved query instead of creating a new one. Here are some properties of the dropdown:

  • The default placeholder should be "Enter or select query..."
  • The dropdown values should be the saved query labels
  • When a dropdown value is selected, it should populate the JSON editor with the decoded base64 query string value

To save data...

For now, we will utilize the browser's localStorage as a way of data persistence. This means that queries will not be persisted if the user clears their browser's storage, which I am sure will be somewhat annoying. Right now, OAR only requires a single Postgres table for test results, and we are going to stretch that for now. In the future I think implementing an optional redis instance might be a good way to go, but not necessary for now.

There is a writable store that connects to localStorage that might be appropriate for this use case from Skeleton UI: https://www.skeleton.dev/utilities/local-storage-stores

@ryandem1 ryandem1 added enhancement New feature or request enrich-ui Change to the enrich-ui labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request enrich-ui Change to the enrich-ui
Projects
None yet
Development

No branches or pull requests

1 participant