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

Bookmarking fixes #1281

Merged
merged 5 commits into from
Aug 11, 2016
Merged

Bookmarking fixes #1281

merged 5 commits into from
Aug 11, 2016

Conversation

wch
Copy link
Collaborator

@wch wch commented Aug 10, 2016

This closes #1273.

@wch wch added the review label Aug 10, 2016

if (length(private$progressKeys) == 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the check for private$progressKeys didn't quite have the right logic, I believe. If there was anything in private$progressKeys, all of the subsequent code in this function would run, including sending a message that didn't contain anything from private$progressKeys:

 private$sendMessage(
         errors = as.list(errors),
         values = as.list(values),
         inputMessages = inputMessages
       )

I think that instead, private$progressKeys should just get reset every time this function is called. (That's how I've implemented it, below.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code was correct. The existence of progress keys means we need to send a values message (even if empty) as this has a side effect of clearing out progress indication on the client. See the other note I added.

@wch
Copy link
Collaborator Author

wch commented Aug 10, 2016

This should be good to merge now.

@@ -1552,17 +1568,37 @@ outputOptions <- function(x, name, ...) {
#'
#' @export
onFlush <- function(fun, once = TRUE, session = getDefaultReactiveDomain()) {
session$onFlush(fun)
session$onFlush(fun, once = once)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, good catch

@jcheng5
Copy link
Member

jcheng5 commented Aug 10, 2016

Other than those progress-related fixes that need to be made, this looks good. Let me review one more time after you fix those.

@wch
Copy link
Collaborator Author

wch commented Aug 11, 2016

OK, I've restored the original logic for progressKeys.

@jcheng5 jcheng5 merged commit 183e9a3 into master Aug 11, 2016
@jcheng5 jcheng5 removed the review label Aug 11, 2016
@bborgesr bborgesr deleted the bookmark-fixes branch September 2, 2016 21:16
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.

Remaining bookmarkable state issues
2 participants