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

Add devmode() features #3174

Merged
merged 57 commits into from Dec 18, 2020
Merged

Add devmode() features #3174

merged 57 commits into from Dec 18, 2020

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Dec 2, 2020

Added:

  • devmode(enable, verbose)
  • in_devmode()
  • with_devmode(devmode, code)
  • devmode_inform(message, .frequency = "regularly", .frequency_id = message, ...)
  • register_devmode_option(option, message, on)
  • get_devmode_option(option, default = NULL, on = waiver(), message = waiver())
  • These devmode options:
register_devmode_option(
  "shiny.autoreload",
  "Turning on shiny autoreload. To disable, call `options(shiny.autoreload = FALSE)`",
  TRUE
)

register_devmode_option(
  "shiny.minified",
  "Using full shiny javascript file. To use the minified version, call `options(shiny.minified = TRUE)`",
  FALSE
)

register_devmode_option(
  "shiny.fullstacktrace",
  "Turning on full stack trace. To disable, call `options(shiny.fullstacktrace = FALSE)",
  TRUE
)

Other updates:

  • Removed ./R/htmltools.R as it is covered in ./R/reexports.R
  • Consolidated all imports to ./R/shiny-package.R
  • Soft deprecate shinyUI and shinyServer
  • Add lifecycle svgs to use in macros docs
  • Provide shiny deprecated messages using rlang::inform()
  • Use lifecycle::deprecated()
  • Import rlang::is_false()
  • Better error messaging for failing template tests

@schloerke schloerke requested a review from wch December 2, 2020 02:40
@schloerke
Copy link
Collaborator Author

(current windows failure is unrelated to changes made in PR)

DESCRIPTION Outdated Show resolved Hide resolved
R/deprecated.R Outdated Show resolved Hide resolved
R/deprecated.R Outdated Show resolved Hide resolved
R/server.R Outdated Show resolved Hide resolved
R/shiny-package.R Outdated Show resolved Hide resolved
R/shinyui.R Outdated Show resolved Hide resolved
R/deprecated.R Outdated Show resolved Hide resolved
@wch
Copy link
Collaborator

wch commented Dec 2, 2020

For dev_mode()

  • Maybe there's a better name than dev_mode()? Also, maybe listen to an option like options(shiny.devmode=TRUE), so that people can set it in their .Rprofile without causing shiny to load?
  • Display warnings about upcoming deprecations (like reactive with env and quoted)
  • Disable various forms of caching, in sass and bslib
  • Give hints about cache keys (not yet), and print out if missing one or more
  • Deprecate renderDataTable - use DT instead
  • shinyUI(), shinyServer() functions - can’t ever get rid of these, but we can message in dev mode
    • Call these functions superseded, in tidyverse terminology.
  • Automatically turn on shiny.minified = FALSE

@schloerke schloerke requested a review from wch December 16, 2020 23:19
R/devmode.R Outdated Show resolved Hide resolved
R/devmode.R Outdated Show resolved Hide resolved
R/devmode.R Outdated Show resolved Hide resolved
R/devmode.R Outdated Show resolved Hide resolved
R/devmode.R Outdated Show resolved Hide resolved
R/devmode.R Show resolved Hide resolved
R/devmode.R Show resolved Hide resolved
R/deprecated.R Outdated Show resolved Hide resolved
R/deprecated.R Outdated Show resolved Hide resolved
@schloerke
Copy link
Collaborator Author

macOS failures are due to rstudio/webdriver#59 (existing before PR). Merging

@schloerke schloerke changed the title Add devmode features Add devmode() features Dec 18, 2020
@schloerke schloerke merged commit f4fc13f into master Dec 18, 2020
@schloerke schloerke deleted the dev_edition branch December 18, 2020 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants