Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage in shiny apps #13

Open
tanho63 opened this issue Apr 12, 2021 · 6 comments
Open

Usage in shiny apps #13

tanho63 opened this issue Apr 12, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@tanho63
Copy link

tanho63 commented Apr 12, 2021

Looks awesome! Wondering if there could be a wrapper on the details() function specifically for Shiny usage, e.g.

details_shiny <- function(object, summary, ...) {
          htmltools::HTML(
            details::details(
              object = object,
              summary = summary,
              lang = NULL,
              imgur = FALSE,
              output = "character",
              ...
            )
          )
}

where ... overrides the defaults provided above, perhaps?

@yonicd
Copy link
Owner

yonicd commented Apr 12, 2021

thanks for the question!

this should work:

https://yonicd.github.io/details/articles/custom.html#raw

@tanho63
Copy link
Author

tanho63 commented Apr 12, 2021

I'm hoping to use details block in shiny, not necessarily raw html in a details block :P

e.g. avoiding this

image

and getting this instead
image

(Problem is solved on my end, just suggesting/requesting a feature)

@yonicd
Copy link
Owner

yonicd commented Apr 12, 2021

Thanks for the clarification. I’ll see how it can be added.

@yonicd
Copy link
Owner

yonicd commented Apr 13, 2021

Adding a print method should be straight fw enough (print.details_shiny) https://github.com/yonicd/details/blob/master/R/print.R

@yonicd yonicd added the enhancement New feature or request label Apr 21, 2021
@yonicd
Copy link
Owner

yonicd commented Apr 23, 2021

@tanho63 try this: 740300e

the output type is "html"

@tanho63
Copy link
Author

tanho63 commented Apr 23, 2021

Works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants