progress icon indicating copy to clipboard operation
progress copied to clipboard

IDEA/WISH: End user controlling progress output format - not developer?

Open HenrikBengtsson opened this issue 6 years ago • 1 comments

Is there a way for the end user, rather than the developer, to control the progress output format? Could it be as simple as having the format argument default to getOption("progress.format", "[:bar] :percent")?

This can obviously be done as pb <- progress_bar(format = getOption("progress.format", "[:bar] :percent"), ...) by whatever code / package using {progress}, but it would be nice if there [cw]ould be one central standard. It could also result in a "good-practices" recommendation to the developer to avoid to/never specify the format and instead leave that to the end user.

HenrikBengtsson avatar Jul 07 '18 01:07 HenrikBengtsson

The problem with that, is that we need to figure out what to do if the specified format does not match the progress data. E.g. if you have "[:bar] :percent" for an unknown-sized download. Or when pkgman is downloading x packages and building y at the same time.

The developer can anticipate these and have a proper format, but the user can't.

gaborcsardi avatar Aug 27 '18 11:08 gaborcsardi

This is now supported in the progress bars of the cli package: https://cli.r-lib.org/reference/index.html#progress-bars

gaborcsardi avatar Nov 01 '23 14:11 gaborcsardi