-
-
Notifications
You must be signed in to change notification settings - Fork 31
Provide support for hot reloading in Dash for R #127
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
Merged
Merged
Changes from 55 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
c9dd851
:sparkles: logic to track state and set hashes
90d4f1a
:watch: use integer modtime, not hash
4db6184
:see_no_evil: fix bindings
1daa216
Revert ":see_no_evil: fix bindings"
78577de
:see_no_evil: use self$config
9f98709
insert reload_hash initial route
d996f53
:sparkles: track modified files
704a8e6
:sparkles: add custom logger
63266de
:hammer: update logger
4611541
:see_no_evil: remove browser()
8391448
:hammer: refactor file tracking
3b0c9b3
:see_no_evil: fixes for asset tracking
23e80af
:sparkles: hot reload app.R
8b34a1f
:see_no_evil: hot reload can be NULL
35ec809
:hammer: properly detect changes recursively
0328055
use modtimeFromPath recursively
2fd459a
:see_no_evil: allow reloading without assets
38f7094
961418a
401860d
63d2a1c
:hocho: getwd(), FALSE if not sourced/Rscripted
8d39b1e
:crossed_fingers: hot reloading v2.0
69f4374
handle app sourced outside its dir
6fbe421
Merge branch 'dev' into 125-hot-reloading
rpkyle a22f62b
:hocho: os.chdir
b2c26c7
fix missing parenthesis
54d2c5c
test os.chdir
e8c533a
Add line number context to stack traces when srcrefs are available (#…
rpkyle 84264dd
:hammer: hot-reloading fixes
7bdf888
:hocho: components_cache and cache-control
f358fbc
:pencil2: use generateReloadHash
61a0e03
:hammer: refactor modtimeFromPath and its usage
c4eb68a
:hammer: use conditional logic for path vs. file
a9db490
:warning: politely require source() for :hotsprings:
9a749ac
:see_no_evil: clear field for next refresh
3acd451
:art: add unicode emoji to improve messaging
982a1cc
return value, perform assignment outside of fn
bafdd28
:rotating_light: initial test for :hotsprings:
7d55590
:art: add unicode emoji to improve messaging
f289083
:hammer: relocate reload interval check
ffbb633
update branch
9077838
update config
f2f1d8f
add artifacts
27909ee
fix hot reload test v1
f03418e
fix hot reload test v2, callback
3655b1b
:pencil2: cleanup & omit assets from update
3f0b6ae
:rotating_light: fix test!
f3b88cc
:see_no_evil: remove :zzz:
4f14816
:see_no_evil: need to handle case without assets
735baa2
:pencil2: fix comments
c928f9f
:deciduous_tree: remove dead branch
9979346
:rotating_light: add hard reload test, rename to clarify
4d374ac
:truck: rename files to make app :runner: happy
d7039e1
Update CHANGELOG.md
rpkyle da30cb2
Update CHANGELOG.md
rpkyle 5228dd4
:pencil2: fix path to work in CI and locally
b2fd947
Merge branch '125-hot-reloading' of github.com:plotly/dashR into 125-…
1461ee7
Update CHANGELOG.md
rpkyle 24c254a
:books: add documentation and some fixes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#hot-reload-content { | ||
background-color: blue; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
library(dash) | ||
library(dashHtmlComponents) | ||
library(dashCoreComponents) | ||
app <- Dash$new() | ||
|
||
app$layout(htmlDiv(list( | ||
htmlH3("Test hard reloading (when modifying any non-CSS resources)"), | ||
dccInput(id='input'), | ||
htmlDiv(id='output-serverside') | ||
), | ||
id="hot-reload-content" | ||
) | ||
) | ||
|
||
app$callback( | ||
output(id = "output-serverside", property = "children"), | ||
params = list( | ||
input(id = "input", property = "value") | ||
), | ||
function(value) { | ||
sprintf("Pre-reloading test output should be %s", value) | ||
} | ||
) | ||
|
||
app$run_server(dev_tools_hot_reload=TRUE, dev_tools_hot_reload_interval=0.1, dev_tools_silence_routes_logging=TRUE) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.