matthewhirschey / ddh.org

datadrivenhypothesis.org is a resource to query 100+ GB of raw biological science data to develop data-driven hypotheses
2 stars 7 forks source link

Warning message for page search #83

Closed matthewhirschey closed 4 years ago

matthewhirschey commented 4 years ago

I made a little progress understanding the “warning” that keeps emerging, although not sure about why it keeps coming up. It doesn’t break the app, but might be good to fix. I’m attaching a short screen cast of what I found, in case it’d be helpful for you to take a crack at it.

https://www.dropbox.com/s/ekfs8qpcjr9l0m1/Screen%20Recording%202020-05-01%20at%205.04.57%20PM.mov?dl=0

matthewhirschey commented 4 years ago

From @johnbradley

I'll take a look. I think you are on the right track.

Here is what I think is happening: We are on a page with a URL like "show=detail&content=gene&symbol=BRCA1". We navigate to a URL like "show=search&query=TP53". When this happens the symbol and content params change to NULL and show changes to "search". Shiny isn't really aware of multiple pages so it tries to do reactive updates for whatever it sees change. Shiny sees symbol change and tries to update the content of the detail page with our NULL symbol. I think this produces the error you keep seeing. If shiny stopped here you would probably see an error on the detail page. Then shiny sees that show page has changed and updates the screen to show the search page hiding the error from the user.

The short version is I think we just need to add a check for the show value somewhere. Something like if show!=detail return empty data. I'll include a fix for this in my PR with the search changes.

matthewhirschey commented 4 years ago

Fixed by @johnbradley in 545b15d