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 show_undo_redo parameter to Dash for R #194

Merged
merged 4 commits into from
Apr 27, 2020
Merged

Conversation

rpkyle
Copy link
Contributor

@rpkyle rpkyle commented Apr 27, 2020

This pull request proposes to enable support for displaying the "undo" and "redo" button to step through the history of the app state for parity with Dash for Python. A simple integration test is also added to test functionality.

The "undo" button will appear like this:
Screenshot 2020-04-27 10 11 18

... and the "redo" button will appear like this:
Screenshot 2020-04-27 10 11 32

@rpkyle rpkyle self-assigned this Apr 27, 2020
@rpkyle rpkyle changed the base branch from master to dev April 27, 2020 14:13
@rpkyle rpkyle linked an issue Apr 27, 2020 that may be closed by this pull request
@@ -305,6 +311,7 @@ Dash <- R6::R6Class(
self$config$requests_pathname_prefix <- resolvePrefix(requests_pathname_prefix, "DASH_REQUESTS_PATHNAME_PREFIX", url_base_pathname)
self$config$external_scripts <- external_scripts
self$config$external_stylesheets <- external_stylesheets
self$config$show_undo_redo <- show_undo_redo
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah ok - you're calling to_JSON(self$config) for the _dash-config section of the index, so putting this into self$config is enough to get it included in the index. That probably means there's too much stuff being shoved in there. Doesn't have to be addressed now, feel free to make a new issue for it, but on the Py side we explicitly set what makes its way to the front end here

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 looks great! Perfect test.

@rpkyle rpkyle merged commit 5a1beb0 into dev Apr 27, 2020
@rpkyle rpkyle deleted the 193-add-show-undo-redo branch April 27, 2020 17:06
@rpkyle rpkyle mentioned this pull request May 6, 2020
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.

Missing show_undo_redo option in Dash for R
2 participants