omicsplayground icon indicating copy to clipboard operation
omicsplayground copied to clipboard

BrowseURL

Open JohnCoene opened this issue 2 years ago • 6 comments

Use of browseURL

https://github.com/bigomics/omicsplayground/blob/919d69e9ca32244eb345e0ec261ce07e0d5d04ba/components/app/R/modules/SendReferralModule.R#L234

https://github.com/bigomics/omicsplayground/blob/919d69e9ca32244eb345e0ec261ce07e0d5d04ba/components/app/R/modules/SocialMediaModule.R#L94

Not sure what is intended here, won't work server-side.

JohnCoene avatar May 08 '22 11:05 JohnCoene

The idea is that if the user clicks on an icon, it goes to that social website with a predefined url and message. The reactive 'observe' is to allow detection of a real click. It's server side because we need to predefine the url.

image

ivokwee avatar May 09 '22 14:05 ivokwee

in the SendReferralModule, the mailto's are a fallback if Honcho is not available. Then the user needs to fill in 3 emails from the client-side.

ivokwee avatar May 09 '22 14:05 ivokwee

If honcho is not available and we use the timeout in when the user runs the app locally or self-deployed then the timeout will keep popping up because we can't keep track between sessions. This may be obnoxious for the users but it's your call.

The point here is browseURL won't work when deployed. It worked for you locally because your server function can access your browser.

JohnCoene avatar May 09 '22 14:05 JohnCoene

  1. OK. Timeout should not be used or be disabled at self-deployment.
  2. originally had just a tag/button tags$a(href=urls["twitter"], NULL, icon("twitter"), style="font-size:35px;", target="_blank") but I wanted to check if there is a real click. Can we check a real click by using just tag/button? probably with some JS...

ivokwee avatar May 09 '22 16:05 ivokwee

So originally the button/icon bar was just like this

     tagList(
        tags$a(href=urls["twitter"], NULL, icon("twitter"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["linkedin"], NULL, icon("linkedin"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["facebook"], NULL, icon("facebook"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["whatsapp"], NULL, icon("whatsapp"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["reddit"], NULL, icon("reddit"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["email"], NULL, icon("envelope"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["gmail"], NULL, icon("google"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["pinterest"], NULL, icon("pinterest"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["telegram.me"], NULL, icon("telegram"), style="font-size:35px;", target="_blank"), 
        tags$a(href=urls["yahoo"], NULL, icon("yahoo"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["skype"], NULL, icon("skype"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["xing"], NULL, icon("xing"), style="font-size:35px;", target="_blank"),
        tags$a(href=urls["line.me"], NULL, icon("line"), style="font-size:35px;", target="_blank")        
      )

Probably we need on onClick JS function that checks/records a real click and then enables the 'done' button.

ivokwee avatar May 09 '22 16:05 ivokwee

Yes, it's something like that we need ultimately

JohnCoene avatar May 09 '22 16:05 JohnCoene