-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Fully reload ui/server when autoreload occurs #4184
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
Conversation
* feat: Use {watcher} * chore: shikokuchuo/watcher@dev * chore: watcher is on CRAN now * chore: Undo air format changes * feat: Use `shiny.autoreload.interval` for watcher latency * chore: Simply track last time auto-reload changed * docs: rewrite options docs for clarity
Updated since approved, changes now include reloading global+support files in ui/server apps
@jcheng5 Can you take another quick look at this PR? After testing I realized that it's equally confusing not to load changes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
Great |
This PR updates the auto reload to fully reload both the UI and server source code when any change is detected in the watched autoreload files.
Previously, auto reload would trigger a refresh of the app but the UI or server functions would be updated only if the
ui.R
orserver.R
files themselves changed (or both if using a single-file app source).This PR updates auto reloading so that any change to the files matching
shiny.autoreload.pattern
causes both the UI and server source to be reloaded.This fixes two long-standing open issues:
Fixes #2711
Fixes #1142
Example app
For testing, the following app sources R files and uses stylesheets outside the main
app.R
. Currently, inmain
, any changes to the supporting files causes the app to be reloaded but the reloaded app does not reflect the changes.After this PR, changes to support files are reflected after the reload.
Example app on shinylive.
TODO