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

Odyssey State Serialization #222

Open
1 of 4 tasks
jaelafield opened this issue Nov 25, 2024 · 2 comments
Open
1 of 4 tasks

Odyssey State Serialization #222

jaelafield opened this issue Nov 25, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jaelafield
Copy link
Contributor

jaelafield commented Nov 25, 2024

Allow users to download and upload Odyssey state data to enable them to save analysis progress and resume. First step towards long term goal: external state (database)? Odyssey analysis sharable by link.

Feature components:

  • button to dump global values into an object and copy/download JSON
  • button to upload JSON file and load values, set all relevant globals

Steps (not necessarily in order):

  • UI component planning & implementation (probably want button in header bar, likely to open a pop up with download/upload options similar to server pop up. Do we want something on the spec entry page also? An upload option there may make more sense.)
  • Determine essential state to download, organize into JSON. (May reveal opportunities to organize state differently/remove unneeded components? Users don't need to understand JSON, but it'd be good if it is reasonably concise and organized --better look for us for sure.)
  • Implement JSON download/copy
  • Implement Odyssey initialization with JSON upload
@jaelafield jaelafield added the enhancement New feature or request label Nov 25, 2024
@jaelafield
Copy link
Contributor Author

Expected challenges:

  • Lots of state depends on each other
  • States are not plain JSON objects --> need to be able to turn JSON into (interconnected) states

First thing to try:

  • Directly setting a few global variables (spec maybe to start)
  • With set of expressions, JSON serializing that, try editing expression in the file, then uploading to see how that change handles it.
  • Try setting spec & set of expressions
  • Does react have a way to do this? Pause rendering until more states are set so it isn't temporarily broken. --> Batching updates

@jaelafield
Copy link
Contributor Author

Have a basic implementation working with a subset of states! Goal is to get rest of the state accounted for by the end of the week (meaning sufficient state can be exported then imported to replicate the page fully).

Things we may not get too before the start of next quarter:

  • error checking for import
  • file import/export instead of copying & pasting text
  • UI finalization (need feedback for that, but once we get it it should be very quick)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants