jbrowse
jbrowse copied to clipboard
Add saving cookies on loading/republishing tracks
This PR attempts to allow the user to save configuration changes across refreshes by storing configs in localStorage. It hooks into jbrowse at a low level and can save edits made via "Edit config" and when the "track replace" publish event is sent. Not all configuration changes use the publish event system though, for example displayMode. However, that could probably be remedied.
Feel free to provide feedback
I forget, did we all talk about this? Any downsides to merging it?
Basically the discussion was that a user could potentially get confused by their own track customizations and forget what defaults are, or if the server side config changed, the users settings still completely replace it (the settings are not merged), and there was no UI indication that a custom track config was being used or to a button to reset it.
This also affects simply navigating to different chromosomes too, track settings are refreshed after navigating to different chromosomes without storing settings in localStorage
I agree that users potentially will get confused when track customizations will persist even after refresh. I agree that this could be solved by a UI indication asking if the user wants to load their track costomizations. Or for example the ability to download your customizations to a file and load them when you reload your genome.