GMOD / Apollo

Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.
http://genomearchitect.readthedocs.io/
Other
128 stars 85 forks source link

logging in overrides passed state with saved state #1960

Closed childers closed 5 years ago

childers commented 5 years ago

When I am in not-logged-in mode and pass in parameters (e.g. location, tracks, stores) and then log in, the browser goes to the last saved state, and loses the location, tracks, etc that I justpassed to it.

My expectation is that if I pass parameters via URL then log in, the only thing that changes is that I can access the Apollo2 features, otherwise the location, tracks and remote stores all are saved.

Is this related to #1363?

nathandunn commented 5 years ago

@childers I don't know if its related, but I can see why this might typically be a problem.

nathandunn commented 5 years ago

But, I'm unsure if it will be an easy fix

childers commented 5 years ago

@nathandunn I see the value for going back to your last state on login, but only if other parameters aren't being passed.

nathandunn commented 5 years ago

@childers I definitely understand the use-case. Just saying that the use-case is non-trivial.

What happens if you do this with the "loadLink" option?

In theory that is what I've used in the past to force parameters to be set on login.

childers commented 5 years ago

Not sure how to add loadLink in my use case, since I'm passing it out as part of my BLAST results and don't know if the user is logged in or not, so I pass a JBrowse compatible URL, and if they are logged in, then Apollo magically kicks in and reloads to the annotator interface. could loadLink be used as the passthrough of choice if a client is detected as being logged in?

Here are two example URLs form our training instance:

Jbrowse friendly, but clicking the login button (you can use demo/demo) causes all saved info to be lost.

https://apollo.nal.usda.gov/apollo/Eurytemora%20affinis/jbrowse/?loc=Scaffold188%3A400566..401193&addStores.url.type=JBrowse%2FStore%2FSeqFeature%2FGFF3&addStores.url.urlTemplate=https%3A%2F%2Fi5k.nal.usda.gov%2Ftraining%2Fwebapp%2Fmedia%2Fblast%2Ftask%2F34c4f8400ddf46ec96402ed5eafa1afa%2FEaff_11172013.genome_new_ids.fa.gff&addTracks.url.label=BLAST%20Results&addTracks.url.category=0.%20Reference%20Assembly&addTracks.url.type=WebApollo%2FView%2FTrack%2FDraggableBLASTFeatures&addTracks.url.style.renderClassName=gray-center-30pct&addTracks.url.style.subfeatureClasses.match_part=blast-match_part&tracks=DNA%2CAnnotations%2CBLAST%20Results&highlight=

The same view using loadLink, which works great if you are logged in. If you are not logged in, it drops you right off at the login page and you cannot see the results.

https://apollo.nal.usda.gov/apollo/annotator/loadLink?organism=Eurytemora%20affinis/jbrowse&loc=Scaffold188%3A400566..401193&addStores.url.type=JBrowse%2FStore%2FSeqFeature%2FGFF3&addStores.url.urlTemplate=https%3A%2F%2Fi5k.nal.usda.gov%2Ftraining%2Fwebapp%2Fmedia%2Fblast%2Ftask%2F34c4f8400ddf46ec96402ed5eafa1afa%2FEaff_11172013.genome_new_ids.fa.gff&addTracks.url.label=BLAST%20Results&addTracks.url.category=0.%20Reference%20Assembly&addTracks.url.type=WebApollo%2FView%2FTrack%2FDraggableBLASTFeatures&addTracks.url.style.renderClassName=gray-center-30pct&addTracks.url.style.subfeatureClasses.match_part=blast-match_part&tracks=DNA%2CAnnotations%2CBLAST%20Results&highlight=
nathandunn commented 5 years ago

Okay, looks like we need to fix the second case for sure.

nathandunn commented 5 years ago

@childers Is this still a problem?

nathandunn commented 5 years ago

Going to close this for now, but let me know if it comes back