futureverse / progressr

三 R package: An Inclusive, Unifying API for Progress Updates
https://progressr.futureverse.org
281 stars 12 forks source link

handler_shiny is missing from the package list of functions #171

Closed timothee-bacri closed 1 week ago

timothee-bacri commented 1 month ago

progressr::handler_shiny has a help page, but is not listed along with the other handlers

Steps to repeat from RStudio:

  1. Click on the Packages tab
  2. Click on progressr
  3. handler_shiny is not listed
  4. Execute library(progressr);help("handler_shiny"), and see that the function exists

I'm sure it's not hard to fix, but I am not sure where to look to provide a PR for this.

HenrikBengtsson commented 1 week ago

It's actually on purpose, because of what help(handler_shiny) says:

"For most Shiny application there is little need to use this Shiny handler directly. Instead, it is sufficient to use withProgressShiny()."

I marked handler_shiny() as an internal function so that it does not show up in the HTML help index, so developers and users won't attempt to use it as-is without withProgressShiny().

I only know so much about Shiny - do you have a use case where you want to use handler_shiny() instead of withProgressShiny()?

timothee-bacri commented 1 week ago

I don't have a good use case for this, I just thought I am meant to use with_progress() and specify the handlers before, so I got confused when I saw that Shiny was different from other cases.

HenrikBengtsson commented 1 week ago

I've updated help(with_progress) to refer to withProgressShiny() when writing Shiny apps.