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

Support inline clientside callbacks in Dash for R #140

Merged
merged 26 commits into from Apr 22, 2020
Merged

Conversation

rpkyle
Copy link
Contributor

@rpkyle rpkyle commented Nov 4, 2019

This PR proposes to allow passing JavaScript-functions-as-strings within callbacks in Dash for R, addressing #135. This implementation fixes the namespace as _dashprivate_, and uses output$id for the function name, as in Python.

To do:

  • Create simple integration test to demonstrate the functionality

@Marc-Andre-Rivet @HammadTheOne

R/dash.R Outdated Show resolved Hide resolved
R/dash.R Outdated Show resolved Hide resolved
R/utils.R Outdated Show resolved Hide resolved
@plotly plotly deleted a comment from alexcjohnson Nov 5, 2019
R/dash.R Outdated Show resolved Hide resolved
@plotly plotly deleted a comment from alexcjohnson Nov 5, 2019
@Marc-Andre-Rivet Marc-Andre-Rivet modified the milestones: Dash v1.7, Dash v1.8 Nov 27, 2019
@rpkyle rpkyle marked this pull request as ready for review April 7, 2020 04:41
@rpkyle rpkyle requested a review from alexcjohnson April 7, 2020 05:02
R/dash.R Outdated Show resolved Hide resolved
Copy link
Contributor

@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. 💃
Still waiting for that trailing whitespace hook 🙄

output('output-clientside', 'children'),
params=list(input('input', 'value')),
"
function (value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@rpkyle rpkyle merged commit e082bc4 into dev Apr 22, 2020
@rpkyle rpkyle deleted the 135-clientside-inline branch April 22, 2020 02:56
@rpkyle rpkyle mentioned this pull request May 6, 2020
rpkyle added a commit that referenced this pull request May 6, 2020
* Add unit tests for index customization (#176)

* Send status code of 1 when unit tests fail (#177)

* Support for arbitrary file extensions (#186)

* Add assortment of unit tests to Dash for R (#179)

* Nested and standard components test (#191)

* Support inline clientside callbacks in Dash for R (#140)

* Speed up CI, use image from plotly

* Update to dash-renderer 1.4.1

Co-authored-by: HammadTheOne <hammadkhan@plotly.com>
Co-authored-by: Marc-André Rivet <marc-andre.rivet@plotly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants