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

cookie state should be keyed to the dataset id #410

Closed
rbuels opened this issue Jan 7, 2014 · 3 comments
Closed

cookie state should be keyed to the dataset id #410

rbuels opened this issue Jan 7, 2014 · 3 comments
Assignees
Labels
bug this is a problem that needs to be fixed

Comments

@rbuels
Copy link
Collaborator

rbuels commented Jan 7, 2014

Should also switch to storing things in localStorage, since it's well supported. See http://caniuse.com/#search=localstorage

On 01/07/2014 04:30 PM, Richard Hayes wrote:

I think this might be part of a larger issue with multi-dataset
installations, where the cookie storage of selected tracks appears to be
a global value. I've seen other cases where:

  1. I turn on TrackA in SpeciesX
  2. I switch to SpeciesY from the datasource dorp down menu. SpeciesY
    doesn't have TrackA.
  3. I switch back to SpeciesX, but TrackA is no longer selected.
@rbuels
Copy link
Collaborator Author

rbuels commented Jan 21, 2014

Approach for this would probably be to modify the cookie method in JBrowse/Browser.js to use localStorage for this instead of cookies, and to append the value returned by this.config.dataset_id to the key, if it is defined.

@ghost ghost assigned Kevin-Mohamed Jan 22, 2014
@Kevin-Mohamed
Copy link
Contributor

i searched through JBrowse, cookie seems to be used throughout (should I replace references in the other files?)
right now replacing "tracks" with "tracks-"+this.config.dataset_id (when calling from and saving the stored tracks) in the existing cookie method seems to work

@rbuels
Copy link
Collaborator Author

rbuels commented Jan 23, 2014

No, you should modify only the cookie method in Browser.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this is a problem that needs to be fixed
Projects
None yet
Development

No branches or pull requests

2 participants