Skip to content

Add localStorage support

Duggan, John requested to merge 14-add-localstorage-support into main

Summary of Changes

Adds a LocalStorageManager class and exposes it to the Trame application. The new class allows the user to manipulate window.localStorage directly from their Python code.

Checklist

  • The MR has a clear and concise title
  • Code is self-documented and follows style guidelines.
  • Automated tests are written and pass successfully.
  • Regression tests (e.g. manually triggered system tests, manual GUI/tool tests, ...) are performed to make sure the MR does not break anything (when applicable)
  • Readme file is present and up-to-date.

Documentation Updates

Additional Notes

I added an example of usage to the bottom of the gallery. The best way to test it manually is to use the text field and buttons while you have your browser's localStorage inspector open. You can test the get functionality by saving text to localStorage, restarting your Trame server, and then opening the new window and seeing that it shows the saved text.

Closes #14 (closed)

Merge request reports