matthewhirschey / ddh.org

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

"<a href" in webpage title #90

Closed johnbradley closed 4 years ago

johnbradley commented 4 years ago

Problem

There is a strange title when not on the initial landing page. It looks like an HTML anchor tag is accidentally being used for the title.

Example link https://www.datadrivenhypothesis.org/?show=detail&content=gene&symbol=BRCA1 Screen Shot 2020-05-17 at 8 59 40 AM

Relevant code: https://github.com/matthewhirschey/ddh/blob/df2a08bf9f553860e714a4c56dbcdff87f1857c6/code/app.R#L274

https://github.com/matthewhirschey/ddh/blob/df2a08bf9f553860e714a4c56dbcdff87f1857c6/code/app.R#L321

Possible solution

I think we just need to add the windowTitle argument to all calls to navbarPage: https://shiny.rstudio.com/reference/shiny/1.0.5/navbarPage.html

matthewhirschey commented 4 years ago

I saw that too. And is on my 'to do' list. But I think the fix is easier: Because this uses the HTML() and wraps an<a href="">, I can add a title="" argument within the tag because it links to the main page (this is how I thought it was easiest to get back to index.html.

I was going to add title="Data-Driven Hypothesis | A Hirschey Lab Resource"

But we could also add the windowTitle argument. Thoughts?

matthewhirschey commented 4 years ago

Looked into it a bit more, and like your solution (uses the argument that is designed for titles that are not strings) because it is exactly for this use case.

Committed 7a050ed2 in enhance_pathways branch to fix this

matthewhirschey commented 4 years ago

Fixed with #97