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

Support listing saves versions from just the static files #17

Open
Palats opened this issue Sep 25, 2021 · 0 comments
Open

Support listing saves versions from just the static files #17

Palats opened this issue Sep 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Palats
Copy link
Owner

Palats commented Sep 25, 2021

Currently, listing available versions of a given serve is only available through mapshot serve subcommand - the list of available saves is obtained by scanning which mapshot.json exist and built the UI dynamically.

It might be possible to maintain static files able to generate a listing without using the serve command; the trick would be to use the append mode in write_file to maintain a listing. In practice, the approach would be:

  • When creating a mapshot, append basic info to a listing file - e.g., name of the version and maybe a timestamp or similar. The format of the listing file need to support basic appends - so that rules out clean json.
  • Create also a listing.html or similar.
  • That frontend would load up the listing file from javascript, parse it, and generate a simple list UI.

Notes:

  • This is likely that the listing UI would be different from the one in serve, as less information would be readily available from static files.
  • Unclear what the default behavior should be - maybe gate that behind a parameter or something.
  • The listing file should not contain too much data; otherwise it would grow fairly large, leading to problematic load times.
  • Whether to also do that across saves (e.g., maintaining a list of saves, not just the list of versions for a given save) might be interesting but has its own problem; e.g., people might not want to show what exists to everyone.
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

1 participant