dashR icon indicating copy to clipboard operation
dashR copied to clipboard

Custom favicon is not displayed

Open ghost opened this issue 1 year ago • 2 comments

This block here seems wrong. It is doing the same thing in both cases.

https://github.com/plotly/dashR/blob/d281e7025d0906f6f65e0365d25d2a59c362ed9e/R/dash.R#L1897-L1905

ghost avatar Jun 26 '24 16:06 ghost

Also see #297. A workaround:

app_title <- "My app"
app_custom_index <- local({
  template <- app$.__enclos_env__$private$template_index[[1]]
  template <- sub("{%favicon%}",
                  "<link href=\"assets/favicon.svg\" rel=\"icon\" type=\"image/x-icon\">",
                  template, fixed = TRUE)
  template <- sub("{%title%}", app_title, template, fixed = TRUE)
  return(template)
})
app$index_string(app_custom_index)

ghost avatar Jun 26 '24 17:06 ghost

This block here seems wrong. It is doing the same thing in both cases.

https://github.com/plotly/dashR/blob/d281e7025d0906f6f65e0365d25d2a59c362ed9e/R/dash.R#L1897-L1905

Anecdotally, I suspect you are correct @sid-bagaria. It's been a long time since I worked on this project, but if I recall the original else set favicon to NULL, and this was later modified to store an empty string if no valid favicon was passed.

I'm not sure whether this is copypasta, but it seems possible.

rpkyle avatar Jun 26 '24 17:06 rpkyle